diff options
Diffstat (limited to 'engines/cge/events.cpp')
-rw-r--r-- | engines/cge/events.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 3c561c5659..095aac2412 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -70,12 +70,8 @@ bool Keyboard::getKey(Common::Event &event) { return false; case Common::KEYCODE_F5: if (_vm->canSaveGameStateCurrently()) { - const EnginePlugin *plugin = NULL; - EngineMan.findGame(_vm->_gameDescription->gameid, &plugin); - - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save"); - dialog->setSaveMode(true); - int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); + int16 savegameId = dialog->runModalWithCurrentTarget(); Common::String savegameDescription = dialog->getResultString(); delete dialog; @@ -85,12 +81,8 @@ bool Keyboard::getKey(Common::Event &event) { return false; case Common::KEYCODE_F7: if (_vm->canLoadGameStateCurrently()) { - const EnginePlugin *plugin = NULL; - EngineMan.findGame(_vm->_gameDescription->gameid, &plugin); - - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore"); - dialog->setSaveMode(false); - int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); + int16 savegameId = dialog->runModalWithCurrentTarget(); delete dialog; if (savegameId != -1) |