diff --git a/Core/Config.cpp b/Core/Config.cpp index bdbb8406c7e0..73e529f59a57 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -494,7 +494,6 @@ static bool DefaultSasThread() { static ConfigSetting cpuSettings[] = { ReportedConfigSetting("CPUCore", &g_Config.iCpuCore, &DefaultCpuCore, true, true), ReportedConfigSetting("SeparateSASThread", &g_Config.bSeparateSASThread, &DefaultSasThread, 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), ReportedConfigSetting("FuncReplacements", &g_Config.bFuncReplacements, true, true, true), diff --git a/Core/Config.h b/Core/Config.h index f0b743510a4f..0c589234171a 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -97,7 +97,6 @@ struct Config { uint32_t uJitDisableFlags; bool bSeparateSASThread; - bool bSeparateIOThread; int iIOTimingMethod; int iLockedCPUSpeed; bool bAutoSaveSymbolMap; diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index db942a52a80c..5550411fcfe8 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -129,7 +129,7 @@ static MemStickFatState lastMemStickFatState; static AsyncIOManager ioManager; static bool ioManagerThreadEnabled = false; -static std::thread *ioManagerThread; +static std::thread ioManagerThread; // TODO: Is it better to just put all on the thread? // Let's try. (was 256) @@ -649,12 +649,10 @@ void __IoInit() { memset(fds, 0, sizeof(fds)); - ioManagerThreadEnabled = g_Config.bSeparateIOThread; + ioManagerThreadEnabled = true; ioManager.SetThreadEnabled(ioManagerThreadEnabled); - if (ioManagerThreadEnabled) { - Core_ListenLifecycle(&__IoWakeManager); - ioManagerThread = new std::thread(&__IoManagerThread); - } + Core_ListenLifecycle(&__IoWakeManager); + ioManagerThread = std::thread(&__IoManagerThread); __KernelRegisterWaitTypeFuncs(WAITTYPE_ASYNCIO, __IoAsyncBeginCallback, __IoAsyncEndCallback); @@ -730,12 +728,8 @@ void __IoShutdown() { ioManagerThreadEnabled = false; ioManager.SyncThread(); ioManager.FinishEventLoop(); - if (ioManagerThread != nullptr) { - ioManagerThread->join(); - delete ioManagerThread; - ioManagerThread = nullptr; - ioManager.Shutdown(); - } + ioManagerThread.join(); + ioManager.Shutdown(); for (int i = 0; i < PSP_COUNT_FDS; ++i) { asyncParams[i].op = IoAsyncOp::NONE; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 414e07867a20..d7dd15def3eb 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -689,10 +689,8 @@ void GameSettingsScreen::CreateViews() { systemSettings->Add(new CheckBox(&g_Config.bFastMemory, sy->T("Fast Memory", "Fast Memory (Unstable)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); - systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, sy->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited()); static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" }; View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), sy->GetName(), screenManager())); - ioTimingMethod->SetEnabledPtr(&g_Config.bSeparateIOThread); systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)"))); PopupSliderChoice *lockedMhz = systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, sy->T("Change CPU Clock", "Change CPU Clock (unstable)"), screenManager(), sy->T("MHz, 0:default"))); lockedMhz->SetZeroLabel(sy->T("Auto"));