diff options
author | Johannes Schickel | 2012-06-10 04:49:42 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-06-10 04:53:17 +0200 |
commit | 7c5cf1b400808865a5f601f70d624ad6704a0c8c (patch) | |
tree | 488862f566ac55bbadf84440115a12b91a213b5d /engines/cruise | |
parent | 9b05f4e1039ade7f2d0b774c18a6767113f2c848 (diff) | |
download | scummvm-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.cpp | 4 |
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) |