diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 6fee4347a..21e0b7c52 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -153,6 +153,7 @@ Settings::Settings() setPermanent("threads", "false"); setTemporary("romloadcount", "0"); setTemporary("maxres", ""); + setPermanent("initials", ""); #ifdef DEBUGGER_SUPPORT // Debugger/disassembly options diff --git a/src/gui/HighScoresDialog.cxx b/src/gui/HighScoresDialog.cxx index 9bdf6a7b5..246f3fdcb 100644 --- a/src/gui/HighScoresDialog.cxx +++ b/src/gui/HighScoresDialog.cxx @@ -203,6 +203,10 @@ void HighScoresDialog::loadConfig() myVariationPopup->setEnabled(instance().highScores().numVariations() > 1); + if(myInitials.empty()) + // load initials from last session + myInitials = instance().settings().getString("initials"); + string label = " " + instance().highScores().specialLabel(); if (label.length() > 5) label = label.substr(label.length() - 5); @@ -234,6 +238,8 @@ void HighScoresDialog::saveConfig() { myInitials = myEditNameWidgets[myHighScoreRank]->getText(); myNames[myHighScoreRank] = myInitials; + // remember initials for next session + instance().settings().setValue("initials", myInitials); } // save selected variation saveHighScores(myVariation);