Don't call -[NSView setAcceptsTouchEvents] if the OS doesn't provide it.
authorRyan C. Gordon
Fri, 09 Dec 2011 02:32:21 -0500
changeset 6108f3c34d321289
parent 6107 07fb0ac6886a
child 6113 64742b8c8eb3
Don't call -[NSView setAcceptsTouchEvents] if the OS doesn't provide it.

Thanks to Dimiter 'malkia' Stanev for the fix!
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Wed Dec 07 20:34:43 2011 -0500
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Fri Dec 09 02:32:21 2011 -0500
     1.3 @@ -69,8 +69,11 @@
     1.4      [window setAcceptsMouseMovedEvents:YES];
     1.5  
     1.6      [view setNextResponder:self];
     1.7 +
     1.8  #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     1.9 -    [view setAcceptsTouchEvents:YES];
    1.10 +    if ([view respondsToSelector:@selector(setAcceptsTouchEvents:)]) {
    1.11 +        [view setAcceptsTouchEvents:YES];
    1.12 +    }
    1.13  #endif
    1.14  }
    1.15