Correct snapshot loading

This commit is contained in:
simon.kagstrom 2010-01-25 15:28:39 +00:00
parent 756ae88990
commit e6b297c573

View File

@ -57,11 +57,14 @@ public:
virtual void selectCallback(int which) virtual void selectCallback(int which)
{ {
const char *fileName = this->pp_msgs[this->cur_sel]; const char *fileName = this->pp_msgs[this->cur_sel];
char buf[255];
snprintf(buf, sizeof(buf), "%s/%s",
Gui::gui->save_game_path, fileName);
if (this->loadSnapshot) if (this->loadSnapshot)
TheC64->LoadSnapshot(fileName); TheC64->LoadSnapshot(buf);
else else
unlink(fileName); unlink(buf);
Gui::gui->popView(); Gui::gui->popView();
} }