diff options
author | Matthew Hoops | 2010-07-31 19:18:35 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-07-31 19:18:35 +0000 |
commit | 142fb8a1f122f7dbeedc9df1e9de770c325d08ca (patch) | |
tree | a777031fda8defd2e9748af3b23b44daf85b562f /engines | |
parent | 3e29e9ffaeab91b1ddf8e02b90bb65a087f89979 (diff) | |
download | scummvm-rg350-142fb8a1f122f7dbeedc9df1e9de770c325d08ca.tar.gz scummvm-rg350-142fb8a1f122f7dbeedc9df1e9de770c325d08ca.tar.bz2 scummvm-rg350-142fb8a1f122f7dbeedc9df1e9de770c325d08ca.zip |
SCI: Don't include the time running the debugger in the game running time
svn-id: r51548
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/console.cpp | 6 | ||||
-rw-r--r-- | engines/sci/console.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 20acbed450..7407f08482 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -67,7 +67,7 @@ bool g_debug_track_mouse_clicks = false; static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeValue); Console::Console(SciEngine *engine) : GUI::Debugger(), - _engine(engine), _debugState(engine->_debugState) { + _engine(engine), _debugState(engine->_debugState), _enterTime(0) { // Variables DVar_Register("sleeptime_factor", &g_debug_sleeptime_factor, DVAR_INT, 0); @@ -214,6 +214,7 @@ Console::~Console() { void Console::preEnter() { if (g_sci && g_sci->_soundCmd) g_sci->_soundCmd->pauseAll(true); + _enterTime = g_system->getMillis(); } void Console::postEnter() { @@ -272,6 +273,9 @@ void Console::postEnter() { _videoFile.clear(); _videoFrameDelay = 0; } + + // Subtract the time we were running the debugger from the game running time + _engine->_gamestate->gameStartTime += g_system->getMillis() - _enterTime; } bool Console::cmdHelp(int argc, const char **argv) { diff --git a/engines/sci/console.h b/engines/sci/console.h index 234272bbab..091a5d15f8 100644 --- a/engines/sci/console.h +++ b/engines/sci/console.h @@ -163,6 +163,7 @@ private: bool _mouseVisible; Common::String _videoFile; int _videoFrameDelay; + uint32 _enterTime; }; } // End of namespace Sci |