aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorGregory Montoir2005-10-13 18:48:33 +0000
committerGregory Montoir2005-10-13 18:48:33 +0000
commit66fbe2d3c42355d714fd1cd638323f367de4c329 (patch)
treed79726d83ed528c6ccb83d94ac21318666deb22d /queen
parentce2e9ab9d8a814f2356371b941ddb7e83d387427 (diff)
downloadscummvm-rg350-66fbe2d3c42355d714fd1cd638323f367de4c329.tar.gz
scummvm-rg350-66fbe2d3c42355d714fd1cd638323f367de4c329.tar.bz2
scummvm-rg350-66fbe2d3c42355d714fd1cd638323f367de4c329.zip
Some cleanup. Updated mouse position on EVENT_RBUTTONDOWN for WinCE and PalmOS, does it help bug #1293385 ?
svn-id: r19065
Diffstat (limited to 'queen')
-rw-r--r--queen/input.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/queen/input.cpp b/queen/input.cpp
index 39e246ad89..c54bc0d8eb 100644
--- a/queen/input.cpp
+++ b/queen/input.cpp
@@ -83,17 +83,12 @@ void Input::delay() {
}
void Input::delay(uint amount) {
-
- OSystem::Event event;
-
- uint32 start = _system->getMillis();
- uint32 cur = start;
-
if (_idleTime < DELAY_SCREEN_BLANKER) {
_idleTime += amount;
}
-
+ uint32 end = _system->getMillis() + amount;
do {
+ OSystem::Event event;
while (_system->pollEvent(event)) {
_idleTime = 0;
switch (event.type) {
@@ -124,6 +119,10 @@ void Input::delay(uint amount) {
case OSystem::EVENT_RBUTTONDOWN:
_mouseButton |= MOUSE_RBUTTON;
+#if defined(_WIN32_WCE) || defined(__PALM_OS__)
+ _mouse_x = event.mouse.x;
+ _mouse_y = event.mouse.y;
+#endif
break;
case OSystem::EVENT_QUIT:
@@ -139,13 +138,9 @@ void Input::delay(uint amount) {
if (amount == 0)
break;
- uint this_delay = 20; // 1?
- if (this_delay > amount)
- this_delay = amount;
- _system->delayMillis(this_delay);
+ _system->delayMillis((amount > 20) ? 20 : amount);
#endif
- cur = _system->getMillis();
- } while (cur < start + amount);
+ } while (_system->getMillis() < end);
}
int Input::checkKeys() {