[Scummvm-cvs-logs] SF.net SVN: scummvm: [22683] scummvm/trunk/engines/kyra/text.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat May 27 06:34:07 CEST 2006
Revision: 22683
Author: eriktorbjorn
Date: 2006-05-27 06:33:27 -0700 (Sat, 27 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22683&view=rev
Log Message:
-----------
Maintain the same screen update frequency while waiting for speech to finish.
This should take care of half of bug #1494934. The other half was fixed in the
SDL backend earlier.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/text.cpp
Modified: scummvm/trunk/engines/kyra/text.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text.cpp 2006-05-27 13:17:19 UTC (rev 22682)
+++ scummvm/trunk/engines/kyra/text.cpp 2006-05-27 13:33:27 UTC (rev 22683)
@@ -38,7 +38,6 @@
bool runLoop = true;
uint8 currPage;
OSystem::Event event;
- int16 delayTime;
//while( towns_isEscKeyPressed() )
//towns_getKey();
@@ -106,30 +105,35 @@
if ((chatDuration < (int16)(_system->getMillis() - timeAtStart)) && chatDuration != -1)
break;
- while (_system->pollEvent(event)) {
- switch (event.type) {
- case OSystem::EVENT_KEYDOWN:
- if (event.kbd.keycode == '.')
- _skipFlag = true;
- break;
- case OSystem::EVENT_QUIT:
- quitGame();
- runLoop = false;
- break;
- case OSystem::EVENT_LBUTTONDOWN:
- runLoop = false;
- break;
- default:
- break;
+ uint32 nextTime = loopStart + _gameSpeed;
+
+ while (_system->getMillis() < nextTime) {
+ while (_system->pollEvent(event)) {
+ switch (event.type) {
+ case OSystem::EVENT_KEYDOWN:
+ if (event.kbd.keycode == '.')
+ _skipFlag = true;
+ break;
+ case OSystem::EVENT_QUIT:
+ quitGame();
+ runLoop = false;
+ break;
+ case OSystem::EVENT_LBUTTONDOWN:
+ runLoop = false;
+ break;
+ default:
+ break;
+ }
}
+
+ if (nextTime - _system->getMillis() >= 10) {
+ _system->delayMillis(10);
+ _system->updateScreen();
+ }
}
-
+
if (_skipFlag)
runLoop = false;
-
- delayTime = (loopStart + _gameSpeed) - _system->getMillis();
- if (delayTime > 0)
- _system->delayMillis(delayTime);
}
enableTimer(14);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list