aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2009-06-06 17:37:31 +0000
committerEugene Sandulenko2009-06-06 17:37:31 +0000
commitcf2ad8fd02773677efb34ef93a3300070f12efe9 (patch)
tree0810fafc4f5597417e8e0fd6ae881f388fa492d5
parent974f47bbbae067a0388986a21c97b80909510c02 (diff)
downloadscummvm-rg350-cf2ad8fd02773677efb34ef93a3300070f12efe9.tar.gz
scummvm-rg350-cf2ad8fd02773677efb34ef93a3300070f12efe9.tar.bz2
scummvm-rg350-cf2ad8fd02773677efb34ef93a3300070f12efe9.zip
Implement FR#2090830: "GUI: RTL should focus game list on the last game played"
svn-id: r41237
-rw-r--r--base/main.cpp9
1 files changed, 8 insertions, 1 deletions
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);