src/video/windows/SDL_windowsopengl.c
changeset 6383 869effc44c41
parent 6382 64d54101773a
child 6393 a773384edf20
equal deleted inserted replaced
6382:64d54101773a 6383:869effc44c41
   609 }
   609 }
   610 
   610 
   611 int
   611 int
   612 WIN_GL_SetSwapInterval(_THIS, int interval)
   612 WIN_GL_SetSwapInterval(_THIS, int interval)
   613 {
   613 {
       
   614     int retval = -1;
   614     if ((interval < 0) && (!_this->gl_data->HAS_WGL_EXT_swap_control_tear)) {
   615     if ((interval < 0) && (!_this->gl_data->HAS_WGL_EXT_swap_control_tear)) {
   615         SDL_SetError("Negative swap interval unsupported in this GL");
   616         SDL_SetError("Negative swap interval unsupported in this GL");
   616     } else if (_this->gl_data->wglSwapIntervalEXT) {
   617     } else if (_this->gl_data->wglSwapIntervalEXT) {
   617         _this->gl_data->wglSwapIntervalEXT(interval);
   618         if (_this->gl_data->wglSwapIntervalEXT(interval) == TRUE) {
   618         return 0;
   619             retval = 0;
       
   620         } else {
       
   621             WIN_SetError("wglSwapIntervalEXT()");
       
   622         }
   619     } else {
   623     } else {
   620         SDL_Unsupported();
   624         SDL_Unsupported();
   621         return -1;
   625     }
   622     }
   626     return retval;
   623 }
   627 }
   624 
   628 
   625 int
   629 int
   626 WIN_GL_GetSwapInterval(_THIS)
   630 WIN_GL_GetSwapInterval(_THIS)
   627 {
   631 {
       
   632     int retval = 0;
   628     if (_this->gl_data->wglGetSwapIntervalEXT) {
   633     if (_this->gl_data->wglGetSwapIntervalEXT) {
   629         return _this->gl_data->wglGetSwapIntervalEXT();
   634         retval = _this->gl_data->wglGetSwapIntervalEXT();
   630     } else {
   635     }
   631         /*SDL_Unsupported();*/
   636     return retval;
   632         return 0;  /* just say we're unsync'd. */
       
   633     }
       
   634 }
   637 }
   635 
   638 
   636 void
   639 void
   637 WIN_GL_SwapWindow(_THIS, SDL_Window * window)
   640 WIN_GL_SwapWindow(_THIS, SDL_Window * window)
   638 {
   641 {