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