From c75753c821ae9506fcfa6ad69fcd05f28f2ddce6 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 11 Mar 2005 10:42:00 +0000 Subject: PalmOS and windows CE need to convert mouse coordinates with mouse buttons too svn-id: r17074 --- scumm/input.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; -- cgit v1.2.3