Skip to content

Commit

Permalink
Save after changing recent list
Browse files Browse the repository at this point in the history
regarding hrydgard#7472 . 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.
  • Loading branch information
Bigpet committed Feb 13, 2015
1 parent 6f0ea8f commit aa6985f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Core/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ void CPU_Init() {

if (coreParameter.updateRecent) {
g_Config.AddRecent(filename);
g_Config.Save();
}

coreState = coreParameter.startPaused ? CORE_STEPPING : CORE_RUNNING;
Expand Down
1 change: 1 addition & 0 deletions UI/GameInfoCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions UI/GameScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit aa6985f

Please sign in to comment.