Try to write Windows backtraces to the last-loaded-film's directory.
/* This method is the only one that can return notes (so far) */
_playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), _state_version, notes);
+ /* Write backtraces to this film's directory, until another film is loaded */
+ set_backtrace_file (file ("backtrace.txt"));
+
_dirty = false;
return notes;
}
}
#endif
+void
+set_backtrace_file (boost::filesystem::path p)
+{
+ backtrace_file = p;
+}
+
/* From http://stackoverflow.com/questions/2443135/how-do-i-find-where-an-exception-was-thrown-in-c */
void
terminate ()
dcpomatic_setup ()
{
#ifdef DCPOMATIC_WINDOWS
- backtrace_file /= g_get_user_config_dir ();
- backtrace_file /= "backtrace.txt";
+ 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
extern void* wrapped_av_malloc (size_t);
extern int64_t divide_with_round (int64_t a, int64_t b);
extern ContentTimePeriod subtitle_period (AVSubtitle const &);
+extern void set_backtrace_file (boost::filesystem::path);
/** @class Socket
* @brief A class to wrap a boost::asio::ip::tcp::socket with some things