This means the shared memory struct is just 255 bytes longer than a few
commits ago instead of 32K.
Also introduce a function for putting path strings in the shared memory
as there was too much copied and pasted code and it was error-prone.
Also free some handles once we're done with them so they don't leak.
Manual port of https://gitlab.com/OpenMW/openmw/-/merge_requests/3221 to OpenMW 0.48
throwstd::runtime_error("Could not start crash monitor process");
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
waitMonitor();
}
@ -222,7 +230,7 @@ namespace Crash
// must remain until monitor has finished
waitMonitor();
std::stringmessage="OpenMW has encountered a fatal error.\nCrash log saved to '"+std::string(mShm->mStartup.mCrashDumpFilePath)+"'.\nPlease report this to https://gitlab.com/OpenMW/openmw/issues !";
std::stringmessage="OpenMW has encountered a fatal error.\nCrash log saved to '"+getCrashDumpPath(*mShm)+"'.\nPlease report this to https://gitlab.com/OpenMW/openmw/issues !";
std::stringmessage="OpenMW appears to have frozen.\nCrash log saved to '"+std::string(mShm->mStartup.mFreezeDumpFilePath)+"'.\nPlease report this to https://gitlab.com/OpenMW/openmw/issues !";
std::stringmessage="OpenMW appears to have frozen.\nCrash log saved to '"+getFreezeDumpPath(*mShm)+"'.\nPlease report this to https://gitlab.com/OpenMW/openmw/issues !";