Sfoglia il codice sorgente

SDL_vitatouch.c: re-enable front touch on Vita

(cherry picked from commit 6dcf75710caac15dfad09a83c1c7758f6232a93a)
rsn8887 5 mesi fa
parent
commit
11ffdd3abc
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/video/vita/SDL_vitatouch.c

+ 3 - 3
src/video/vita/SDL_vitatouch.c

@@ -123,7 +123,7 @@ void VITA_PollTouch(void)
                 // Skip if finger was already previously down
                 if (!finger_down) {
                     // Send an initial touch
-                    SDL_SendTouch((SDL_TouchID)port,
+                    SDL_SendTouch((SDL_TouchID)(port + 1),
                                   finger_id,
                                   Vita_Window,
                                   SDL_TRUE,
@@ -133,7 +133,7 @@ void VITA_PollTouch(void)
                 }
 
                 // Always send the motion
-                SDL_SendTouchMotion((SDL_TouchID)port,
+                SDL_SendTouchMotion((SDL_TouchID)(port + 1),
                                     finger_id,
                                     Vita_Window,
                                     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);
                     finger_id = (SDL_FingerID)touch_old[port].report[i].id;
                     // Finger released from screen
-                    SDL_SendTouch((SDL_TouchID)port,
+                    SDL_SendTouch((SDL_TouchID)(port + 1),
                                   finger_id,
                                   Vita_Window,
                                   SDL_FALSE,