diff options
author | Sylvain Becker <sylvain.becker@gmail.com> | 2019-04-03 10:14:42 +0200 |
---|---|---|
committer | Sylvain Becker <sylvain.becker@gmail.com> | 2019-04-03 10:14:42 +0200 |
commit | 4bca20c8553a777bc4365d4ecf5c32fd021a6650 (patch) | |
tree | e29c763c7507dfe2777e68840d3eeee52dfc4f04 | |
parent | f96e4a9cb4c092d8ddb86eb3330ca62c1bba225e (diff) |
Bug 4576: fix wrong scaling
-rw-r--r-- | src/events/SDL_touch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events/SDL_touch.c b/src/events/SDL_touch.c index 9c6bbfafd5..0d227b4699 100644 --- a/src/events/SDL_touch.c +++ b/src/events/SDL_touch.c @@ -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); @@ -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); } } |