Skip to content

Commit

Permalink
Android: Fixed creating mouse coordinates which are not needed if hin…
Browse files Browse the repository at this point in the history
…t is set.
  • Loading branch information
philippwiesemann committed Apr 8, 2015
1 parent b473d30 commit 458b94d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/android/SDL_androidtouch.c
Expand Up @@ -108,8 +108,8 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio
switch (action) {
case ACTION_DOWN:
/* Primary pointer down */
Android_GetWindowCoordinates(x, y, &window_x, &window_y);
if (!separate_mouse_and_touch) {
Android_GetWindowCoordinates(x, y, &window_x, &window_y);
/* send moved event */
SDL_SendMouseMotion(Android_Window, SDL_TOUCH_MOUSEID, 0, window_x, window_y);
/* send mouse down event */
Expand All @@ -123,8 +123,8 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio

case ACTION_MOVE:
if (!pointerFingerID) {
Android_GetWindowCoordinates(x, y, &window_x, &window_y);
if (!separate_mouse_and_touch) {
Android_GetWindowCoordinates(x, y, &window_x, &window_y);
/* send moved event */
SDL_SendMouseMotion(Android_Window, SDL_TOUCH_MOUSEID, 0, window_x, window_y);
}
Expand Down

0 comments on commit 458b94d

Please sign in to comment.