X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcross_windows.cc;h=b3d9a1558add1fbd2f7e70a74a23b2017accc985;hb=7647290fbaa81e25875758597f7cbbeca19f80bc;hp=f778a60e15088d932d85cb33a2ed9620c09d91f0;hpb=a5f481aae19a6ef5b0cad48edaea5b58fc00ee05;p=dcpomatic.git diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc index f778a60e1..b3d9a1558 100644 --- a/src/lib/cross_windows.cc +++ b/src/lib/cross_windows.cc @@ -19,6 +19,8 @@ */ +#define UNICODE 1 + #include "cross.h" #include "compose.hpp" #include "log.h" @@ -392,7 +394,7 @@ maybe_open_console () boost::filesystem::path home_directory () { - return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH")); + return boost::filesystem::path(getenv("userprofile")); } @@ -670,11 +672,14 @@ Drive::unmount () boost::filesystem::path -config_path () +config_path (optional version) { boost::filesystem::path p; p /= g_get_user_config_dir (); p /= "dcpomatic2"; + if (version) { + p /= *version; + } return p; }