src/video/windows/SDL_windowsopengl.c
changeset 6383 869effc44c41
parent 6382 64d54101773a
child 6393 a773384edf20
     1.1 --- a/src/video/windows/SDL_windowsopengl.c	Wed Aug 01 20:29:36 2012 -0400
     1.2 +++ b/src/video/windows/SDL_windowsopengl.c	Wed Aug 01 20:57:03 2012 -0400
     1.3 @@ -611,26 +611,29 @@
     1.4  int
     1.5  WIN_GL_SetSwapInterval(_THIS, int interval)
     1.6  {
     1.7 +    int retval = -1;
     1.8      if ((interval < 0) && (!_this->gl_data->HAS_WGL_EXT_swap_control_tear)) {
     1.9          SDL_SetError("Negative swap interval unsupported in this GL");
    1.10      } else if (_this->gl_data->wglSwapIntervalEXT) {
    1.11 -        _this->gl_data->wglSwapIntervalEXT(interval);
    1.12 -        return 0;
    1.13 +        if (_this->gl_data->wglSwapIntervalEXT(interval) == TRUE) {
    1.14 +            retval = 0;
    1.15 +        } else {
    1.16 +            WIN_SetError("wglSwapIntervalEXT()");
    1.17 +        }
    1.18      } else {
    1.19          SDL_Unsupported();
    1.20 -        return -1;
    1.21      }
    1.22 +    return retval;
    1.23  }
    1.24  
    1.25  int
    1.26  WIN_GL_GetSwapInterval(_THIS)
    1.27  {
    1.28 +    int retval = 0;
    1.29      if (_this->gl_data->wglGetSwapIntervalEXT) {
    1.30 -        return _this->gl_data->wglGetSwapIntervalEXT();
    1.31 -    } else {
    1.32 -        /*SDL_Unsupported();*/
    1.33 -        return 0;  /* just say we're unsync'd. */
    1.34 +        retval = _this->gl_data->wglGetSwapIntervalEXT();
    1.35      }
    1.36 +    return retval;
    1.37  }
    1.38  
    1.39  void