aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-03-13 23:45:52 +0100
committerdhewg2011-03-13 23:45:52 +0100
commit4b6e5e7b06c758d2c6738efaff5dceaaacfed214 (patch)
tree5e3129537b6029df937722d46b48803caa7f6f54
parentf82121d2a279693f47a25e30e36c34e1e0ff21bd (diff)
downloadscummvm-rg350-4b6e5e7b06c758d2c6738efaff5dceaaacfed214.tar.gz
scummvm-rg350-4b6e5e7b06c758d2c6738efaff5dceaaacfed214.tar.bz2
scummvm-rg350-4b6e5e7b06c758d2c6738efaff5dceaaacfed214.zip
ANDROID: Clip mouse coordinates
-rw-r--r--backends/platform/android/android.cpp5
1 files changed, 5 insertions, 0 deletions
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;