mirror of
https://github.com/yawut/SDL.git
synced 2026-07-08 12:44:32 -05:00
wiiu/joystick: Fix touch holding detection
This commit is contained in:
parent
af4d033d21
commit
48e2bcd73a
|
|
@ -465,10 +465,12 @@ static void WIIU_JoystickUpdate(SDL_Joystick *joystick)
|
|||
/* touchscreen */
|
||||
VPADGetTPCalibratedPoint(VPAD_CHAN_0, &tpdata, &vpad.tpNormal);
|
||||
if (tpdata.touched) {
|
||||
/* Send an initial touch */
|
||||
SDL_SendTouch(0, 0, NULL, SDL_TRUE,
|
||||
(float) tpdata.x / 1280.0f,
|
||||
(float) tpdata.y / 720.0f, 1);
|
||||
if (!last_touched) {
|
||||
/* Send an initial touch */
|
||||
SDL_SendTouch(0, 0, NULL, SDL_TRUE,
|
||||
(float) tpdata.x / 1280.0f,
|
||||
(float) tpdata.y / 720.0f, 1);
|
||||
}
|
||||
|
||||
/* Always send the motion */
|
||||
SDL_SendTouchMotion(0, 0, NULL,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user