From cf2ad8fd02773677efb34ef93a3300070f12efe9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 6 Jun 2009 17:37:31 +0000 Subject: Implement FR#2090830: "GUI: RTL should focus game list on the last game played" svn-id: r41237 --- base/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'base/main.cpp') diff --git a/base/main.cpp b/base/main.cpp index dba4aeccaa..a091c5885a 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -81,8 +81,15 @@ static const EnginePlugin *detectPlugin() { // Make sure the gameid is set in the config manager, and that it is lowercase. Common::String gameid(ConfMan.getActiveDomainName()); assert(!gameid.empty()); - if (ConfMan.hasKey("gameid")) + if (ConfMan.hasKey("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(); ConfMan.set("gameid", gameid); -- cgit v1.2.3