Mac: Trigger SDL_FINGERUP for all touches.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Tue, 14 Jan 2014 17:33:24 -0800
changeset 81064e3e41b2cbfb
parent 8105 f74bf1bbe472
child 8107 faed2556c828
Mac: Trigger SDL_FINGERUP for all touches.

Fixes bug #2348. Thanks to Alex Szpakowski for the patch!
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Tue Jan 14 21:29:38 2014 -0300
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Tue Jan 14 17:33:24 2014 -0800
     1.3 @@ -699,8 +699,10 @@
     1.4              touches = [event touchesMatchingPhase:NSTouchPhaseBegan inView:nil];
     1.5              break;
     1.6          case COCOA_TOUCH_UP:
     1.7 +            touches = [event touchesMatchingPhase:NSTouchPhaseEnded inView:nil];
     1.8 +            break;
     1.9          case COCOA_TOUCH_CANCELLED:
    1.10 -            touches = [event touchesMatchingPhase:NSTouchPhaseEnded inView:nil];
    1.11 +            touches = [event touchesMatchingPhase:NSTouchPhaseCancelled inView:nil];
    1.12              break;
    1.13          case COCOA_TOUCH_MOVE:
    1.14              touches = [event touchesMatchingPhase:NSTouchPhaseMoved inView:nil];