aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/savegame.cfsml
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/savegame.cfsml')
-rw-r--r--engines/sci/engine/savegame.cfsml6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index 2902efbb94..6eb2385785 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -745,7 +745,7 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename
}
*/
// Calculate the time spent with this game
- s->game_time = time(NULL) - s->game_start_time.tv_sec;
+ s->game_time = g_system->getMillis() / 1000;
%CFSMLWRITE SavegameMetadata meta INTO fh;
%CFSMLWRITE EngineState s INTO fh;
@@ -1082,9 +1082,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
sys_strings_restore(retval->sys_strings, s->sys_strings);
// Time state:
- sci_get_current_time(&(retval->last_wait_time));
- retval->game_start_time.tv_sec = time(NULL) - retval->game_time;
- retval->game_start_time.tv_usec = 0;
+ retval->last_wait_time = g_system->getMillis();
// File IO state:
retval->file_handles_nr = 2;