Load game info on restoring saves

This commit is contained in:
simon.kagstrom 2010-02-27 08:07:00 +00:00
parent 76c82882ad
commit 89b8fc07d9

View File

@ -78,7 +78,9 @@ public:
if (this->loadSnapshot) if (this->loadSnapshot)
{ {
TheC64->LoadSnapshot(new_path); TheC64->LoadSnapshot(new_path);
Gui::gui->sgv->loadGameInfo(fileName);
this->updateGameInfo(fileName);
Gui::gui->updateGameInfo(Gui::gui->sgv->gameInfo->gi);
ThePrefs.Load(prefs_path); ThePrefs.Load(prefs_path);
} else } else
unlink(new_path); unlink(new_path);
@ -97,9 +99,9 @@ public:
Gui::gui->popView(); 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"); char *p = strstr(cpy, ".sav");
if (p) if (p)
@ -108,6 +110,11 @@ public:
free(cpy); free(cpy);
} }
virtual void timeoutCallback()
{
this->updateGameInfo(this->pp_msgs[this->cur_sel]);
}
bool loadSnapshot; bool loadSnapshot;
}; };