Correct prefs saving

This commit is contained in:
simon.kagstrom 2010-03-17 17:11:29 +00:00
parent 17e2f4816c
commit 596796287e

View File

@ -348,12 +348,18 @@ GuiView *Gui::popView()
void Gui::exitMenu() void Gui::exitMenu()
{ {
bool prefs_changed;
/* Pop all views */ /* Pop all views */
while (this->popView()) while (this->popView())
; ;
TheC64->NewPrefs(this->np); TheC64->NewPrefs(this->np);
prefs_changed = ThePrefs != *this->np;
ThePrefs = *this->np; ThePrefs = *this->np;
if (prefs_changed)
ThePrefs.Save(ThePrefs.PrefsPath);
this->saveGameInfo(this->metadata_base_path, this->cur_gameInfo->filename); this->saveGameInfo(this->metadata_base_path, this->cur_gameInfo->filename);
} }