summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-06-05 21:44:29 +0100
committerCarl Hetherington <cth@carlh.net>2019-06-05 21:44:29 +0100
commit951d70db4f81b5ddd4093f11853637c8ecbe63c5 (patch)
tree3d83cd45041c083bdb102ee2d8d05483a5b3d1e0
parent422d7ae041812af3587db6fdbead159672ff2772 (diff)
parentd699b3514c2c9d9fb32b19f487ad648e6fadb814 (diff)
Merge branch 'v2.15.x' of ssh://git.carlh.net/home/carl/git/dcpomatic into v2.15.xv2.15.7
-rw-r--r--src/lib/config.h1
-rw-r--r--src/lib/cross.cc13
-rw-r--r--src/lib/cross.h1
-rw-r--r--src/tools/dcpomatic.cc7
4 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index e25cb06da..29511b1fe 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -377,6 +377,7 @@ public:
NAG_INITIAL_SETUP,
NAG_IMPORT_DECRYPTION_CHAIN,
NAG_DELETE_DKDM,
+ NAG_32_ON_64,
NAG_COUNT
};
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 171bf2c81..a7fb298cb 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -501,3 +501,16 @@ command_and_read (string cmd)
return "";
}
+
+/** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
+bool
+running_32_on_64 ()
+{
+#ifdef DCPOMATIC_WINDOWS
+ BOOL p;
+ IsWow64Process (GetCurrentProcess(), &p);
+ return p;
+#endif
+ /* XXX: assuming nobody does this on Linux / OS X */
+ return false;
+}
diff --git a/src/lib/cross.h b/src/lib/cross.h
index 06e198e99..2e8b8e429 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -57,6 +57,7 @@ extern uint64_t thread_id ();
extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int flags);
extern boost::filesystem::path home_directory ();
extern std::string command_and_read (std::string cmd);
+extern bool running_32_on_64 ();
/** @class Waker
* @brief A class which tries to keep the computer awake on various operating systems.
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 820289825..96770914d 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -1539,6 +1539,13 @@ private:
Config::instance()->set_nagged(Config::NAG_INITIAL_SETUP, true);
}
+ if (running_32_on_64 ()) {
+ NagDialog::maybe_nag (
+ _frame, Config::NAG_32_ON_64,
+ _("You are running the 32-bit version of DCP-o-matic on a 64-bit version of Windows. This will limit the memory available to DCP-o-matic and may cause errors. You are strongly advised to install the 64-bit version of DCP-o-matic."),
+ false);
+ }
+
_frame->Show ();
if (!_film_to_load.empty() && boost::filesystem::is_directory (_film_to_load)) {