summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-10-09 19:19:45 +0100
committerCarl Hetherington <cth@carlh.net>2018-10-09 20:11:33 +0100
commit2eab969654eca2ef4b222790c8b730a6eb709565 (patch)
treebe8b463ce2c56692275e550fd419b7bce707d414 /src/tools
parentbc5b4d4dc178dad75eacb02fd2d4e98c7d3801ec (diff)
swaroop: required monitors checks.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_player.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index 1742f6540..5bc9ace36 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -47,6 +47,7 @@
#include "lib/server.h"
#include "lib/dcpomatic_socket.h"
#include "lib/scoped_temporary.h"
+#include "lib/monitor_checker.h"
#include <dcp/dcp.h>
#include <wx/wx.h>
#include <wx/stdpaths.h>
@@ -195,10 +196,21 @@ public:
UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this));
_controls->SPLChanged.connect (boost::bind(&DOMFrame::set_spl, this, _1));
-
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+ MonitorChecker::instance()->StateChanged.connect(boost::bind(&DOMFrame::monitor_checker_state_changed, this));
+ MonitorChecker::instance()->run ();
+#endif
setup_screen ();
}
+ void monitor_checker_state_changed ()
+ {
+ if (!MonitorChecker::instance()->ok()) {
+ error_dialog (this, _("The required display devices are not connected correctly."));
+ _viewer->stop ();
+ }
+ }
+
void setup_main_sizer (Config::PlayerMode mode)
{
wxSizer* main_sizer = new wxBoxSizer (wxVERTICAL);
@@ -213,6 +225,12 @@ public:
bool playback_permitted ()
{
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+ if (!MonitorChecker::instance()->ok()) {
+ error_dialog (this, _("The required display devices are not connected correctly."));
+ return false;
+ }
+#endif
if (!_film || !Config::instance()->respect_kdm_validity_periods()) {
return true;
}