diff --git a/Src/gui/save_game_menu.cpp b/Src/gui/save_game_menu.cpp index d52da8d..136afee 100644 --- a/Src/gui/save_game_menu.cpp +++ b/Src/gui/save_game_menu.cpp @@ -78,7 +78,9 @@ public: if (this->loadSnapshot) { TheC64->LoadSnapshot(new_path); - Gui::gui->sgv->loadGameInfo(fileName); + + this->updateGameInfo(fileName); + Gui::gui->updateGameInfo(Gui::gui->sgv->gameInfo->gi); ThePrefs.Load(prefs_path); } else unlink(new_path); @@ -97,9 +99,9 @@ public: Gui::gui->popView(); } - virtual void timeoutCallback() + void updateGameInfo(const char *fileName) { - char *cpy = xstrdup(this->pp_msgs[this->cur_sel]); + char *cpy = xstrdup(fileName); char *p = strstr(cpy, ".sav"); if (p) @@ -108,6 +110,11 @@ public: free(cpy); } + virtual void timeoutCallback() + { + this->updateGameInfo(this->pp_msgs[this->cur_sel]); + } + bool loadSnapshot; };