SDL_GetTouchFingers() follows the SDL_GetStringRule

This commit is contained in:
Sam Lantinga
2024-07-19 12:39:34 -07:00
parent 975457cfb6
commit 0079b6d45f
4 changed files with 10 additions and 10 deletions

View File

@@ -1735,11 +1735,11 @@ static int Cocoa_SendMouseButtonClicks(SDL_Mouse *mouse, NSEvent *theEvent, SDL_
}
if (existingTouchCount == 0) {
int numFingers;
SDL_Finger **fingers = SDL_GetTouchFingers(touchID, &numFingers);
const SDL_Finger * const *fingers = SDL_GetTouchFingers(touchID, &numFingers);
if (fingers) {
DLog("Reset Lost Fingers: %d", numFingers);
for (--numFingers; numFingers >= 0; --numFingers) {
SDL_Finger *finger = fingers[numFingers];
const SDL_Finger *finger = fingers[numFingers];
/* trackpad touches have no window. If we really wanted one we could
* use the window that has mouse or keyboard focus.
* Sending a null window currently also prevents synthetic mouse
@@ -1748,7 +1748,6 @@ static int Cocoa_SendMouseButtonClicks(SDL_Mouse *mouse, NSEvent *theEvent, SDL_
SDL_Window *window = NULL;
SDL_SendTouch(Cocoa_GetEventTimestamp([theEvent timestamp]), touchID, finger->id, window, SDL_FALSE, 0, 0, 0);
}
SDL_free(fingers);
}
}