From cb6dfeddf098f80a2e7d96b6fad665327b2f62b7 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 11 Apr 2020 10:46:06 -0700 Subject: [PATCH] UI: Prevent changing memstick path in game. It's going to work in confusing ways if the game has files open, etc. --- UI/GameSettingsScreen.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 2ab1e6beb5..aa8fd250a6 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -261,8 +261,7 @@ void GameSettingsScreen::CreateViews() { return UI::EVENT_CONTINUE; }); softwareGPU->OnClick.Handle(this, &GameSettingsScreen::OnSoftwareRendering); - if (PSP_IsInited()) - softwareGPU->SetEnabled(false); + softwareGPU->SetEnabled(!PSP_IsInited()); } graphicsSettings->Add(new ItemHeader(gr->T("Frame Rate Control"))); @@ -828,6 +827,7 @@ void GameSettingsScreen::CreateViews() { memstickPath->OnClick.Handle(this, &GameSettingsScreen::OnChangeMemStickDir); #elif defined(_WIN32) && !PPSSPP_PLATFORM(UWP) SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, sy->T("Save path in My Documents", "Save path in My Documents"))); + SavePathInMyDocumentChoice->SetEnabled(!PSP_IsInited()); SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc); SavePathInOtherChoice = systemSettings->Add(new CheckBox(&otherinstalled_, sy->T("Save path in installed.txt", "Save path in installed.txt"))); SavePathInOtherChoice->SetEnabled(false); @@ -843,7 +843,7 @@ void GameSettingsScreen::CreateViews() { if (!(File::Delete(PPSSPPpath + "installedTEMP.txt"))) SavePathInMyDocumentChoice->SetEnabled(false); else - SavePathInOtherChoice->SetEnabled(true); + SavePathInOtherChoice->SetEnabled(!PSP_IsInited()); } else SavePathInMyDocumentChoice->SetEnabled(false); } else { @@ -860,7 +860,7 @@ void GameSettingsScreen::CreateViews() { // Skip UTF-8 encoding bytes if there are any. There are 3 of them. if (tempString.substr(0, 3) == "\xEF\xBB\xBF") tempString = tempString.substr(3); - SavePathInOtherChoice->SetEnabled(true); + SavePathInOtherChoice->SetEnabled(!PSP_IsInited()); if (!(tempString == "")) { installed_ = false; otherinstalled_ = true; @@ -874,7 +874,7 @@ void GameSettingsScreen::CreateViews() { #endif #if defined(_M_X64) - systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, sy->T("Cache ISO in RAM", "Cache full ISO in RAM"))); + systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, sy->T("Cache ISO in RAM", "Cache full ISO in RAM")))->SetEnabled(!PSP_IsInited()); #endif systemSettings->Add(new ItemHeader(sy->T("Cheats", "Cheats (experimental, see forums)")));