mirror of
https://github.com/yawut/SDL.git
synced 2026-08-23 17:25:26 -05:00
Fixed so the origin of the touch events is the upper left.
This commit is contained in:
@@ -330,9 +330,13 @@ static __inline__ void ConvertNSRect(NSRect *r)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_FingerID fingerId = (SDL_FingerID)[touch identity];
|
||||
float x = [touch normalizedPosition].x;
|
||||
float y = [touch normalizedPosition].y;
|
||||
SDL_FingerID fingerId = (SDL_FingerID)[touch identity];
|
||||
/* Make the origin the upper left instead of the lower left */
|
||||
y = 1.0f - y;
|
||||
|
||||
switch (type) {
|
||||
case COCOA_TOUCH_DOWN:
|
||||
SDL_SendFingerDown(touchId, fingerId, SDL_TRUE, x, y, 1);
|
||||
|
||||
Reference in New Issue
Block a user