mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Create egl_has_config
This commit is contained in:
parent
0f94353b28
commit
a95762e5cb
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user