aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2016-01-11 01:46:28 +0200
committerFilippos Karapetis2016-01-11 01:50:10 +0200
commit38df43fe55a699b491e8e716762abea8b779cd92 (patch)
tree396c2e706909b0d8e8dea1906b4d3a8d651b926e /engines
parent6d2dca8cdd3eb8c847aac5e2ee5d050c1de741a6 (diff)
downloadscummvm-rg350-38df43fe55a699b491e8e716762abea8b779cd92.tar.gz
scummvm-rg350-38df43fe55a699b491e8e716762abea8b779cd92.tar.bz2
scummvm-rg350-38df43fe55a699b491e8e716762abea8b779cd92.zip
LAB: Prevent excessive screen updates when checking for events
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/dispman.cpp1
-rw-r--r--engines/lab/eventman.cpp4
-rw-r--r--engines/lab/lab.cpp4
3 files changed, 2 insertions, 7 deletions
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;