bugfix: Last active config was lost in Config Panel (fixes #1572)

When loading a config from the GUI, then starting emulation, if we re-opened the GUI the last active config was cleared out.
This commit is contained in:
Dimitris Panokostas 2025-01-08 16:10:51 +01:00
parent 861a243439
commit 066aec48b9
No known key found for this signature in database
GPG Key ID: 330156A68E9E0929

View File

@ -62,7 +62,6 @@ public:
}
target_cfgfile_load(&changed_prefs, ConfigFilesList[i]->FullPath, CONFIG_TYPE_DEFAULT, 0);
strncpy(last_active_config, ConfigFilesList[i]->Name, MAX_DPATH);
refresh_all_panels();
}
else if (actionEvent.getSource() == cmdSave)
@ -239,12 +238,6 @@ void InitPanelConfig(const struct config_category& category)
button_x = category.panel->getWidth() - DISTANCE_BORDER - BUTTON_WIDTH;
category.panel->add(cmdDelete, button_x, buttonY);
if (strlen(last_loaded_config) > 0)
{
strcpy(last_active_config, last_loaded_config);
remove_file_extension(last_active_config);
}
ensureVisible = -1;
RefreshPanelConfig();
}