From b071db9ec260b38c0c03f9f3345cf8cc4cd2d407 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 12 Jul 2020 21:27:24 -0700 Subject: [PATCH] Core: Reset exception info on resume/reset. If you restart the game, it shouldn't still have this (will only show if you enter debugging, but still.) --- Core/Core.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/Core.cpp b/Core/Core.cpp index cf851e807e..e0434bb721 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -94,6 +94,7 @@ void Core_ListenStopRequest(CoreStopRequestFunc func) { } void Core_Stop() { + g_exceptionInfo.type = ExceptionType::NONE; Core_UpdateState(CORE_POWERDOWN); for (auto func : stopFuncs) { func(); @@ -264,6 +265,7 @@ void Core_UpdateSingleStep() { } void Core_SingleStep() { + g_exceptionInfo.type = ExceptionType::NONE; currentMIPS->SingleStep(); if (coreState == CORE_STEPPING) steppingCounter++; @@ -361,6 +363,8 @@ void Core_EnableStepping(bool step) { steppingCounter++; } else { host->SetDebugMode(false); + // Clear the exception if we resume. + g_exceptionInfo.type = ExceptionType::NONE; coreState = CORE_RUNNING; coreStatePending = false; m_StepCond.notify_all();