Dynamic update

This commit is contained in:
iota97 committed 2022-07-11 14:28:29 +02:00
1 parent d2002eab39
commit 599ab41377
1 file changed
+11 -10
+11 -10
View File
@@ -1828,18 +1828,19 @@ void DeveloperToolsScreen::CreateViews() {
Choice *createTextureIni = list->Add(new Choice(dev->T("Create/Open textures.ini file for current game")));
createTextureIni->OnClick.Handle(this, &DeveloperToolsScreen::OnOpenTexturesIniFile);
createTextureIni->SetEnabledFunc([] {
if (!PSP_IsInited())
return false;
// Disable the choice to Open/Create if the textures.ini file already exists, and we can't open it due to platform support limitations.
if (!System_GetPropertyBool(SYSPROP_SUPPORTS_OPEN_FILE_IN_EDITOR)) {
std::string gameID = g_paramSFO.GetDiscID();
if (TextureReplacer::IniExists(gameID)) {
createTextureIni->SetEnabled(false);
// Disable the choice to Open/Create if the textures.ini file already exists, and we can't open it due to platform support limitations.
if (!System_GetPropertyBool(SYSPROP_SUPPORTS_OPEN_FILE_IN_EDITOR)) {
std::string gameID = g_paramSFO.GetDiscID();
if (TextureReplacer::IniExists(gameID)) {
return false;
}
}
}
if (!PSP_IsInited()) {
createTextureIni->SetEnabled(false);
}
return true;
});
}
void DeveloperToolsScreen::onFinish(DialogResult result) {