ACCESS: Don't decrease timers whilst text dialogs are showing

This commit is contained in:
Paul Gilbert 2014-11-28 14:16:10 -05:00
parent abecac94d4
commit eeb9d63a19
3 changed files with 12 additions and 10 deletions

View File

@ -120,9 +120,9 @@ bool EventsManager::isCursorVisible() {
return CursorMan.isVisible();
}
void EventsManager::pollEvents() {
void EventsManager::pollEvents(bool skipTimers) {
if (checkForNextFrameCounter()) {
nextFrame();
nextFrame(skipTimers);
}
_wheelUp = _wheelDown = false;
@ -200,10 +200,12 @@ bool EventsManager::checkForNextFrameCounter() {
return false;
}
void EventsManager::nextFrame() {
// Update timers
_vm->_animation->updateTimers();
_vm->_timers.updateTimers();
void EventsManager::nextFrame(bool skipTimers) {
if (skipTimers) {
// Update timers
_vm->_animation->updateTimers();
_vm->_timers.updateTimers();
}
// Give time to the debugger
_vm->_debugger->onFrame();
@ -243,7 +245,7 @@ void EventsManager::clearEvents() {
void EventsManager::waitKeyMouse() {
while (!_vm->shouldQuit() && !_leftButton && _keypresses.size() == 0) {
pollEvents();
pollEvents(true);
g_system->delayMillis(10);
}

View File

@ -47,7 +47,7 @@ private:
uint32 _frameCounter;
uint32 _priorFrameTime;
Graphics::Surface _invCursor;
void nextFrame();
void nextFrame(bool skipTimers);
public:
CursorType _cursorId;
CursorType _normalMouse;
@ -105,7 +105,7 @@ public:
*/
bool isCursorVisible();
void pollEvents();
void pollEvents(bool skipTimers = false);
void pollEventsAndWait();

View File

@ -213,7 +213,7 @@ void Scripts::printString(const Common::String &msg) {
// Wait until the bubble display is expired
while (!_vm->shouldQuit() && _vm->_timers[PRINT_TIMER]._flag) {
_vm->_events->pollEvents();
_vm->_events->pollEvents(true);
}
// Restore the original screen over the text bubble