(EGL) Remove egl_has_config
This commit is contained in:
parent
b442d6c9f8
commit
aa9f53659f
|
@ -624,13 +624,3 @@ bool egl_create_surface(egl_ctx_data_t *egl, void *native_window)
|
||||||
|
|
||||||
return true;
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -74,8 +74,6 @@ extern bool g_egl_inited;
|
||||||
extern unsigned g_egl_major;
|
extern unsigned g_egl_major;
|
||||||
extern unsigned g_egl_minor;
|
extern unsigned g_egl_minor;
|
||||||
|
|
||||||
void egl_report_error(void);
|
|
||||||
|
|
||||||
void egl_destroy(egl_ctx_data_t *egl);
|
void egl_destroy(egl_ctx_data_t *egl);
|
||||||
|
|
||||||
gfx_ctx_proc_t egl_get_proc_address(const char *symbol);
|
gfx_ctx_proc_t egl_get_proc_address(const char *symbol);
|
||||||
|
|
|
@ -259,15 +259,11 @@ static bool gfx_ctx_wl_egl_init_context(gfx_ctx_wayland_data_t *wl)
|
||||||
egl_default_accept_config_cb))
|
egl_default_accept_config_cb))
|
||||||
{
|
{
|
||||||
egl_report_error();
|
egl_report_error();
|
||||||
goto error;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (n == 0 || !&wl->egl.config)
|
||||||
if (n == 0 || !egl_has_config(&wl->egl))
|
return false;
|
||||||
goto error;
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -275,23 +271,17 @@ static void *gfx_ctx_wl_init(void *data)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
gfx_ctx_wayland_data_t *wl = NULL;
|
gfx_ctx_wayland_data_t *wl = NULL;
|
||||||
|
|
||||||
if (!gfx_ctx_wl_init_common(&toplevel_listener, &wl))
|
if (!gfx_ctx_wl_init_common(&toplevel_listener, &wl))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
#ifdef HAVE_EGL
|
#ifdef HAVE_EGL
|
||||||
if (!gfx_ctx_wl_egl_init_context(wl))
|
if (!gfx_ctx_wl_egl_init_context(wl))
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return wl;
|
return wl;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
gfx_ctx_wl_destroy_resources(wl);
|
gfx_ctx_wl_destroy_resources(wl);
|
||||||
|
|
||||||
if (wl)
|
if (wl)
|
||||||
free(wl);
|
free(wl);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ static void *gfx_ctx_xegl_init(void *video_driver)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n == 0 || !egl_has_config(&xegl->egl))
|
if (n == 0 || !&xegl->egl.config)
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue