Don't incorrectly report success for negative swap intervals on Mac OS X.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 14 Sep 2013 01:30:57 -0400
changeset 7743 360acf8c1526
parent 7742 84e32c3d415c
child 7744 6a145dedc972
Don't incorrectly report success for negative swap intervals on Mac OS X.
src/video/cocoa/SDL_cocoaopengl.m
--- a/src/video/cocoa/SDL_cocoaopengl.m	Fri Sep 13 17:42:46 2013 -0700
+++ b/src/video/cocoa/SDL_cocoaopengl.m	Sat Sep 14 01:30:57 2013 -0400
@@ -302,6 +302,10 @@
     GLint value;
     int status;
 
+    if (interval < 0) {  /* no extension for this on Mac OS X at the moment. */
+        return SDL_SetError("Late swap tearing currently unsupported");
+    }
+
     pool = [[NSAutoreleasePool alloc] init];
 
     nscontext = (NSOpenGLContext*)SDL_GL_GetCurrentContext();