diff options
author | Tarek Soliman | 2011-09-20 21:34:41 -0500 |
---|---|---|
committer | Tarek Soliman | 2011-09-23 22:06:08 -0500 |
commit | fbb6af0359d0b9607be231aa943190760b478f73 (patch) | |
tree | 3c1e00c07920793de6fc1275f03a45f49020404c /engines | |
parent | 4a9994e33318299a13f23f9a1d54bbdbbf04a7f1 (diff) | |
download | scummvm-rg350-fbb6af0359d0b9607be231aa943190760b478f73.tar.gz scummvm-rg350-fbb6af0359d0b9607be231aa943190760b478f73.tar.bz2 scummvm-rg350-fbb6af0359d0b9607be231aa943190760b478f73.zip |
ENGINES: make the default savegame description be the timestamp
Shamelessly copied from the SCI engine code
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dialogs.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 58bf629dc4..435576e9e4 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -228,7 +228,15 @@ void MainMenuDialog::save() { if (result.empty()) { // If the user was lazy and entered no save name, come up with a default name. Common::String buf; + #if defined(USE_SAVEGAME_TIMESTAMP) + TimeDate curTime; + g_system->getTimeAndDate(curTime); + curTime.tm_year += 1900; // fixup year + curTime.tm_mon++; // fixup month + buf = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); + #else buf = Common::String::format("Save %d", slot + 1); + #endif _engine->saveGameState(slot, buf); } else { _engine->saveGameState(slot, result); |