mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 23:07:45 +08:00
Backed out Vita touch ID change for SDL2
0 is still a valid touch ID in SDL2 and shouldn't be changed at this point
This commit is contained in:
@@ -70,8 +70,8 @@ void VITA_InitTouch(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Support passing both front and back touch devices in events
|
// Support passing both front and back touch devices in events
|
||||||
SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_DIRECT, "Front");
|
SDL_AddTouch((SDL_TouchID)0, SDL_TOUCH_DEVICE_DIRECT, "Front");
|
||||||
SDL_AddTouch((SDL_TouchID)2, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back");
|
SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back");
|
||||||
}
|
}
|
||||||
|
|
||||||
void VITA_QuitTouch(void)
|
void VITA_QuitTouch(void)
|
||||||
@@ -123,7 +123,7 @@ void VITA_PollTouch(void)
|
|||||||
// Skip if finger was already previously down
|
// Skip if finger was already previously down
|
||||||
if (!finger_down) {
|
if (!finger_down) {
|
||||||
// Send an initial touch
|
// Send an initial touch
|
||||||
SDL_SendTouch((SDL_TouchID)(port + 1),
|
SDL_SendTouch((SDL_TouchID)port,
|
||||||
finger_id,
|
finger_id,
|
||||||
Vita_Window,
|
Vita_Window,
|
||||||
SDL_TRUE,
|
SDL_TRUE,
|
||||||
@@ -133,7 +133,7 @@ void VITA_PollTouch(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Always send the motion
|
// Always send the motion
|
||||||
SDL_SendTouchMotion((SDL_TouchID)(port + 1),
|
SDL_SendTouchMotion((SDL_TouchID)port,
|
||||||
finger_id,
|
finger_id,
|
||||||
Vita_Window,
|
Vita_Window,
|
||||||
x,
|
x,
|
||||||
@@ -160,7 +160,7 @@ void VITA_PollTouch(void)
|
|||||||
VITA_ConvertTouchXYToSDLXY(&x, &y, touch_old[port].report[i].x, touch_old[port].report[i].y, port);
|
VITA_ConvertTouchXYToSDLXY(&x, &y, touch_old[port].report[i].x, touch_old[port].report[i].y, port);
|
||||||
finger_id = (SDL_FingerID)touch_old[port].report[i].id;
|
finger_id = (SDL_FingerID)touch_old[port].report[i].id;
|
||||||
// Finger released from screen
|
// Finger released from screen
|
||||||
SDL_SendTouch((SDL_TouchID)(port + 1),
|
SDL_SendTouch((SDL_TouchID)port,
|
||||||
finger_id,
|
finger_id,
|
||||||
Vita_Window,
|
Vita_Window,
|
||||||
SDL_FALSE,
|
SDL_FALSE,
|
||||||
|
|||||||
Reference in New Issue
Block a user