diff options
Diffstat (limited to 'engines/savestate.cpp')
-rw-r--r-- | engines/savestate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/savestate.cpp b/engines/savestate.cpp index 92c1eaf837..90ab4d0f6d 100644 --- a/engines/savestate.cpp +++ b/engines/savestate.cpp @@ -27,12 +27,12 @@ SaveStateDescriptor::SaveStateDescriptor() // FIXME: default to 0 (first slot) or to -1 (invalid slot) ? : _slot(-1), _description(), _isDeletable(true), _isWriteProtected(false), - _isLocked(false), _saveDate(), _saveTime(), _playTime(), _thumbnail() { + _isLocked(false), _saveDate(), _saveTime(), _playTime(), _playTimeMSecs(0), _thumbnail() { } SaveStateDescriptor::SaveStateDescriptor(int s, const Common::String &d) : _slot(s), _description(d), _isDeletable(true), _isWriteProtected(false), - _isLocked(false), _saveDate(), _saveTime(), _playTime(), _thumbnail() { + _isLocked(false), _saveDate(), _saveTime(), _playTime(), _playTimeMSecs(0), _thumbnail() { } void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) { @@ -51,10 +51,12 @@ void SaveStateDescriptor::setSaveTime(int hour, int min) { } void SaveStateDescriptor::setPlayTime(int hours, int minutes) { + _playTimeMSecs = ((hours * 60 + minutes) * 60) * 1000; _playTime = Common::String::format("%.2d:%.2d", hours, minutes); } void SaveStateDescriptor::setPlayTime(uint32 msecs) { + _playTimeMSecs = msecs; uint minutes = msecs / 60000; setPlayTime(minutes / 60, minutes % 60); } |