From 465e84d60c4eb842723abb138efeeb946ab7b854 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 20 Jul 2020 18:22:33 +0200 Subject: [PATCH] (context drivers) Make names uniform --- gfx/drivers_context/android_ctx.c | 2 +- gfx/drivers_context/emscriptenegl_ctx.c | 2 +- gfx/drivers_context/mali_fbdev_ctx.c | 20 ++++---------------- gfx/drivers_context/opendingux_fbdev_ctx.c | 6 ++---- gfx/drivers_context/orbis_ctx.c | 6 +++++- gfx/drivers_context/qnx_ctx.c | 2 +- gfx/drivers_context/sdl_gl_ctx.c | 2 +- gfx/drivers_context/switch_ctx.c | 5 +++-- gfx/drivers_context/uwp_egl_ctx.c | 5 ++++- gfx/drivers_context/vc_egl_ctx.c | 2 +- gfx/drivers_context/vivante_fbdev_ctx.c | 2 +- gfx/drivers_context/xegl_ctx.c | 2 +- 12 files changed, 25 insertions(+), 31 deletions(-) diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index e4b4bdd57f..b3292950d6 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -380,7 +380,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { NULL, NULL, NULL, - "android", + "egl_android", android_gfx_ctx_get_flags, android_gfx_ctx_set_flags, android_gfx_ctx_bind_hw_render, diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 853a065607..2012e17ad6 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -339,7 +339,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { gfx_ctx_emscripten_init_egl_image_buffer, gfx_ctx_emscripten_write_egl_image, NULL, - "emscripten", + "egl_emscripten", gfx_ctx_emscripten_get_flags, gfx_ctx_emscripten_set_flags, gfx_ctx_emscripten_bind_hw_render, diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 415068da27..8af6780507 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -222,18 +222,9 @@ static bool gfx_ctx_mali_fbdev_bind_api(void *data, return false; } -static bool gfx_ctx_mali_fbdev_has_focus(void *data) -{ - (void)data; - return true; -} +static bool gfx_ctx_mali_fbdev_has_focus(void *data) { return true; } -static bool gfx_ctx_mali_fbdev_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool gfx_ctx_mali_fbdev_suppress_screensaver(void *data, bool enable) { return false; } static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, int swap_interval) @@ -272,10 +263,7 @@ static uint32_t gfx_ctx_mali_fbdev_get_flags(void *data) return flags; } -static void gfx_ctx_mali_fbdev_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void gfx_ctx_mali_fbdev_set_flags(void *data, uint32_t flags) { } static float gfx_ctx_mali_fbdev_get_refresh_rate(void *data) { @@ -314,7 +302,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { NULL, NULL, NULL, - "mali-fbdev", + "fbdev_mali", gfx_ctx_mali_fbdev_get_flags, gfx_ctx_mali_fbdev_set_flags, gfx_ctx_mali_fbdev_bind_hw_render, diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index fdb9e5257b..bf3c64c6b9 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -186,9 +186,7 @@ static enum gfx_ctx_api gfx_ctx_opendingux_get_api(void *data) static bool gfx_ctx_opendingux_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - if (api == GFX_CTX_OPENGL_ES_API) - return true; - return false; + return (api == GFX_CTX_OPENGL_ES_API); } static void gfx_ctx_opendingux_set_flags(void *data, uint32_t flags) { } @@ -262,7 +260,7 @@ const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { NULL, NULL, NULL, - "opendingux-fbdev", + "fbdev_opendingux", gfx_ctx_opendingux_get_flags, gfx_ctx_opendingux_set_flags, gfx_ctx_opendingux_bind_hw_render, diff --git a/gfx/drivers_context/orbis_ctx.c b/gfx/drivers_context/orbis_ctx.c index 0656049cf5..548e8db806 100644 --- a/gfx/drivers_context/orbis_ctx.c +++ b/gfx/drivers_context/orbis_ctx.c @@ -22,6 +22,10 @@ #include "../../config.h" #endif +#ifdef HAVE_EGL +#include "../common/egl_common.h" +#endif + #include "../common/orbis_common.h" #include "../../frontend/frontend_driver.h" #include "../../configuration.h" @@ -301,7 +305,7 @@ const gfx_ctx_driver_t orbis_ctx = { NULL, NULL, NULL, - "orbis", + "egl_orbis", orbis_ctx_get_flags, orbis_ctx_set_flags, orbis_ctx_bind_hw_render, diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index f4ba0d7cf0..7bf6b5c1be 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -448,7 +448,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { NULL, NULL, NULL, - "qnx", + "egl_qnx", gfx_ctx_qnx_get_flags, gfx_ctx_qnx_set_flags, gfx_ctx_qnx_bind_hw_render, diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 7a368f8f8c..2a259ef1d3 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -431,7 +431,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = NULL, NULL, sdl_ctx_show_mouse, - "sdl_gl", + "gl_sdl", sdl_ctx_get_flags, sdl_ctx_set_flags, NULL, /* bind_hw_render */ diff --git a/gfx/drivers_context/switch_ctx.c b/gfx/drivers_context/switch_ctx.c index 4633c864ac..e0b769e740 100644 --- a/gfx/drivers_context/switch_ctx.c +++ b/gfx/drivers_context/switch_ctx.c @@ -349,9 +349,10 @@ const gfx_ctx_driver_t switch_ctx = { NULL, NULL, NULL, - "switch", + "egl_switch", switch_ctx_get_flags, switch_ctx_set_flags, switch_ctx_bind_hw_render, NULL, - NULL}; + NULL +}; diff --git a/gfx/drivers_context/uwp_egl_ctx.c b/gfx/drivers_context/uwp_egl_ctx.c index 3d0eb0ad5a..6bd594d6f3 100644 --- a/gfx/drivers_context/uwp_egl_ctx.c +++ b/gfx/drivers_context/uwp_egl_ctx.c @@ -45,7 +45,10 @@ #include "../../verbosity.h" #include "../../frontend/frontend_driver.h" +#ifdef HAVE_EGL #include "../common/egl_common.h" +#endif + #include "../common/gl_common.h" #ifdef HAVE_ANGLE @@ -280,7 +283,7 @@ const gfx_ctx_driver_t gfx_ctx_uwp = { NULL, NULL, win32_show_cursor, - "uwp", + "egl_uwp", gfx_ctx_uwp_get_flags, /* get flags */ NULL, /* set flags */ gfx_ctx_uwp_bind_hw_render, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 5ea4070472..3c52edb96a 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -710,7 +710,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { gfx_ctx_vc_image_buffer_init, gfx_ctx_vc_image_buffer_write, NULL, - "videocore", + "egl_videocore", gfx_ctx_vc_get_flags, gfx_ctx_vc_set_flags, gfx_ctx_vc_bind_hw_render, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 16911fa554..be2c08b389 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -267,7 +267,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { NULL, NULL, NULL, - "vivante-fbdev", + "fbdev_vivante", gfx_ctx_vivante_get_flags, gfx_ctx_vivante_set_flags, gfx_ctx_vivante_bind_hw_render, diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index fd8f787044..8870acb0d4 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -606,7 +606,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = NULL, NULL, gfx_ctx_xegl_show_mouse, - "x-egl", + "egl_x", gfx_ctx_xegl_get_flags, gfx_ctx_xegl_set_flags, gfx_ctx_xegl_bind_hw_render,