diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-11-13 11:05:39 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-11-13 11:05:39 +0000 |
| commit | 59a87a29043d29907c389b9fca7b5865bc0bdf84 (patch) | |
| tree | d05a3588cc1e0274a4f9b146d277b22a67839db5 /src/lib/util.cc | |
| parent | bf7d89546d4bbc155d4367a7bd5f3e17fa08369a (diff) | |
Hand-apply 9c251ca3debbf1e529b77ea4d174994ef8b5dd0b from master:
Try to write Windows backtraces to the last-loaded-film's directory.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 728e7d048..2b7df86bf 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -282,6 +282,12 @@ LONG WINAPI exception_handler(struct _EXCEPTION_POINTERS *) } #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 () @@ -317,8 +323,9 @@ void 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 |
