From 91627b28b46502c093274f05f3d4f1ba3fdb0b27 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 21 Sep 2021 20:06:13 +1000 Subject: [PATCH] R5900: Get rid of ScopedBools --- pcsx2/R5900.cpp | 4 +++- pcsx2/x86/ix86-32/iR5900-32.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index 3820624e0b..ac2f322715 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -367,7 +367,7 @@ u32 g_nextEventCycle = 0; // and the recompiler. (moved here to help alleviate redundant code) __fi void _cpuEventTest_Shared() { - ScopedBool etest(eeEventTestIsActive); + eeEventTestIsActive = true; g_nextEventCycle = cpuRegs.cycle + eeWaitCycles; // ---- INTC / DMAC (CPU-level Exceptions) ----------------- @@ -463,6 +463,8 @@ __fi void _cpuEventTest_Shared() // Apply vsync and other counter nextCycles cpuSetNextEvent( nextsCounter, nextCounter ); + + eeEventTestIsActive = false; } __ri void cpuTestINTCInts() diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index b3e8c04344..586efcdc70 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -762,7 +762,7 @@ static void recExecute() if (!setjmp(m_SetJmp_StateCheck)) { eeRecIsReset = false; - ScopedBool executing(eeCpuExecuting); + eeCpuExecuting = true; // Important! Most of the console logging and such has cancel points in it. This is great // in Windows, where SEH lets us safely kill a thread from anywhere we want. This is bad @@ -779,6 +779,8 @@ static void recExecute() pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate); } + eeCpuExecuting = false; + if (m_cpuException) m_cpuException->Rethrow(); if (m_Exception)