src/video/SDL_egl.c
changeset 7702 83878644c8e6
parent 7679 b1fe132bc6a4
child 7753 e4c38f17bfad
equal deleted inserted replaced
7701:7d3fff679fae 7702:83878644c8e6
   330 int
   330 int
   331 SDL_EGL_SetSwapInterval(_THIS, int interval)
   331 SDL_EGL_SetSwapInterval(_THIS, int interval)
   332 {
   332 {
   333     EGLBoolean status;
   333     EGLBoolean status;
   334     
   334     
   335     if (_this->egl_data) {
   335     if (!_this->egl_data) {
   336         return SDL_SetError("OpenGL ES context not active");
   336         return SDL_SetError("EGL not initialized");
   337     }
   337     }
   338     
   338     
   339     status = _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, interval);
   339     status = _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, interval);
   340     if (status == EGL_TRUE) {
   340     if (status == EGL_TRUE) {
   341         _this->egl_data->egl_swapinterval = interval;
   341         _this->egl_data->egl_swapinterval = interval;
   346 }
   346 }
   347 
   347 
   348 int
   348 int
   349 SDL_EGL_GetSwapInterval(_THIS)
   349 SDL_EGL_GetSwapInterval(_THIS)
   350 {
   350 {
   351     if (_this->egl_data) {
   351     if (!_this->egl_data) {
   352         return SDL_SetError("OpenGL ES context not active");
   352         return SDL_SetError("EGL not initialized");
   353     }
   353     }
   354     
   354     
   355     return _this->egl_data->egl_swapinterval;
   355     return _this->egl_data->egl_swapinterval;
   356 }
   356 }
   357 
   357