diff options
author | Martin Kiewitz | 2010-09-08 16:15:42 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-09-08 16:15:42 +0000 |
commit | 10a460443badcf3a9e8d418b51a33cdf74335a2f (patch) | |
tree | b15db63f40d6d4c4d88419bed4132d88350eeb08 /engines/sci/engine | |
parent | 54865f48371076dd280ad9f22b14e50da62d0eaf (diff) | |
download | scummvm-rg350-10a460443badcf3a9e8d418b51a33cdf74335a2f.tar.gz scummvm-rg350-10a460443badcf3a9e8d418b51a33cdf74335a2f.tar.bz2 scummvm-rg350-10a460443badcf3a9e8d418b51a33cdf74335a2f.zip |
SCI: adding save description, if none was entered
fixes bug #3061964
svn-id: r52637
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index e08f27cdf7..0a503272ce 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -577,6 +577,14 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { dialog->setSaveMode(true); savegameId = dialog->runModal(plugin, ConfMan.getActiveDomainName()); game_description = dialog->getResultString(); + if (game_description.empty()) { + // create our own description for the saved game, the user didnt enter it + TimeDate curTime; + g_system->getTimeAndDate(curTime); + curTime.tm_year += 1900; // fixup year + curTime.tm_mon++; // fixup month + game_description = Common::String::printf("%02d.%02d.%04d / %02d:%02d:%02d", curTime.tm_mday, curTime.tm_mon, curTime.tm_year, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); + } delete dialog; g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save) if (savegameId < 0) |