Commit c26da073 authored by Sam Lantinga's avatar Sam Lantinga

Fixed so the origin of the touch events is the upper left.

parent ef04c29f
...@@ -330,9 +330,13 @@ static __inline__ void ConvertNSRect(NSRect *r) ...@@ -330,9 +330,13 @@ static __inline__ void ConvertNSRect(NSRect *r)
return; return;
} }
} }
SDL_FingerID fingerId = (SDL_FingerID)[touch identity];
float x = [touch normalizedPosition].x; float x = [touch normalizedPosition].x;
float y = [touch normalizedPosition].y; 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) { switch (type) {
case COCOA_TOUCH_DOWN: case COCOA_TOUCH_DOWN:
SDL_SendFingerDown(touchId, fingerId, SDL_TRUE, x, y, 1); SDL_SendFingerDown(touchId, fingerId, SDL_TRUE, x, y, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment