diff options
author | Johannes Schickel | 2008-09-11 19:47:45 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-09-11 19:47:45 +0000 |
commit | 0a35842954b9f1e79a84316deb496a4f4ecacf55 (patch) | |
tree | 43c3ef778cf7b0c0cde00714308afd85a65478df /gui | |
parent | 6fd2cb99db561bf90e785eadf45bf41ace7bf5d8 (diff) | |
download | scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.tar.gz scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.tar.bz2 scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.zip |
Committed my patch #2105593 "Launcher/MetaEngine: Finnished removeSaveState".
svn-id: r34495
Diffstat (limited to 'gui')
-rw-r--r-- | gui/launcher.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index b85b34e3d4..7656e467e7 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -940,7 +940,6 @@ void LauncherDialog::editGame(int item) { } void LauncherDialog::loadGame(int item) { - Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); String gameId = ConfMan.get("gameid", _domains[item]); if (gameId.empty()) gameId = _domains[item]; @@ -956,8 +955,7 @@ void LauncherDialog::loadGame(int item) { bool delSupport = (*plugin)->hasFeature(MetaEngine::kSupportsDeleteSave); if ((*plugin)->hasFeature(MetaEngine::kSupportsListSaves) && - (*plugin)->hasFeature(MetaEngine::kSupportsDirectLoad)) - { + (*plugin)->hasFeature(MetaEngine::kSupportsDirectLoad)) { do { Common::StringList saveNames = generateSavegameList(item, plugin); _loadDialog->setList(saveNames); @@ -971,14 +969,12 @@ void LauncherDialog::loadGame(int item) { MessageDialog alert("Do you really want to delete this savegame?", "Delete", "Cancel"); if (alert.runModal() == GUI::kMessageOK) { - saveFileMan->removeSavefile(filename.c_str()); - if ((saveList.size() - 1) == 0) { - //ConfMan.setInt("save_slot", -1); - } + (*plugin)->removeSaveState(description.c_str(), atoi(saveList[idx].save_slot().c_str())); + /*if ((saveList.size() - 1) == 0) { + ConfMan.setInt("save_slot", -1); + }*/ } - } - // Load the savegame - else { + } else { // Load the savegame int slot = atoi(saveList[idx].save_slot().c_str()); //const char *file = saveList[idx].filename().c_str(); //printf("Loading slot: %d\n", slot); @@ -988,8 +984,7 @@ void LauncherDialog::loadGame(int item) { close(); } } - } - while (_loadDialog->delSave()); + } while (_loadDialog->delSave()); } else { MessageDialog dialog ("Sorry, this game does not yet support loading games from the launcher.", "OK"); |