diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index 6ee1ac38f9..edcf526f9a 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -624,13 +624,3 @@ bool egl_create_surface(egl_ctx_data_t *egl, void *native_window) return true; } - -bool egl_has_config(egl_ctx_data_t *egl) -{ - if (!egl->config) - { - RARCH_ERR("[EGL]: No EGL configurations available.\n"); - return false; - } - return true; -} diff --git a/gfx/common/egl_common.h b/gfx/common/egl_common.h index 00856b6bf6..7f8948fcaa 100644 --- a/gfx/common/egl_common.h +++ b/gfx/common/egl_common.h @@ -74,8 +74,6 @@ extern bool g_egl_inited; extern unsigned g_egl_major; extern unsigned g_egl_minor; -void egl_report_error(void); - void egl_destroy(egl_ctx_data_t *egl); gfx_ctx_proc_t egl_get_proc_address(const char *symbol); diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index e12a4533ef..01a845a8da 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -259,15 +259,11 @@ static bool gfx_ctx_wl_egl_init_context(gfx_ctx_wayland_data_t *wl) egl_default_accept_config_cb)) { egl_report_error(); - goto error; + return false; } - - if (n == 0 || !egl_has_config(&wl->egl)) - goto error; + if (n == 0 || !&wl->egl.config) + return false; return true; - -error: - return false; } #endif @@ -275,23 +271,17 @@ static void *gfx_ctx_wl_init(void *data) { int i; gfx_ctx_wayland_data_t *wl = NULL; - if (!gfx_ctx_wl_init_common(&toplevel_listener, &wl)) goto error; - #ifdef HAVE_EGL if (!gfx_ctx_wl_egl_init_context(wl)) goto error; #endif - return wl; - error: gfx_ctx_wl_destroy_resources(wl); - if (wl) free(wl); - return NULL; } diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index dcb13bfe0f..b96dfec615 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -181,7 +181,7 @@ static void *gfx_ctx_xegl_init(void *video_driver) goto error; } - if (n == 0 || !egl_has_config(&xegl->egl)) + if (n == 0 || !&xegl->egl.config) goto error; #endif