[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.7,1.8
Pawel Kolodziejski
aquadran at users.sourceforge.net
Mon Mar 17 14:47:02 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv22368
Modified Files:
smush_player.cpp
Log Message:
a tiny safer
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- smush_player.cpp 17 Mar 2003 21:55:58 -0000 1.7
+++ smush_player.cpp 17 Mar 2003 22:46:08 -0000 1.8
@@ -856,11 +856,13 @@
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 @@
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;
More information about the Scummvm-git-logs
mailing list