diff --git a/Core/Config.cpp b/Core/Config.cpp index 23311584d6..5f9d41e973 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -333,6 +333,7 @@ static ConfigSetting generalSettings[] = { static ConfigSetting cpuSettings[] = { ReportedConfigSetting("Jit", &g_Config.bJit, &DefaultJit, true, true), ReportedConfigSetting("SeparateCPUThread", &g_Config.bSeparateCPUThread, false, true, true), + ReportedConfigSetting("SeparateSASThread", &g_Config.bSeparateSASThread, true, true, true), ReportedConfigSetting("SeparateIOThread", &g_Config.bSeparateIOThread, true, true, true), ReportedConfigSetting("IOTimingMethod", &g_Config.iIOTimingMethod, IOTIMING_FAST, true, true), ConfigSetting("FastMemoryAccess", &g_Config.bFastMemory, true, true, true), diff --git a/Core/Config.h b/Core/Config.h index a1ba518d44..74fe1a43f7 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -119,8 +119,9 @@ public: // Definitely cannot be changed while game is running. bool bSeparateCPUThread; - int iIOTimingMethod; + bool bSeparateSASThread; bool bSeparateIOThread; + int iIOTimingMethod; int iLockedCPUSpeed; bool bAutoSaveSymbolMap; bool bCacheFullIsoInRam; diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index b97437daf4..75a3c5548a 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -34,6 +34,7 @@ #include "thread/thread.h" #include "thread/threadutil.h" #include "Common/Log.h" +#include "Core/Config.h" #include "Core/HLE/HLE.h" #include "Core/HLE/FunctionWrappers.h" #include "Core/MIPS/MIPS.h" @@ -144,8 +145,12 @@ static void __SasEnqueueMix(u32 outAddr, u32 inAddr = 0, int leftVol = 0, int ri void __SasInit() { sas = new SasInstance(); - sasThreadState = SasThreadState::READY; - sasThread = new std::thread(__SasThread); + if (g_Config.bSeparateSASThread) { + sasThreadState = SasThreadState::READY; + sasThread = new std::thread(__SasThread); + } else { + sasThreadState = SasThreadState::DISABLED; + } } void __SasDoState(PointerWrap &p) {