aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-04-18 03:15:34 +0000
committerTorbjörn Andersson2009-04-18 03:15:34 +0000
commit5cd22613822797a7405ae60c35a7ccae4196b9b1 (patch)
tree7e7994649f6382ab8f61ac892be0a30ff4a5ef78 /engines/kyra
parent3deae9fc8b34fbcfed3c7fa7c99c1cb6491a05d3 (diff)
downloadscummvm-rg350-5cd22613822797a7405ae60c35a7ccae4196b9b1.tar.gz
scummvm-rg350-5cd22613822797a7405ae60c35a7ccae4196b9b1.tar.bz2
scummvm-rg350-5cd22613822797a7405ae60c35a7ccae4196b9b1.zip
We probably only have to update the screen once every updateInfo(). And, since
it's triggered by mouse movements, only when the cursor is visible. svn-id: r39975
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/kyra_v1.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index ee184af0f4..2c002585c5 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -375,6 +375,8 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop) {
void KyraEngine_v1::updateInput() {
Common::Event event;
+ bool updateScreen = false;
+
while (_eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN:
@@ -395,7 +397,8 @@ void KyraEngine_v1::updateInput() {
break;
case Common::EVENT_MOUSEMOVE:
- screen()->updateScreen();
+ if (screen()->isMouseVisible())
+ updateScreen = true;
// fall through
case Common::EVENT_LBUTTONUP:
@@ -409,6 +412,9 @@ void KyraEngine_v1::updateInput() {
break;
}
}
+
+ if (updateScreen)
+ screen()->updateScreen();
}
void KyraEngine_v1::removeInputTop() {