Create egl_has_config

This commit is contained in:
twinaphex 2015-12-08 14:42:02 +01:00
parent 0f94353b28
commit a95762e5cb
4 changed files with 13 additions and 8 deletions

View File

@ -268,3 +268,12 @@ bool egl_get_native_visual_id(EGLint *value)
return true;
}
bool egl_has_config(void)
{
if (!g_egl_config)
{
RARCH_ERR("[EGL]: No EGL configurations available.\n");
return false;
}
return true;
}

View File

@ -66,6 +66,8 @@ bool egl_create_surface(NativeWindowType native_window);
bool egl_get_native_visual_id(EGLint *value);
bool egl_has_config(void);
#ifdef __cplusplus
}
#endif

View File

@ -362,11 +362,8 @@ static bool gfx_ctx_wl_init(void *data)
goto error;
}
if (n == 0 || !g_egl_config)
{
RARCH_ERR("[Wayland/EGL]: No EGL configurations available.\n");
if (n == 0 || !egl_has_config())
goto error;
}
return true;

View File

@ -148,11 +148,8 @@ static bool gfx_ctx_xegl_init(void *data)
goto error;
}
if (n == 0 || !g_egl_config)
{
RARCH_ERR("[X/EGL]: No EGL configurations available.\n");
if (n == 0 || !egl_has_config())
goto error;
}
return true;