(EGL) Remove egl_has_config

This commit is contained in:
libretroadmin 2023-02-21 22:16:04 +01:00
parent b442d6c9f8
commit aa9f53659f
4 changed files with 4 additions and 26 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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