}
}
#endif
+
+boost::filesystem::path
+home_directory ()
+{
+#if defined(DCPOMATIC_LINUX) || defined(DCPOMATIC_OSX)
+ return getenv("HOME");
+#endif
+#ifdef DCPOMATIC_WINDOWS
+ return getenv("HOMEDRIVE") / getenv("HOMEPATH");
+#endif
+}
extern void start_player (boost::filesystem::path dcpomatic);
extern uint64_t thread_id ();
extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int flags);
+extern boost::filesystem::path home_directory ();
/** @class Waker
* @brief A class which tries to keep the computer awake on various operating systems.
DeleteAllItems ();
_content.clear ();
optional<path> dir = Config::instance()->player_content_directory();
- if (!dir) {
- return;
+ if (!dir || !boost::filesystem::is_directory(*dir)) {
+ dir = home_directory ();
}
wxProgressDialog progress (_("DCP-o-matic"), _("Reading content directory"));