# HG changeset patch # User Sam Lantinga # Date 1281744306 25200 # Node ID 257bdf117af801d05f01ba6ac9e134848572dfbe # Parent 463cd74304b913be63b495d7e3155a8588737ca5 Fixed so the origin of the touch events is the upper left. diff -r 463cd74304b9 -r 257bdf117af8 src/video/cocoa/SDL_cocoawindow.m --- a/src/video/cocoa/SDL_cocoawindow.m Sat Aug 07 11:35:24 2010 -0400 +++ b/src/video/cocoa/SDL_cocoawindow.m Fri Aug 13 17:05:06 2010 -0700 @@ -330,9 +330,13 @@ 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);