EGL: Fixed SDL_GL_GetSwapInterval() returning -1 on error.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 11 May 2016 21:10:41 +0200
changeset 10169 e8062c7fa8b8
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
--- a/src/video/SDL_egl.c	Wed May 11 21:09:45 2016 +0200
+++ b/src/video/SDL_egl.c	Wed May 11 21:10:41 2016 +0200
@@ -558,7 +558,8 @@
 SDL_EGL_GetSwapInterval(_THIS)
 {
     if (!_this->egl_data) {
-        return SDL_SetError("EGL not initialized");
+        SDL_SetError("EGL not initialized");
+        return 0;
     }
     
     return _this->egl_data->egl_swapinterval;