wiiu/joystick: Fix touch holding detection

This commit is contained in:
GaryOderNichts 2023-04-05 18:14:19 +02:00 committed by Dave Murphy
parent af4d033d21
commit 48e2bcd73a
No known key found for this signature in database
GPG Key ID: F7FD5492264BB9D0

View File

@ -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,