Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Cleanups to Windows WGL_EXT_swap_control_tear code.
  • Loading branch information
icculus committed Aug 2, 2012
1 parent e5c2fb9 commit c7c5d978ea5b16e4078e573ee7393ef01b9ce776
Showing with 10 additions and 7 deletions.
  1. +10 −7 src/video/windows/SDL_windowsopengl.c
@@ -611,26 +611,29 @@ WIN_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
int
WIN_GL_SetSwapInterval(_THIS, int interval)
{
int retval = -1;
if ((interval < 0) && (!_this->gl_data->HAS_WGL_EXT_swap_control_tear)) {
SDL_SetError("Negative swap interval unsupported in this GL");
} else if (_this->gl_data->wglSwapIntervalEXT) {
_this->gl_data->wglSwapIntervalEXT(interval);
return 0;
if (_this->gl_data->wglSwapIntervalEXT(interval) == TRUE) {
retval = 0;
} else {
WIN_SetError("wglSwapIntervalEXT()");
}
} else {
SDL_Unsupported();
return -1;
}
return retval;
}

int
WIN_GL_GetSwapInterval(_THIS)
{
int retval = 0;
if (_this->gl_data->wglGetSwapIntervalEXT) {
return _this->gl_data->wglGetSwapIntervalEXT();
} else {
/*SDL_Unsupported();*/
return 0; /* just say we're unsync'd. */
retval = _this->gl_data->wglGetSwapIntervalEXT();
}
return retval;
}

void

0 comments on commit c7c5d97

Please sign in to comment.