From b45640c47b97c36442d01c35e73b4cae9ad5648e Mon Sep 17 00:00:00 2001 From: dhewg Date: Wed, 6 Apr 2011 15:21:31 +0200 Subject: [PATCH] ANDROID: Fix off-by-one when clipping mouse coords --- backends/platform/android/events.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp index ccb18dde89f..ed825dbc9c4 100644 --- a/backends/platform/android/events.cpp +++ b/backends/platform/android/events.cpp @@ -251,8 +251,8 @@ void OSystem_Android::clipMouse(Common::Point &p) { else tex = _game_texture; - p.x = CLIP(p.x, int16(0), int16(tex->width())); - p.y = CLIP(p.y, int16(0), int16(tex->height())); + p.x = CLIP(p.x, int16(0), int16(tex->width() - 1)); + p.y = CLIP(p.y, int16(0), int16(tex->height() - 1)); } void OSystem_Android::scaleMouse(Common::Point &p, int x, int y,