Skip to content

Commit

Permalink
ANDROID: Clip mouse coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
dhewg committed Mar 13, 2011
1 parent f82121d commit 4b6e5e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backends/platform/android/android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4b6e5e7

Please sign in to comment.