mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-25 22:26:08 +00:00
Fixed SDL_EGL_ChooseConfig()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user