aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-10 04:49:42 +0200
committerJohannes Schickel2012-06-10 04:53:17 +0200
commit7c5cf1b400808865a5f601f70d624ad6704a0c8c (patch)
tree488862f566ac55bbadf84440115a12b91a213b5d /engines/cruise
parent9b05f4e1039ade7f2d0b774c18a6767113f2c848 (diff)
downloadscummvm-rg350-7c5cf1b400808865a5f601f70d624ad6704a0c8c.tar.gz
scummvm-rg350-7c5cf1b400808865a5f601f70d624ad6704a0c8c.tar.bz2
scummvm-rg350-7c5cf1b400808865a5f601f70d624ad6704a0c8c.zip
GUI: Add helper to SaveLoadChooser, which uses the currently active target.
This reduces the code duplication in all client code, which formerly duplicated the querying of the plugin, game id etc. and now simply calls the newly added method runModalWithCurrentTarget() on a SaveLoadChooser object.
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/menu.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 988355e777..512259f7d7 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -207,15 +207,13 @@ int processMenu(menuStruct *pMenu) {
}
static void handleSaveLoad(bool saveFlag) {
- const EnginePlugin *plugin = 0;
- EngineMan.findGame(_vm->getGameId(), &plugin);
GUI::SaveLoadChooser *dialog;
if (saveFlag)
dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
else
dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
- int slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
+ int slot = dialog->runModalWithCurrentTarget();
if (slot >= 0) {
if (!saveFlag)