Clear the extra assert info on game exit

This commit is contained in:
Henrik Rydgård 2022-12-17 22:17:29 +01:00
parent 800bc91a8a
commit 2ab7222d5b
2 changed files with 5 additions and 2 deletions

View file

@ -36,11 +36,11 @@
static bool hitAnyAsserts = false;
std::mutex g_extraAssertInfoMutex;
std::string g_extraAssertInfo = "no extra info set";
std::string g_extraAssertInfo = "menu";
void SetExtraAssertInfo(const char *info) {
std::lock_guard<std::mutex> guard(g_extraAssertInfoMutex);
g_extraAssertInfo = info;
g_extraAssertInfo = info ? info : "menu";
}
bool HandleAssert(const char *function, const char *file, int line, const char *expression, const char* format, ...) {

View file

@ -402,6 +402,9 @@ EmuScreen::~EmuScreen() {
// If we were invalid, it would already be shutdown.
PSP_Shutdown();
}
SetExtraAssertInfo(nullptr);
#ifndef MOBILE_DEVICE
if (g_Config.bDumpFrames && startDumping)
{