Don't call -[NSView setAcceptsTouchEvents] if the OS doesn't provide it.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 09 Dec 2011 02:32:21 -0500
changeset 6108 f3c34d321289
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
--- a/src/video/cocoa/SDL_cocoawindow.m	Wed Dec 07 20:34:43 2011 -0500
+++ b/src/video/cocoa/SDL_cocoawindow.m	Fri Dec 09 02:32:21 2011 -0500
@@ -69,8 +69,11 @@
     [window setAcceptsMouseMovedEvents:YES];
 
     [view setNextResponder:self];
+
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
-    [view setAcceptsTouchEvents:YES];
+    if ([view respondsToSelector:@selector(setAcceptsTouchEvents:)]) {
+        [view setAcceptsTouchEvents:YES];
+    }
 #endif
 }