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

View file

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

View file

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