mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Update Windows crash dump path once we know where we're logging
Manual rewrite of 5102f4b11d
This commit is contained in:
parent
72d99237e3
commit
48368f79b6
3 changed files with 40 additions and 0 deletions
|
@ -314,6 +314,16 @@ void setupLogging(const std::filesystem::path& logDir, std::string_view appName,
|
|||
std::cout.rdbuf(&coutsb);
|
||||
std::cerr.rdbuf(&cerrsb);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
if (Crash::CrashCatcher::instance())
|
||||
{
|
||||
const std::string crashDumpName = Misc::StringUtils::lowerCase(appName) + "-crash.dmp";
|
||||
const std::string freezeDumpName = Misc::StringUtils::lowerCase(appName) + "-freeze.dmp";
|
||||
std::filesystem::path dumpDirectory = logDir;
|
||||
Crash::CrashCatcher::instance()->updateDumpPaths(dumpDirectory / crashDumpName, dumpDirectory / freezeDumpName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int wrapApplication(int (*innerApplication)(int argc, char* argv[]), int argc, char* argv[], std::string_view appName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue