From eb345019c29e99860c98043fa58a7fd3bbd00107 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 15 Jul 2018 20:16:09 +0200 Subject: [PATCH] Don't implement bind_block/flush_block for drivers that don't implement it --- gfx/drivers_font/caca_font.c | 7 +------ gfx/drivers_font/ctr_font.c | 8 +------- gfx/drivers_font/d3d10_font.c | 7 +------ gfx/drivers_font/d3d11_font.c | 7 +------ gfx/drivers_font/d3d12_font.c | 7 +------ gfx/drivers_font/metal_raster_font.m | 2 +- gfx/drivers_font/sixel_font.c | 15 ++------------- gfx/drivers_font/vga_font.c | 7 +------ gfx/drivers_font/vita2d_font.c | 7 +------ gfx/drivers_font/vulkan_raster_font.c | 15 ++------------- gfx/drivers_font/wiiu_font.c | 8 +------- 11 files changed, 13 insertions(+), 77 deletions(-) diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index c337d61eff..f36f60c3e3 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -129,18 +129,13 @@ static void caca_render_msg(video_frame_info_t *video_info, caca_refresh_display(*font->caca->caca_display); } -static void caca_font_bind_block(void* data, void* userdata) -{ - (void)data; -} - font_renderer_t caca_font = { caca_init_font, caca_render_free_font, caca_render_msg, "caca font", caca_font_get_glyph, /* get_glyph */ - caca_font_bind_block, /* bind_block */ + NULL, /* bind_block */ NULL, /* flush */ caca_get_message_width /* get_message_width */ }; diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 1bebd0eba5..4eb656f625 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -447,12 +447,6 @@ static const struct font_glyph* ctr_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void ctr_font_bind_block(void* data, void* userdata) -{ - (void)data; -} - - font_renderer_t ctr_font = { ctr_font_init_font, @@ -460,7 +454,7 @@ font_renderer_t ctr_font = ctr_font_render_msg, "ctrfont", ctr_font_get_glyph, - ctr_font_bind_block, + NULL, /* bind_block */ NULL, /* flush_block */ ctr_font_get_message_width, }; diff --git a/gfx/drivers_font/d3d10_font.c b/gfx/drivers_font/d3d10_font.c index 333ff64106..80bb3c357d 100644 --- a/gfx/drivers_font/d3d10_font.c +++ b/gfx/drivers_font/d3d10_font.c @@ -362,18 +362,13 @@ static const struct font_glyph* d3d10_font_get_glyph(void *data, uint32_t code) return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void d3d10_font_bind_block(void* data, void *userdata) -{ - (void)data; -} - font_renderer_t d3d10_font = { d3d10_font_init_font, d3d10_font_free_font, d3d10_font_render_msg, "d3d10font", d3d10_font_get_glyph, - d3d10_font_bind_block, + NULL, /* bind_block */ NULL, /* flush */ d3d10_font_get_message_width, }; diff --git a/gfx/drivers_font/d3d11_font.c b/gfx/drivers_font/d3d11_font.c index 2b9fc2c301..de4f29ade3 100644 --- a/gfx/drivers_font/d3d11_font.c +++ b/gfx/drivers_font/d3d11_font.c @@ -359,18 +359,13 @@ static const struct font_glyph* d3d11_font_get_glyph(void *data, uint32_t code) return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void d3d11_font_bind_block(void* data, void *userdata) -{ - (void)data; -} - font_renderer_t d3d11_font = { d3d11_font_init_font, d3d11_font_free_font, d3d11_font_render_msg, "d3d11font", d3d11_font_get_glyph, - d3d11_font_bind_block, + NULL, /* bind_block */ NULL, /* flush */ d3d11_font_get_message_width, }; diff --git a/gfx/drivers_font/d3d12_font.c b/gfx/drivers_font/d3d12_font.c index 3276f8d1fb..d7f81262bc 100644 --- a/gfx/drivers_font/d3d12_font.c +++ b/gfx/drivers_font/d3d12_font.c @@ -376,18 +376,13 @@ static const struct font_glyph* d3d12_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void d3d12_font_bind_block(void* data, void* userdata) -{ - (void)data; -} - font_renderer_t d3d12_font = { d3d12_font_init_font, d3d12_font_free_font, d3d12_font_render_msg, "d3d12font", d3d12_font_get_glyph, - d3d12_font_bind_block, + NULL, /* bind_block */ NULL, /* flush */ d3d12_font_get_message_width, }; diff --git a/gfx/drivers_font/metal_raster_font.m b/gfx/drivers_font/metal_raster_font.m index 1fc15fc3aa..287410f150 100644 --- a/gfx/drivers_font/metal_raster_font.m +++ b/gfx/drivers_font/metal_raster_font.m @@ -529,7 +529,7 @@ static const struct font_glyph *metal_raster_font_get_glyph( } static void metal_raster_font_flush_block(unsigned width, unsigned height, - void *data, video_frame_info_t *video_info) + void *data, video_frame_info_t *video_info) { (void)data; } diff --git a/gfx/drivers_font/sixel_font.c b/gfx/drivers_font/sixel_font.c index d7082e37d1..674d9d460a 100644 --- a/gfx/drivers_font/sixel_font.c +++ b/gfx/drivers_font/sixel_font.c @@ -127,24 +127,13 @@ static void sixel_render_msg(video_frame_info_t *video_info, /* FIXME: add text drawing support */ } -static void sixel_font_flush_block(unsigned width, unsigned height, - void* data) -{ - (void)data; -} - -static void sixel_font_bind_block(void* data, void* userdata) -{ - (void)data; -} - font_renderer_t sixel_font = { sixel_init_font, sixel_render_free_font, sixel_render_msg, "sixel font", sixel_font_get_glyph, /* get_glyph */ - sixel_font_bind_block, /* bind_block */ - sixel_font_flush_block, /* flush */ + NULL, /* bind_block */ + NULL, /* flush */ sixel_get_message_width /* get_message_width */ }; diff --git a/gfx/drivers_font/vga_font.c b/gfx/drivers_font/vga_font.c index 794c727bea..c223b3e201 100644 --- a/gfx/drivers_font/vga_font.c +++ b/gfx/drivers_font/vga_font.c @@ -126,18 +126,13 @@ static void vga_render_msg(video_frame_info_t *video_info, } } -static void vga_font_bind_block(void* data, void* userdata) -{ - (void)data; -} - font_renderer_t vga_font = { vga_init_font, vga_render_free_font, vga_render_msg, "vga font", vga_font_get_glyph, /* get_glyph */ - vga_font_bind_block, /* bind_block */ + NULL, /* bind_block */ NULL, /* flush */ vga_get_message_width /* get_message_width */ }; diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index d3fa780378..72c3d847f1 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -347,18 +347,13 @@ static const struct font_glyph *vita2d_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void vita2d_font_bind_block(void *data, void *userdata) -{ - (void)data; -} - font_renderer_t vita2d_vita_font = { vita2d_font_init_font, vita2d_font_free_font, vita2d_font_render_msg, "vita2dfont", vita2d_font_get_glyph, - vita2d_font_bind_block, + NULL, /* bind_block */ NULL, /* flush */ vita2d_font_get_message_width, }; diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 9d4edb6a7e..5fe9a13abc 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -436,24 +436,13 @@ static const struct font_glyph *vulkan_raster_font_get_glyph( return glyph; } -static void vulkan_raster_font_flush_block(unsigned width, unsigned height, - void *data, video_frame_info_t *video_info) -{ - (void)data; -} - -static void vulkan_raster_font_bind_block(void *data, void *userdata) -{ - (void)data; -} - font_renderer_t vulkan_raster_font = { vulkan_raster_font_init_font, vulkan_raster_font_free_font, vulkan_raster_font_render_msg, "Vulkan raster", vulkan_raster_font_get_glyph, - vulkan_raster_font_bind_block, - vulkan_raster_font_flush_block, + NULL, /* bind_block */ + NULL, /* flush_block */ vulkan_get_message_width }; diff --git a/gfx/drivers_font/wiiu_font.c b/gfx/drivers_font/wiiu_font.c index b959c89664..447360e582 100644 --- a/gfx/drivers_font/wiiu_font.c +++ b/gfx/drivers_font/wiiu_font.c @@ -377,12 +377,6 @@ static const struct font_glyph* wiiu_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void wiiu_font_bind_block(void* data, void* userdata) -{ - (void)data; -} - - font_renderer_t wiiu_font = { wiiu_font_init_font, @@ -390,7 +384,7 @@ font_renderer_t wiiu_font = wiiu_font_render_msg, "wiiufont", wiiu_font_get_glyph, - wiiu_font_bind_block, + NULL, /* bind_block */ NULL, /* flush */ wiiu_font_get_message_width, };