From 4b6e5e7b06c758d2c6738efaff5dceaaacfed214 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sun, 13 Mar 2011 23:45:52 +0100 Subject: ANDROID: Clip mouse coordinates --- backends/platform/android/android.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 9374a876d9..4d83dd789e 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -526,6 +526,11 @@ bool OSystem_Android::pollEvent(Common::Event &event) { r.height()); event.mouse.x -= _shake_offset; + + event.mouse.x = CLIP(event.mouse.x, int16(0), + int16(_game_texture->width())); + event.mouse.y = CLIP(event.mouse.y, int16(0), + int16(_game_texture->height())); } } break; -- cgit v1.2.3