Skip to content

Commit

Permalink
bugfix: Last active config was lost in Config Panel (fixes #1572)
Browse files Browse the repository at this point in the history
When loading a config from the GUI, then starting emulation, if we re-opened the GUI the last active config was cleared out.
  • Loading branch information
midwan committed Jan 8, 2025
1 parent 861a243 commit 066aec4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/osdep/gui/PanelConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class ConfigActionListener : public gcn::ActionListener
}

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)
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 066aec4

Please sign in to comment.