summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-10 22:13:22 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-10 22:44:31 +0100
commitab778ced048cad27b7c10808acfa93861ea91fce (patch)
tree37e04b2b36ff78e3c901c5f650f50210ea018c8a /src/lib/util.cc
parentc14ea4bf3907eb2a4f643a445cc4b232a6d425ce (diff)
Set up for the correct handling of UTF-8 with Windows
paths before trying to access the config file. Fixes #654.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index ede1d4e9b..56f1b5286 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -280,18 +280,10 @@ terminate ()
abort();
}
-/** Call the required functions to set up DCP-o-matic's static arrays, etc.
- * Must be called from the UI thread, if there is one.
- */
void
-dcpomatic_setup ()
+dcpomatic_setup_path_encoding ()
{
#ifdef DCPOMATIC_WINDOWS
- boost::filesystem::path p = g_get_user_config_dir ();
- p /= "backtrace.txt";
- set_backtrace_file (p);
- SetUnhandledExceptionFilter(exception_handler);
-
/* Dark voodoo which, I think, gets boost::filesystem::path to
correctly convert UTF-8 strings to paths, and also paths
back to UTF-8 strings (on path::string()).
@@ -307,6 +299,20 @@ dcpomatic_setup ()
std::locale::global (boost::locale::generator().generate (""));
boost::filesystem::path::imbue (std::locale ());
#endif
+}
+
+/** Call the required functions to set up DCP-o-matic's static arrays, etc.
+ * Must be called from the UI thread, if there is one.
+ */
+void
+dcpomatic_setup ()
+{
+#ifdef DCPOMATIC_WINDOWS
+ boost::filesystem::path p = g_get_user_config_dir ();
+ p /= "backtrace.txt";
+ set_backtrace_file (p);
+ SetUnhandledExceptionFilter(exception_handler);
+#endif
avfilter_register_all ();