aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Apers2005-03-11 10:42:00 +0000
committerChris Apers2005-03-11 10:42:00 +0000
commitc75753c821ae9506fcfa6ad69fcd05f28f2ddce6 (patch)
tree45173ba503c383f95825e7a98fd77edf53db330d
parent28edee23808f8bda65c81d389ac25e2f054d94b4 (diff)
downloadscummvm-rg350-c75753c821ae9506fcfa6ad69fcd05f28f2ddce6.tar.gz
scummvm-rg350-c75753c821ae9506fcfa6ad69fcd05f28f2ddce6.tar.bz2
scummvm-rg350-c75753c821ae9506fcfa6ad69fcd05f28f2ddce6.zip
PalmOS and windows CE need to convert mouse coordinates with mouse buttons too
svn-id: r17074
-rw-r--r--scumm/input.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/scumm/input.cpp b/scumm/input.cpp
index 8eeb342162..5120c0891d 100644
--- a/scumm/input.cpp
+++ b/scumm/input.cpp
@@ -144,6 +144,12 @@ void ScummEngine::parseEvents() {
#if defined(_WIN32_WCE) || defined(__PALM_OS__)
_mouse.x = event.mouse.x;
_mouse.y = event.mouse.y;
+
+ if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
+ _mouse.x -= (Common::kHercW - _screenWidth * 2) / 2;
+ _mouse.x /= 2;
+ _mouse.y = _mouse.y * 4 / 7;
+ }
#endif
break;
@@ -152,6 +158,12 @@ void ScummEngine::parseEvents() {
#if defined(_WIN32_WCE) || defined(__PALM_OS__)
_mouse.x = event.mouse.x;
_mouse.y = event.mouse.y;
+
+ if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
+ _mouse.x -= (Common::kHercW - _screenWidth * 2) / 2;
+ _mouse.x /= 2;
+ _mouse.y = _mouse.y * 4 / 7;
+ }
#endif
break;