UI: Prevent changing memstick path in game.

It's going to work in confusing ways if the game has files open, etc.
This commit is contained in:
Unknown W. Brackets 2020-04-11 10:46:06 -07:00
parent 2405157009
commit cb6dfeddf0

View file

@ -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)")));