diff options
author | Filippos Karapetis | 2008-06-10 22:41:41 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-06-10 22:41:41 +0000 |
commit | 6fa6a2fbca658aae9296ee872489543f46074b5d (patch) | |
tree | 46f65984f5a654ffc07aba22b512dcc59bc19560 | |
parent | efc4fd7ae0f106f2cfe9d9109b3331604f97be9c (diff) | |
download | scummvm-rg350-6fa6a2fbca658aae9296ee872489543f46074b5d.tar.gz scummvm-rg350-6fa6a2fbca658aae9296ee872489543f46074b5d.tar.bz2 scummvm-rg350-6fa6a2fbca658aae9296ee872489543f46074b5d.zip |
Pressing enter when entering the name of a save game should save that game
svn-id: r32661
-rw-r--r-- | engines/drascula/saveload.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 008784f209..de82899462 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -122,6 +122,21 @@ bool DrasculaEngine::saveLoadScreen() { print_abc(names[n2], 116, y); y = y + 9; } + + if (selectionMade == 1) { + snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); + saveGame(file); + Common::OutSaveFile *tsav; + if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { + error("Can't open %s file", fileEpa); + } + for (n = 0; n < NUM_SAVES; n++) { + tsav->writeString(names[n]); + tsav->writeString("\n"); + } + tsav->finalize(); + delete tsav; + } } if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) { |