From 38df43fe55a699b491e8e716762abea8b779cd92 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 11 Jan 2016 01:46:28 +0200 Subject: LAB: Prevent excessive screen updates when checking for events --- engines/lab/dispman.cpp | 1 + engines/lab/eventman.cpp | 4 ---- engines/lab/lab.cpp | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 17623d4f08..41f51ddbed 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -404,6 +404,7 @@ void DisplayMan::drawHLine(uint16 x1, uint16 y, uint16 x2, byte color) { void DisplayMan::screenUpdate() { _vm->_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight); + _vm->_console->onFrame(); _vm->_system->updateScreen(); _vm->_event->processInput(); diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp index f9b3d2f388..969cb8d8ce 100644 --- a/engines/lab/eventman.cpp +++ b/engines/lab/eventman.cpp @@ -185,10 +185,6 @@ void EventManager::processInput() { break; } } - - _vm->_system->copyRectToScreen(_vm->_graphics->_displayBuffer, _vm->_graphics->_screenWidth, 0, 0, _vm->_graphics->_screenWidth, _vm->_graphics->_screenHeight); - _vm->_console->onFrame(); - _vm->_system->updateScreen(); } Common::Point EventManager::updateAndGetMousePos() { diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 47b864d98b..d94c8bfeae 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -225,10 +225,8 @@ void LabEngine::changeVolume(int delta) { } void LabEngine::waitTOF() { - _system->copyRectToScreen(_graphics->_displayBuffer, _graphics->_screenWidth, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight); - _system->updateScreen(); - _event->processInput(); + _graphics->screenUpdate(); uint32 now; -- cgit v1.2.3