Implement FR#2090830: "GUI: RTL should focus game list on the last game played"

svn-id: r41237
This commit is contained in:
Eugene Sandulenko 2009-06-06 17:37:31 +00:00
parent 974f47bbba
commit cf2ad8fd02

View File

@ -81,8 +81,15 @@ static const EnginePlugin *detectPlugin() {
// Make sure the gameid is set in the config manager, and that it is lowercase. // Make sure the gameid is set in the config manager, and that it is lowercase.
Common::String gameid(ConfMan.getActiveDomainName()); Common::String gameid(ConfMan.getActiveDomainName());
assert(!gameid.empty()); assert(!gameid.empty());
if (ConfMan.hasKey("gameid")) if (ConfMan.hasKey("gameid")) {
gameid = ConfMan.get("gameid"); gameid = ConfMan.get("gameid");
// Set last selected game, that the game will be highlighted
// on RTL
ConfMan.set("lastselectedgame", ConfMan.getActiveDomainName(), Common::ConfigManager::kApplicationDomain);
ConfMan.flushToDisk();
}
gameid.toLowercase(); gameid.toLowercase();
ConfMan.set("gameid", gameid); ConfMan.set("gameid", gameid);