From 748b05289ccaa9bfbadbb024c16cd69ed014817d Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 11 May 2016 21:10:41 +0200 Subject: [PATCH] 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c index bfd4affb9..2cbcb2f04 100644 --- a/src/video/SDL_egl.c +++ b/src/video/SDL_egl.c @@ -558,7 +558,8 @@ int 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;