Save before quitting and use the prefs path

This commit is contained in:
simon.kagstrom 2010-02-14 09:37:46 +00:00
parent 484b8cc685
commit 230208358f

View File

@ -325,6 +325,8 @@ void C64::VBlank(bool draw_frame)
Gui::gui->runLogic();
if (this->quit_thyself)
ThePrefs.Save(ThePrefs.PrefsPath);
#if defined(GEKKO)
if (this->quit_thyself && Network::networking_started == true)
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
@ -332,8 +334,6 @@ void C64::VBlank(bool draw_frame)
#else
now = SDL_GetTicks();
#endif
if (this->quit_thyself)
ThePrefs.Save((const char*)PREFS_PATH);
if ( (now - lastFrame) < ThePrefs.MsPerFrame) {
usleep( (ThePrefs.MsPerFrame - (now - lastFrame)) * 1000);