aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorChris Apers2007-01-21 14:18:24 +0000
committerChris Apers2007-01-21 14:18:24 +0000
commitaed4ae10a78320d847542b18c10498ae1cd4567e (patch)
tree182991f0cd398752517a0c0dcf5473d828f6d793 /backends
parentdd03b8f84b50fd466f4543cd6e9d54518d3c3f17 (diff)
downloadscummvm-rg350-aed4ae10a78320d847542b18c10498ae1cd4567e.tar.gz
scummvm-rg350-aed4ae10a78320d847542b18c10498ae1cd4567e.tar.bz2
scummvm-rg350-aed4ae10a78320d847542b18c10498ae1cd4567e.zip
Speed up mouse emulation with hires games
svn-id: r25148
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/PalmOS/Src/base_mouse.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/platform/PalmOS/Src/base_mouse.cpp b/backends/platform/PalmOS/Src/base_mouse.cpp
index 691d66605f..8e6d2724cb 100644
--- a/backends/platform/PalmOS/Src/base_mouse.cpp
+++ b/backends/platform/PalmOS/Src/base_mouse.cpp
@@ -45,17 +45,19 @@ bool OSystem_PalmBase::showMouse(bool visible) {
void OSystem_PalmBase::simulate_mouse(Event &event, Int8 iHoriz, Int8 iVert, Coord *xr, Coord *yr) {
Int16 x = _mouseCurState.x;
Int16 y = _mouseCurState.y;
- Int16 slow;
+ Int16 slow, fact;
_lastKeyRepeat++;
+ fact = _screenWidth / 320;
+ fact = (fact) ? fact : 1;
- if (_lastKeyRepeat > 32)
- _lastKeyRepeat = 32;
+ if (_lastKeyRepeat > 32 * fact)
+ _lastKeyRepeat = 32 * fact;
slow = (iHoriz && iVert) ? 2 : 1;
- x += iHoriz * (_lastKeyRepeat >> 2) / slow;
- y += iVert * (_lastKeyRepeat >> 2) / slow;
+ x += iHoriz * (_lastKeyRepeat >> 2) / slow * fact;
+ y += iVert * (_lastKeyRepeat >> 2) / slow * fact;
x = (x < 0 ) ? 0 : x;
x = (x >= _screenWidth ) ? _screenWidth - 1 : x;