Skip to content

Commit

Permalink
Bug 4576: fix wrong scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Apr 3, 2019
1 parent 236b860 commit e39c0a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/SDL_touch.c
Expand Up @@ -254,7 +254,7 @@ SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid,
if (down) {
if (finger_touching == SDL_FALSE) {
int pos_x = (int)(x * (float)window->w);
int pos_y = (int)(y * (float)window->y);
int pos_y = (int)(y * (float)window->h);
finger_touching = SDL_TRUE;
first_finger = fingerid;
SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, pos_x, pos_y);
Expand Down Expand Up @@ -340,7 +340,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid,
if (window) {
if (finger_touching == SDL_TRUE && first_finger == fingerid) {
int pos_x = (int)(x * (float)window->w);
int pos_y = (int)(y * (float)window->y);
int pos_y = (int)(y * (float)window->h);
SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, pos_x, pos_y);
}
}
Expand Down

0 comments on commit e39c0a1

Please sign in to comment.