Save after changing recent list

regarding  . If this is not done then the config file (the main config,
the per-game config files do not have recent entries) is loaded when a game
with game-specific settings is touched.
This commit is contained in:
Peter Tissen 2015-02-13 10:10:42 +01:00
parent 6f0ea8fcf4
commit aa6985f5c2
3 changed files with 3 additions and 0 deletions

@ -230,6 +230,7 @@ void CPU_Init() {
if (coreParameter.updateRecent) {
g_Config.AddRecent(filename);
g_Config.Save();
}
coreState = coreParameter.startPaused ? CORE_STEPPING : CORE_RUNNING;

@ -59,6 +59,7 @@ bool GameInfo::DeleteGame() {
auto i = std::find(g_Config.recentIsos.begin(), g_Config.recentIsos.end(), fileToRemove);
if (i != g_Config.recentIsos.end()) {
g_Config.recentIsos.erase(i);
g_Config.Save();
}
return true;
}

@ -301,6 +301,7 @@ UI::EventReturn GameScreen::OnRemoveFromRecent(UI::EventParams &e) {
if (!strcmp((*it).c_str(), gamePath_.c_str())) {
#endif
g_Config.recentIsos.erase(it);
g_Config.Save();
screenManager()->switchScreen(new MainScreen());
return UI::EVENT_DONE;
}