From 92021db2307161a2df0cc2cfa4d3498444ab6888 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Sun, 5 Jan 2025 04:08:13 +0100 Subject: [PATCH] Use one CPU emulation thread for --force-interpreter (#1467) --- src/Cafe/CafeSystem.cpp | 3 ++- src/Cafe/HW/Espresso/Debugger/Debugger.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cafe/CafeSystem.cpp b/src/Cafe/CafeSystem.cpp index 88e0ed3d..1bf3755e 100644 --- a/src/Cafe/CafeSystem.cpp +++ b/src/Cafe/CafeSystem.cpp @@ -9,6 +9,7 @@ #include "audio/IAudioAPI.h" #include "audio/IAudioInputAPI.h" #include "config/ActiveSettings.h" +#include "config/LaunchSettings.h" #include "Cafe/TitleList/GameInfo.h" #include "Cafe/GraphicPack/GraphicPack2.h" #include "util/helpers/SystemException.h" @@ -843,7 +844,7 @@ namespace CafeSystem module->TitleStart(); cemu_initForGame(); // enter scheduler - if (ActiveSettings::GetCPUMode() == CPUMode::MulticoreRecompiler) + if (ActiveSettings::GetCPUMode() == CPUMode::MulticoreRecompiler && !LaunchSettings::ForceInterpreter()) coreinit::OSSchedulerBegin(3); else coreinit::OSSchedulerBegin(1); diff --git a/src/Cafe/HW/Espresso/Debugger/Debugger.cpp b/src/Cafe/HW/Espresso/Debugger/Debugger.cpp index 1fed07cd..37e374d6 100644 --- a/src/Cafe/HW/Espresso/Debugger/Debugger.cpp +++ b/src/Cafe/HW/Espresso/Debugger/Debugger.cpp @@ -575,7 +575,7 @@ void debugger_enterTW(PPCInterpreter_t* hCPU) debuggerState.debugSession.stepInto = false; debuggerState.debugSession.stepOver = false; debuggerState.debugSession.run = false; - while (true) + while (debuggerState.debugSession.isTrapped) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); // check for step commands