Don't incorrectly report success for negative swap intervals on Mac OS X.

This commit is contained in:
Ryan C. Gordon 2013-09-14 01:30:57 -04:00
parent fae4190dca
commit bfe1b1d066
1 changed files with 4 additions and 0 deletions

View File

@ -302,6 +302,10 @@ Cocoa_GL_SetSwapInterval(_THIS, int interval)
GLint value; GLint value;
int status; 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]; pool = [[NSAutoreleasePool alloc] init];
nscontext = (NSOpenGLContext*)SDL_GL_GetCurrentContext(); nscontext = (NSOpenGLContext*)SDL_GL_GetCurrentContext();