diff options
author | Paweł Kołodziejski | 2003-03-17 22:46:08 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-03-17 22:46:08 +0000 |
commit | 0812d3bf444ef6c200d30b4d16d1b095fa571597 (patch) | |
tree | 86f7603806025971999d5a2779f3752b52cbc966 /scumm/smush | |
parent | 6ed5d5d757cdca14015f3d07c87d1f76b77d0a7e (diff) | |
download | scummvm-rg350-0812d3bf444ef6c200d30b4d16d1b095fa571597.tar.gz scummvm-rg350-0812d3bf444ef6c200d30b4d16d1b095fa571597.tar.bz2 scummvm-rg350-0812d3bf444ef6c200d30b4d16d1b095fa571597.zip |
a tiny safer
svn-id: r6829
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/smush_player.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 3f2c0c9e01..a4da856c27 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -856,11 +856,13 @@ void SmushPlayer::setPalette(byte *palette) { void SmushPlayer::updateScreen() { if (_whileUpdate == false) { _whileCopyRect = true; + uint32 end_time, start_time = _scumm->_system->get_msecs(); _scumm->_system->copy_rect(_data, _width, 0, 0, _width, _height); + _updateNeeded = true; end_time = _scumm->_system->get_msecs(); debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time); - _updateNeeded = true; + _whileCopyRect = false; } } @@ -883,14 +885,18 @@ void SmushPlayer::play(const char *filename, const char *directory) { while (true) { _scumm->processKbd(); _scumm->waitForTimer(1); - if ((_whileCopyRect == false) && (_updateNeeded == true)) { - _whileUpdate = true; - uint32 end_time, start_time = _scumm->_system->get_msecs(); - _scumm->_system->update_screen(); - end_time = _scumm->_system->get_msecs(); - debug(4, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time); - _updateNeeded = false; - _whileUpdate = false; + if(_updateNeeded == true) { + if(_whileCopyRect == false) { + _whileUpdate = true; + + uint32 end_time, start_time = _scumm->_system->get_msecs(); + _scumm->_system->update_screen(); + _updateNeeded = false; + end_time = _scumm->_system->get_msecs(); + debug(4, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time); + + _whileUpdate = false; + } } if (_scumm->_videoFinished == true) break; |