aboutsummaryrefslogtreecommitdiff
path: root/engines/dialogs.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2011-09-30 10:57:04 -0700
committerEugene Sandulenko2011-09-30 10:57:04 -0700
commitb4e6962d5d2bd910a1e26911feec7aa67c185b26 (patch)
treed3978b687c9c500b0795cd7785d196020cea7881 /engines/dialogs.cpp
parenta7f26eb1591dcd50f7ce4ee8485eca6fbbd9a145 (diff)
parent7c8891fed4c439c365c05bb64968df3ee41bae87 (diff)
downloadscummvm-rg350-b4e6962d5d2bd910a1e26911feec7aa67c185b26.tar.gz
scummvm-rg350-b4e6962d5d2bd910a1e26911feec7aa67c185b26.tar.bz2
scummvm-rg350-b4e6962d5d2bd910a1e26911feec7aa67c185b26.zip
Merge pull request #88 from tsoliman/savegame-timestamp-rebase
ENGINES: make the default savegame description be the timestamp
Diffstat (limited to 'engines/dialogs.cpp')
-rw-r--r--engines/dialogs.cpp8
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);