EGL: Fixed SDL_GL_GetSwapInterval() returning -1 on error.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 11 May 2016 21:10:41 +0200
changeset 10169e8062c7fa8b8
parent 10168 9e3144cb1032
child 10170 ccdb4d0934e9
EGL: Fixed SDL_GL_GetSwapInterval() returning -1 on error.

It should return 0 as a safe default on errors. -1 is returned for late swaps.
src/video/SDL_egl.c
     1.1 --- a/src/video/SDL_egl.c	Wed May 11 21:09:45 2016 +0200
     1.2 +++ b/src/video/SDL_egl.c	Wed May 11 21:10:41 2016 +0200
     1.3 @@ -558,7 +558,8 @@
     1.4  SDL_EGL_GetSwapInterval(_THIS)
     1.5  {
     1.6      if (!_this->egl_data) {
     1.7 -        return SDL_SetError("EGL not initialized");
     1.8 +        SDL_SetError("EGL not initialized");
     1.9 +        return 0;
    1.10      }
    1.11      
    1.12      return _this->egl_data->egl_swapinterval;