Browse Source

Fixed SDL_EGL_ChooseConfig()

Sam Lantinga 7 months ago
parent
commit
91eabf1b4d
1 changed files with 2 additions and 6 deletions
  1. 2 6
      src/video/SDL_egl.c

+ 2 - 6
src/video/SDL_egl.c

@@ -926,21 +926,17 @@ static bool SDL_EGL_PrivateChooseConfig(SDL_VideoDevice *_this, bool set_config_
 
 bool SDL_EGL_ChooseConfig(SDL_VideoDevice *_this)
 {
-    int ret;
-
     if (!_this->egl_data) {
         return SDL_SetError("EGL not initialized");
     }
 
     // Try with EGL_CONFIG_CAVEAT set to EGL_NONE, to avoid any EGL_SLOW_CONFIG or EGL_NON_CONFORMANT_CONFIG
-    ret = SDL_EGL_PrivateChooseConfig(_this, true);
-    if (ret == 0) {
+    if (SDL_EGL_PrivateChooseConfig(_this, true)) {
         return true;
     }
 
     // Fallback with all configs
-    ret = SDL_EGL_PrivateChooseConfig(_this, false);
-    if (ret == 0) {
+    if (SDL_EGL_PrivateChooseConfig(_this, false)) {
         SDL_Log("SDL_EGL_ChooseConfig: found a slow EGL config");
         return true;
     }