From 60f32650179fab9d5ab6c53425dc071afc77b6a2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 27 Jul 2020 13:16:14 +0200 Subject: [PATCH] Cleanups --- gfx/drivers/caca_gfx.c | 28 +++--------- gfx/drivers/d3d10.c | 14 +----- gfx/drivers/d3d11.c | 30 ++++--------- gfx/drivers/d3d12.c | 20 ++------- gfx/drivers/d3d8.c | 24 +++++----- gfx/drivers/d3d9.c | 9 +--- gfx/drivers/fpga_gfx.c | 21 ++------- gfx/drivers/gdi_gfx.c | 21 ++------- gfx/drivers/metal.m | 18 ++------ gfx/drivers/oga_gfx.c | 40 +++++------------ gfx/drivers/omap_gfx.c | 45 ++++--------------- gfx/drivers/sdl2_gfx.c | 15 +------ gfx/drivers/sdl_dingux_gfx.c | 54 ++++------------------ gfx/drivers/sdl_gfx.c | 12 +---- gfx/drivers/sixel_gfx.c | 24 ++-------- gfx/drivers/switch_gfx.c | 28 ++---------- gfx/drivers/switch_nx_gfx.c | 62 ++++--------------------- gfx/drivers/vg.c | 16 +------ gfx/drivers/vga_gfx.c | 18 ++------ gfx/drivers/vita2d_gfx.c | 1 - gfx/drivers/vulkan.c | 12 +---- gfx/drivers/xenon360_gfx.c | 34 +++----------- gfx/drivers/xshm_gfx.c | 87 ++++++------------------------------ gfx/drivers/xvideo.c | 9 +--- 24 files changed, 116 insertions(+), 526 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 0700b9393a..0c58933da8 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -168,11 +168,6 @@ static bool caca_gfx_frame(void *data, const void *frame, return true; } -static void caca_gfx_set_nonblock_state(void *data, bool a, - bool b, unsigned c) -{ -} - static bool caca_gfx_alive(void *data) { caca_t *caca = (caca_t*)data; @@ -180,24 +175,11 @@ static bool caca_gfx_alive(void *data) return true; } -static bool caca_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool caca_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool caca_gfx_has_windowed(void *data) -{ - (void)data; - return true; -} +static void caca_gfx_set_nonblock_state(void *data, bool a, + bool b, unsigned c) { } +static bool caca_gfx_focus(void *data) { return true; } +static bool caca_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool caca_gfx_has_windowed(void *data) { return true; } static void caca_gfx_free(void *data) { diff --git a/gfx/drivers/d3d10.c b/gfx/drivers/d3d10.c index 5be63cefdb..4b54d2cf2c 100644 --- a/gfx/drivers/d3d10.c +++ b/gfx/drivers/d3d10.c @@ -1564,18 +1564,8 @@ static bool d3d10_gfx_alive(void* data) return !quit; } -static bool d3d10_gfx_suppress_screensaver(void* data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool d3d10_gfx_has_windowed(void* data) -{ - (void)data; - return true; -} +static bool d3d10_gfx_suppress_screensaver(void* data, bool enable) { return false; } +static bool d3d10_gfx_has_windowed(void* data) { return true; } static struct video_shader* d3d10_gfx_get_current_shader(void* data) { diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index a7ca8baf98..6256afd077 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -1640,18 +1640,8 @@ static bool d3d11_gfx_alive(void* data) return !quit; } -static bool d3d11_gfx_suppress_screensaver(void* data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool d3d11_gfx_has_windowed(void* data) -{ - (void)data; - return true; -} +static bool d3d11_gfx_suppress_screensaver(void* data, bool enable) { return false; } +static bool d3d11_gfx_has_windowed(void* data) { return true; } static struct video_shader* d3d11_gfx_get_current_shader(void* data) { @@ -1803,11 +1793,12 @@ static void d3d11_gfx_unload_texture(void* data, free(texture); } - static bool -d3d11_get_hw_render_interface(void* data, const struct retro_hw_render_interface** iface) +static bool d3d11_get_hw_render_interface( + void* data, const struct retro_hw_render_interface** iface) { d3d11_video_t* d3d11 = (d3d11_video_t*)data; - *iface = (const struct retro_hw_render_interface*)&d3d11->hw.iface; + *iface = (const struct retro_hw_render_interface*) + &d3d11->hw.iface; return d3d11->hw.enable; } @@ -1872,17 +1863,14 @@ static const video_poke_interface_t d3d11_poke_interface = { d3d11_get_hw_render_interface, }; -static void d3d11_gfx_get_poke_interface(void* data, const video_poke_interface_t** iface) +static void d3d11_gfx_get_poke_interface(void* data, + const video_poke_interface_t** iface) { *iface = &d3d11_poke_interface; } #if defined(HAVE_GFX_WIDGETS) -static bool d3d11_gfx_widgets_enabled(void *data) -{ - (void)data; - return true; -} +static bool d3d11_gfx_widgets_enabled(void *data) { return true; } #endif video_driver_t video_d3d11 = { diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index edcfee3ff1..35b3779933 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -1633,18 +1633,8 @@ static bool d3d12_gfx_alive(void* data) return !quit; } -static bool d3d12_gfx_suppress_screensaver(void* data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool d3d12_gfx_has_windowed(void* data) -{ - (void)data; - return true; -} +static bool d3d12_gfx_suppress_screensaver(void* data, bool enable) { return false; } +static bool d3d12_gfx_has_windowed(void* data) { return true; } static struct video_shader* d3d12_gfx_get_current_shader(void* data) { @@ -1878,11 +1868,7 @@ static void d3d12_gfx_get_poke_interface(void* data, const video_poke_interface_ } #ifdef HAVE_GFX_WIDGETS -static bool d3d12_gfx_widgets_enabled(void *data) -{ - (void)data; - return true; -} +static bool d3d12_gfx_widgets_enabled(void *data) { return true; } #endif video_driver_t video_d3d12 = { diff --git a/gfx/drivers/d3d8.c b/gfx/drivers/d3d8.c index 9fb256c000..d061e3548e 100644 --- a/gfx/drivers/d3d8.c +++ b/gfx/drivers/d3d8.c @@ -82,6 +82,13 @@ typedef struct d3d8_renderchain uint64_t frame_count; } d3d8_renderchain_t; +struct d3d8_texture_info +{ + void *userdata; + void *data; + enum texture_filter_type type; +}; + void d3d8_set_mvp(void *data, const void *mat_data) { struct d3d_matrix matrix; @@ -1692,13 +1699,6 @@ static void d3d8_set_menu_texture_enable(void *data, d3d->menu->fullscreen = full_screen; } -struct d3d8_texture_info -{ - void *userdata; - void *data; - enum texture_filter_type type; -}; - static void d3d8_video_texture_load_d3d( struct d3d8_texture_info *info, uintptr_t *id) @@ -1749,7 +1749,7 @@ static uintptr_t d3d8_load_texture(void *video_data, void *data, bool threaded, enum texture_filter_type filter_type) { struct d3d8_texture_info info; - uintptr_t id = 0; + uintptr_t id = 0; info.userdata = video_data; info.data = data; @@ -1826,18 +1826,14 @@ static const video_poke_interface_t d3d_poke_interface = { static void d3d8_get_poke_interface(void *data, const video_poke_interface_t **iface) { - (void)data; *iface = &d3d_poke_interface; } -static bool d3d8_has_windowed(void *data) -{ #ifdef _XBOX - return false; +static bool d3d8_has_windowed(void *data) { return false; } #else - return true; +static bool d3d8_has_windowed(void *data) { return true; } #endif -} video_driver_t video_d3d8 = { d3d8_init, diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 2ce177256d..2b54c4954a 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -1998,23 +1998,18 @@ static const video_poke_interface_t d3d9_poke_interface = { static void d3d9_get_poke_interface(void *data, const video_poke_interface_t **iface) { - (void)data; *iface = &d3d9_poke_interface; } -static bool d3d9_has_windowed(void *data) -{ #ifdef _XBOX - return false; +static bool d3d9_has_windowed(void *data) { return false; } #else - return true; +static bool d3d9_has_windowed(void *data) { return true; } #endif -} #ifdef HAVE_GFX_WIDGETS static bool d3d9_gfx_widgets_enabled(void *data) { - (void)data; return false; /* currently disabled due to memory issues */ } #endif diff --git a/gfx/drivers/fpga_gfx.c b/gfx/drivers/fpga_gfx.c index 123a968a7a..81b19e2de8 100644 --- a/gfx/drivers/fpga_gfx.c +++ b/gfx/drivers/fpga_gfx.c @@ -251,24 +251,9 @@ static bool fpga_gfx_alive(void *data) return true; } -static bool fpga_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool fpga_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool fpga_gfx_has_windowed(void *data) -{ - (void)data; - return true; -} +static bool fpga_gfx_focus(void *data) { return true; } +static bool fpga_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool fpga_gfx_has_windowed(void *data) { return true; } static void fpga_gfx_free(void *data) { diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 533df69c0a..1aeb8285a8 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -505,24 +505,9 @@ static bool gdi_gfx_alive(void *data) return ret; } -static bool gdi_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool gdi_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool gdi_gfx_has_windowed(void *data) -{ - (void)data; - return true; -} +static bool gdi_gfx_focus(void *data) { return true; } +static bool gdi_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool gdi_gfx_has_windowed(void *data) { return true; } static void gdi_gfx_free(void *data) { diff --git a/gfx/drivers/metal.m b/gfx/drivers/metal.m index 21c182f610..606031b090 100644 --- a/gfx/drivers/metal.m +++ b/gfx/drivers/metal.m @@ -208,24 +208,12 @@ static void metal_set_nonblock_state(void *data, bool non_block, md.context.displaySyncEnabled = !non_block; } -static bool metal_alive(void *data) -{ - return true; -} - -static bool metal_has_windowed(void *data) -{ - return true; -} - -static bool metal_focus(void *data) -{ - return apple_platform.hasFocus; -} +static bool metal_alive(void *data) { return true; } +static bool metal_has_windowed(void *data) { return true; } +static bool metal_focus(void *data) { return apple_platform.hasFocus; } static bool metal_suppress_screensaver(void *data, bool disable) { - RARCH_LOG("[Metal]: suppress screen saver: %s\n", disable ? "YES" : "NO"); return [apple_platform setDisableDisplaySleep:disable]; } diff --git a/gfx/drivers/oga_gfx.c b/gfx/drivers/oga_gfx.c index 44955adc52..0484852e4d 100644 --- a/gfx/drivers/oga_gfx.c +++ b/gfx/drivers/oga_gfx.c @@ -359,41 +359,26 @@ static void oga_set_texture_frame(void *data, const void *frame, bool rgb32, vid->menu_frame = frame_output; } -static void oga_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) -{ -} +static void oga_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } static bool oga_gfx_alive(void *data) { return !frontend_driver_get_signal_handler_state(); } -static bool oga_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool oga_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool oga_gfx_has_windowed(void *data) -{ - (void)data; - return false; -} +static bool oga_gfx_focus(void *data) { return true; } +static bool oga_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool oga_gfx_has_windowed(void *data) { return false; } static void oga_gfx_viewport_info(void *data, struct video_viewport *vp) { oga_video_t *vid = (oga_video_t*)data; - vp->x = 0; - vp->y = 0; - vp->width = vp->full_width = NATIVE_WIDTH; - vp->height = vp->full_height = NATIVE_HEIGHT; + vp->x = 0; + vp->y = 0; + vp->width = NATIVE_WIDTH; + vp->full_width = NATIVE_WIDTH; + vp->height = NATIVE_HEIGHT; + vp->full_height = NATIVE_HEIGHT; } static const video_poke_interface_t oga_poke_interface = { @@ -423,7 +408,6 @@ static const video_poke_interface_t oga_poke_interface = { void oga_set_rotation(void *data, unsigned rotation) { /* called before init? */ - (void)data; switch (rotation) { case 0: @@ -444,9 +428,9 @@ void oga_set_rotation(void *data, unsigned rotation) } } -static void oga_get_poke_interface(void *data, const video_poke_interface_t **iface) +static void oga_get_poke_interface(void *data, + const video_poke_interface_t **iface) { - (void)data; *iface = &oga_poke_interface; } diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index 2e9e010248..7e61d9ea54 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -1039,17 +1039,8 @@ static void omap_gfx_set_nonblock_state(void *data, bool state, vid->omap->sync = !state; } -static bool omap_gfx_alive(void *data) -{ - (void)data; - return true; /* always alive */ -} - -static bool omap_gfx_focus(void *data) -{ - (void)data; - return true; /* fb device always has focus */ -} +static bool omap_gfx_alive(void *data) { return true; /* always alive */ } +static bool omap_gfx_focus(void *data) { return true; /* fb device always has focus */ } static void omap_gfx_viewport_info(void *data, struct video_viewport *vp) { @@ -1058,37 +1049,17 @@ static void omap_gfx_viewport_info(void *data, struct video_viewport *vp) if (!vid) return; - vp->x = vp->y = 0; + vp->x = vp->y = 0; - vp->width = vp->full_width = vid->width; - vp->height = vp->full_height = vid->height; + vp->width = vp->full_width = vid->width; + vp->height = vp->full_height = vid->height; } -static bool omap_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - - return false; -} - -static bool omap_gfx_has_windowed(void *data) -{ - (void)data; - - /* TODO - implement. */ - return true; -} +static bool omap_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool omap_gfx_has_windowed(void *data) { return true; } static bool omap_gfx_set_shader(void *data, - enum rarch_shader_type type, const char *path) -{ - (void)data; - (void)type; - (void)path; - - return false; -} + enum rarch_shader_type type, const char *path) { return false; } static void omap_gfx_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 4521f422c6..b9703b1db2 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -689,24 +689,13 @@ static void sdl2_poke_set_osd_msg(void *data, sdl2_render_msg(vid, msg); } -static void sdl2_show_mouse(void *data, bool state) -{ - (void)data; - SDL_ShowCursor(state); -} - +static void sdl2_show_mouse(void *data, bool state) { SDL_ShowCursor(state); } static void sdl2_grab_mouse_toggle(void *data) { sdl2_video_t *vid = (sdl2_video_t*)data; SDL_SetWindowGrab(vid->window, SDL_GetWindowGrab(vid->window)); } - -static uint32_t sdl2_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} +static uint32_t sdl2_get_flags(void *data) { return 0; } static video_poke_interface_t sdl2_video_poke_interface = { sdl2_get_flags, diff --git a/gfx/drivers/sdl_dingux_gfx.c b/gfx/drivers/sdl_dingux_gfx.c index 589a7f6057..63e93a0721 100644 --- a/gfx/drivers/sdl_dingux_gfx.c +++ b/gfx/drivers/sdl_dingux_gfx.c @@ -248,24 +248,9 @@ static bool sdl_dingux_gfx_alive(void *data) return !vid->quitting; } -static bool sdl_dingux_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool sdl_dingux_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool sdl_dingux_gfx_has_windowed(void *data) -{ - (void)data; - return false; -} +static bool sdl_dingux_gfx_focus(void *data) { return true; } +static bool sdl_dingux_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool sdl_dingux_gfx_has_windowed(void *data) { return false; } static void sdl_dingux_gfx_viewport_info(void *data, struct video_viewport *vp) { @@ -276,21 +261,9 @@ static void sdl_dingux_gfx_viewport_info(void *data, struct video_viewport *vp) vp->height = vp->full_height = vid->screen->h; } -static void sdl_dingux_set_filtering(void *data, unsigned index, bool smooth, bool ctx_scaling) -{ - (void)data; -} - -static void sdl_dingux_apply_state_changes(void *data) -{ - (void)data; -} - -static uint32_t sdl_dingux_get_flags(void *data) -{ - (void)data; - return 0; -} +static void sdl_dingux_set_filtering(void *data, unsigned index, bool smooth, bool ctx_scaling) { } +static void sdl_dingux_apply_state_changes(void *data) { } +static uint32_t sdl_dingux_get_flags(void *data) { return 0; } static const video_poke_interface_t sdl_dingux_poke_interface = { sdl_dingux_get_flags, @@ -316,20 +289,9 @@ static const video_poke_interface_t sdl_dingux_poke_interface = { NULL /* get_hw_render_interface */ }; -static void sdl_dingux_get_poke_interface(void *data, const video_poke_interface_t **iface) -{ - (void)data; - *iface = &sdl_dingux_poke_interface; -} - +static void sdl_dingux_get_poke_interface(void *data, const video_poke_interface_t **iface) { *iface = &sdl_dingux_poke_interface; } static bool sdl_dingux_gfx_set_shader(void *data, - enum rarch_shader_type type, const char *path) -{ - (void)data; - (void)type; - (void)path; - return false; -} + enum rarch_shader_type type, const char *path) { return false; } video_driver_t video_sdl_dingux = { sdl_dingux_gfx_init, diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index c730bad005..ca498c48fe 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -424,14 +424,11 @@ static bool sdl_gfx_alive(void *data) static bool sdl_gfx_focus(void *data) { - (void)data; return (SDL_GetAppState() & (SDL_APPINPUTFOCUS | SDL_APPACTIVE)) == (SDL_APPINPUTFOCUS | SDL_APPACTIVE); } static bool sdl_gfx_suppress_screensaver(void *data, bool enable) { - (void)data; - (void)enable; #ifdef HAVE_X11 if (video_driver_display_type_get() == RARCH_DISPLAY_X11) { @@ -443,13 +440,8 @@ static bool sdl_gfx_suppress_screensaver(void *data, bool enable) return false; } -static bool sdl_gfx_has_windowed(void *data) -{ - (void)data; - - /* TODO - implement. */ - return true; -} +/* TODO/FIXME - implement */ +static bool sdl_gfx_has_windowed(void *data) { return true; } static void sdl_gfx_viewport_info(void *data, struct video_viewport *vp) { diff --git a/gfx/drivers/sixel_gfx.c b/gfx/drivers/sixel_gfx.c index 7e9f27f160..89d0641019 100644 --- a/gfx/drivers/sixel_gfx.c +++ b/gfx/drivers/sixel_gfx.c @@ -416,8 +416,6 @@ static bool sixel_gfx_frame(void *data, const void *frame, return true; } -static void sixel_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } - static bool sixel_gfx_alive(void *data) { unsigned temp_width = 0; @@ -435,24 +433,10 @@ static bool sixel_gfx_alive(void *data) return true; } -static bool sixel_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool sixel_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool sixel_gfx_has_windowed(void *data) -{ - (void)data; - return true; -} +static void sixel_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } +static bool sixel_gfx_focus(void *data) { return true; } +static bool sixel_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool sixel_gfx_has_windowed(void *data) { return true; } static void sixel_gfx_free(void *data) { diff --git a/gfx/drivers/switch_gfx.c b/gfx/drivers/switch_gfx.c index c6b21038dc..d8a42ed9a2 100644 --- a/gfx/drivers/switch_gfx.c +++ b/gfx/drivers/switch_gfx.c @@ -269,30 +269,10 @@ static void switch_set_nonblock_state(void *data, bool toggle, bool c, unsigned sw->vsync = !toggle; } -static bool switch_alive(void *data) -{ - (void) data; - return true; -} - -static bool switch_focus(void *data) -{ - (void) data; - return true; -} - -static bool switch_suppress_screensaver(void *data, bool enable) -{ - (void) data; - (void) enable; - return false; -} - -static bool switch_has_windowed(void *data) -{ - (void) data; - return false; -} +static bool switch_alive(void *data) { return true; } +static bool switch_focus(void *data) { return true; } +static bool switch_suppress_screensaver(void *data, bool enable) { return false; } +static bool switch_has_windowed(void *data) { return false; } static void switch_free(void *data) { diff --git a/gfx/drivers/switch_nx_gfx.c b/gfx/drivers/switch_nx_gfx.c index a392f07f51..e5c92f2b12 100644 --- a/gfx/drivers/switch_nx_gfx.c +++ b/gfx/drivers/switch_nx_gfx.c @@ -484,30 +484,10 @@ static void switch_set_nonblock_state(void *data, bool toggle, bool c, unsigned sw->vsync = !toggle; } -static bool switch_alive(void *data) -{ - (void)data; - return true; -} - -static bool switch_focus(void *data) -{ - (void)data; - return true; -} - -static bool switch_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool switch_has_windowed(void *data) -{ - (void)data; - return false; -} +static bool switch_alive(void *data) { return true; } +static bool switch_focus(void *data) { return true; } +static bool switch_suppress_screensaver(void *data, bool enable) { return false; } +static bool switch_has_windowed(void *data) { return false; } static void switch_free(void *data) { @@ -639,42 +619,18 @@ static bool switch_overlay_load(void *data, if (!swa) return false; - swa->overlay = images; + swa->overlay = images; swa->overlay_enabled = true; return true; } static void switch_overlay_tex_geom(void *data, - unsigned idx, float x, float y, float w, float h) -{ - switch_video_t *swa = (switch_video_t *)data; - - if (!swa) - return; -} - + unsigned idx, float x, float y, float w, float h) { } static void switch_overlay_vertex_geom(void *data, - unsigned idx, float x, float y, float w, float h) -{ - switch_video_t *swa = (switch_video_t *)data; - - if (!swa) - return; -} - -static void switch_overlay_full_screen(void *data, bool enable) -{ - (void)data; - (void)enable; -} - -static void switch_overlay_set_alpha(void *data, unsigned idx, float mod) -{ - (void)data; - (void)idx; - (void)mod; -} + unsigned idx, float x, float y, float w, float h) { } +static void switch_overlay_full_screen(void *data, bool enable) { } +static void switch_overlay_set_alpha(void *data, unsigned idx, float mod) { } static const video_overlay_interface_t switch_overlay = { switch_overlay_enable, diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 6213fbfa21..53be57c3f8 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -478,21 +478,9 @@ static bool vg_suppress_screensaver(void *data, bool enable) } static bool vg_set_shader(void *data, - enum rarch_shader_type type, const char *path) -{ - (void)data; - (void)type; - (void)path; - - return false; -} - + enum rarch_shader_type type, const char *path) { return false; } static void vg_get_poke_interface(void *data, - const video_poke_interface_t **iface) -{ - (void)data; - (void)iface; -} + const video_poke_interface_t **iface) { } video_driver_t video_vg = { vg_init, diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index ee960074ae..3bedcc35b9 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -356,12 +356,7 @@ static void vga_set_texture_frame(void *data, } } -static uint32_t vga_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} +static uint32_t vga_get_flags(void *data) { return 0; } static const video_poke_interface_t vga_poke_interface = { vga_get_flags, @@ -388,16 +383,9 @@ static const video_poke_interface_t vga_poke_interface = { }; static void vga_gfx_get_poke_interface(void *data, - const video_poke_interface_t **iface) -{ - (void)data; - *iface = &vga_poke_interface; -} - + const video_poke_interface_t **iface) { *iface = &vga_poke_interface; } void vga_gfx_set_viewport(void *data, unsigned viewport_width, - unsigned viewport_height, bool force_full, bool allow_rotate) -{ -} + unsigned viewport_height, bool force_full, bool allow_rotate) { } video_driver_t video_vga = { vga_gfx_init, diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index c6f60a2cc0..ce9e0567f7 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -945,7 +945,6 @@ static const video_overlay_interface_t vita2d_overlay_interface = { static void vita2d_get_overlay_interface(void *data, const video_overlay_interface_t **iface) { - (void)data; *iface = &vita2d_overlay_interface; } #endif diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 4cbf9d30cc..1a2aa7efc4 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -2938,19 +2938,11 @@ static const video_overlay_interface_t vulkan_overlay_interface = { }; static void vulkan_get_overlay_interface(void *data, - const video_overlay_interface_t **iface) -{ - (void)data; - *iface = &vulkan_overlay_interface; -} + const video_overlay_interface_t **iface) { *iface = &vulkan_overlay_interface; } #endif #ifdef HAVE_GFX_WIDGETS -static bool vulkan_gfx_widgets_enabled(void *data) -{ - (void)data; - return true; -} +static bool vulkan_gfx_widgets_enabled(void *data) { return true; } #endif video_driver_t video_vulkan = { diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 45ce3dfcc1..9bc2a7df99 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -252,43 +252,19 @@ static bool xenon360_gfx_frame(void *data, return true; } -static void xenon360_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } - static bool xenon360_gfx_alive(void *data) { xenos_t *xenos = (xenos_t*)data; return !xenos->quitting; } -static bool xenon360_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool xenon360_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - +static void xenon360_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } +static bool xenon360_gfx_focus(void *data) { return true; } +static bool xenon360_gfx_suppress_screensaver(void *data, bool enable) { return false; } static bool xenon360_gfx_set_shader(void *data, - enum rarch_shader_type type, const char *path) -{ - (void)data; - (void)type; - (void)path; - - return false; -} - + enum rarch_shader_type type, const char *path) { return false; } static void xenon360_gfx_get_poke_interface(void *data, - const video_poke_interface_t **iface) -{ - (void)data; - (void)iface; -} + const video_poke_interface_t **iface) { } video_driver_t video_xenon360 = { xenon360_gfx_init, diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index 846d723d93..290a291498 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -160,70 +160,23 @@ static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, } static void xshm_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } - -static bool xshm_gfx_alive(void *data) -{ - return true; -} - -static bool xshm_gfx_focus(void *data) -{ - return true; -} - -static bool xshm_gfx_suppress_screensaver(void *data, bool enable) -{ - return false; -} - -static void xshm_gfx_free(void *data) -{ - -} - -static void xshm_poke_set_filtering(void *data, unsigned index, bool smooth, bool ctx_scaling) -{ - -} - -static void xshm_poke_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) -{ - -} - -static void xshm_poke_apply_state_changes(void *data) -{ - -} - +static bool xshm_gfx_alive(void *data) { return true; } +static bool xshm_gfx_focus(void *data) { return true; } +static bool xshm_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static void xshm_gfx_free(void *data) { } +static void xshm_poke_set_filtering(void *data, unsigned index, bool smooth, bool ctx_scaling) { } +static void xshm_poke_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) { } +static void xshm_poke_apply_state_changes(void *data) { } static void xshm_poke_set_texture_frame(void *data, const void *frame, bool rgb32, - unsigned width, unsigned height, float alpha) -{ - -} - + unsigned width, unsigned height, float alpha) { } static void xshm_poke_texture_enable(void *data, - bool enable, bool full_screen) -{ - -} - + bool enable, bool full_screen) { } static void xshm_poke_set_osd_msg(void *data, const char *msg, - const void *params, void *font) -{ -} - -static void xshm_show_mouse(void *data, bool state) -{ - -} - -static void xshm_grab_mouse_toggle(void *data) -{ - -} + const void *params, void *font) { } +static void xshm_show_mouse(void *data, bool state) { } +static void xshm_grab_mouse_toggle(void *data) { } static video_poke_interface_t xshm_video_poke_interface = { NULL, /* get_flags */ @@ -249,21 +202,9 @@ static video_poke_interface_t xshm_video_poke_interface = { NULL /* get_hw_render_interface */ }; -static void xshm_gfx_poke_interface(void *data, const video_poke_interface_t **iface) -{ - (void)data; - *iface = &xshm_video_poke_interface; -} - +static void xshm_gfx_poke_interface(void *data, const video_poke_interface_t **iface) { *iface = &xshm_video_poke_interface; } static bool xshm_gfx_set_shader(void *data, - enum rarch_shader_type type, const char *path) -{ - (void)data; - (void)type; - (void)path; - - return false; -} + enum rarch_shader_type type, const char *path) { return false; } video_driver_t video_xshm = { xshm_gfx_init, diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 3759b7e48d..7fb460aa49 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -1045,8 +1045,6 @@ static bool xv_frame(void *data, const void *frame, unsigned width, static bool xv_suppress_screensaver(void *data, bool enable) { - (void)data; - if (video_driver_display_type_get() != RARCH_DISPLAY_X11) return false; @@ -1091,12 +1089,7 @@ static void xv_viewport_info(void *data, struct video_viewport *vp) *vp = xv->vp; } -static uint32_t xv_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} +static uint32_t xv_get_flags(void *data) { return 0; } static video_poke_interface_t xv_video_poke_interface = { xv_get_flags,