Make it possible to load files

This commit is contained in:
simon.kagstrom 2010-01-25 15:23:00 +00:00
parent f78a26462f
commit 57a47a036d
2 changed files with 6 additions and 3 deletions

View File

@ -63,7 +63,8 @@ public:
save_game = fileName;
else
save_game = save_game + 1; /* Skip '/' */
strncpy(Gui::gui->np->DrivePath[0], fileName, sizeof(Gui::gui->np->DrivePath[0]));
snprintf(Gui::gui->np->DrivePath[0], sizeof(Gui::gui->np->DrivePath[0]),
"%s/%s", Gui::gui->game_base_path, fileName);
if (ext_matches_list(fileName, prg_exts)) {
char tmp_filename[255];
@ -108,7 +109,10 @@ public:
Gui::gui->popView();
if (this->runStartSequence)
{
Gui::gui->exitMenu();
TheC64->startFakeKeySequence("\nLOAD \"*\",8,1\nRUN\n");
}
}
virtual void hoverCallback(int which)

View File

@ -296,11 +296,10 @@ GuiView *Gui::popView()
void Gui::exitMenu()
{
printf("Exiting the menu system\n");
/* Pop all views */
while (this->popView())
;
ThePrefs = *this->np;
TheC64->NewPrefs(this->np);
}