From bfe1b1d0663e2047c0d1b88635fd57c721053eea Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 14 Sep 2013 01:30:57 -0400 Subject: [PATCH] Don't incorrectly report success for negative swap intervals on Mac OS X. --- src/video/cocoa/SDL_cocoaopengl.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m index 33d5393782185..93d0b2ad22f98 100644 --- a/src/video/cocoa/SDL_cocoaopengl.m +++ b/src/video/cocoa/SDL_cocoaopengl.m @@ -302,6 +302,10 @@ - (void)setWindow:(SDL_Window *)newWindow 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();