[gfx] Fix static function placement.

In gfx/drivers_context/vc_egl_ctx.c, move gfx_ctx_vc_bind_api
declaration to before it's called by any other function, otherwise it
warns about "warning: implicit declaration of function" and can error
out with "error: conflicting types for 'gfx_ctx_vc_bind_api'" in certain
cases.
This commit is contained in:
Érico Rolim 2020-08-10 00:42:34 -03:00
parent 5f702a766f
commit 87d99601f6

View File

@ -147,6 +147,28 @@ static void dispmanx_vsync_callback(DISPMANX_UPDATE_HANDLE_T u, void *data)
slock_unlock(vc->vsync_condition_mutex);
}
static bool gfx_ctx_vc_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
vc_api = api;
switch (api)
{
#ifdef HAVE_EGL
case GFX_CTX_OPENGL_API:
return egl_bind_api(EGL_OPENGL_API);
case GFX_CTX_OPENGL_ES_API:
return egl_bind_api(EGL_OPENGL_ES_API);
case GFX_CTX_OPENVG_API:
return egl_bind_api(EGL_OPENVG_API);
#endif
default:
break;
}
return false;
}
static void gfx_ctx_vc_destroy(void *data)
{
vc_ctx_data_t *vc = (vc_ctx_data_t*)data;
@ -456,28 +478,6 @@ static enum gfx_ctx_api gfx_ctx_vc_get_api(void *data)
return vc_api;
}
static bool gfx_ctx_vc_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
vc_api = api;
switch (api)
{
#ifdef HAVE_EGL
case GFX_CTX_OPENGL_API:
return egl_bind_api(EGL_OPENGL_API);
case GFX_CTX_OPENGL_ES_API:
return egl_bind_api(EGL_OPENGL_ES_API);
case GFX_CTX_OPENVG_API:
return egl_bind_api(EGL_OPENVG_API);
#endif
default:
break;
}
return false;
}
static void gfx_ctx_vc_input_driver(void *data,
const char *name,
input_driver_t **input, void **input_data)