diff --git a/gfx/drivers_display/gfx_display_ctr.c b/gfx/drivers_display/gfx_display_ctr.c index f5ef7cdb08..75088c489b 100644 --- a/gfx/drivers_display/gfx_display_ctr.c +++ b/gfx/drivers_display/gfx_display_ctr.c @@ -22,7 +22,6 @@ #include "../gfx_display.h" #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/ctr_common.h" #include "../drivers/ctr_gu.h" #include "../../ctr/gpu_old.h" @@ -127,24 +126,6 @@ static void gfx_display_ctr_draw(gfx_display_ctx_draw_t *draw, } GPU_SetTexEnv(0, GPU_TEXTURE0, GPU_TEXTURE0, 0, 0, GPU_REPLACE, GPU_REPLACE, 0); -#if 0 - printf("(%i,%i,%i,%i) , (%i,%i)\n", (int)draw->x, - (int)draw->y, (int)draw->width, (int)draw->height, - texture->width, texture->height); -#endif -} - -static bool gfx_display_ctr_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_CTR); - return *handle; } gfx_display_ctx_driver_t gfx_display_ctx_ctr = { @@ -155,7 +136,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_ctr = { NULL, /* get_default_mvp */ NULL, /* get_default_vertices */ NULL, /* get_default_tex_coords */ - gfx_display_ctr_font_init_first, + FONT_DRIVER_RENDER_CTR, GFX_VIDEO_DRIVER_CTR, "ctr", true, diff --git a/gfx/drivers_display/gfx_display_d3d10.c b/gfx/drivers_display/gfx_display_d3d10.c index 3bd0b628c6..af793316fe 100644 --- a/gfx/drivers_display/gfx_display_d3d10.c +++ b/gfx/drivers_display/gfx_display_d3d10.c @@ -25,7 +25,6 @@ #include "../gfx_display.h" #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/d3d10_common.h" static void gfx_display_d3d10_blend_begin(void *data) @@ -240,23 +239,6 @@ static void gfx_display_d3d10_draw_pipeline(gfx_display_ctx_draw_t* draw, } } -static bool gfx_display_d3d10_font_init_first( - void** font_handle, - void* video_data, - const char* font_path, - float menu_font_size, - bool is_threaded) -{ - font_data_t** handle = (font_data_t**)font_handle; - font_data_t* new_handle = font_driver_init_first( - video_data, font_path, menu_font_size, true, - is_threaded, FONT_DRIVER_RENDER_D3D10_API); - if (!new_handle) - return false; - *handle = new_handle; - return true; -} - void gfx_display_d3d10_scissor_begin(void *data, unsigned video_width, unsigned video_height, int x, int y, unsigned width, unsigned height) @@ -300,7 +282,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d10 = { NULL, /* get_default_mvp */ NULL, /* get_default_vertices */ NULL, /* get_default_tex_coords */ - gfx_display_d3d10_font_init_first, + FONT_DRIVER_RENDER_D3D10_API, GFX_VIDEO_DRIVER_DIRECT3D10, "d3d10", true, diff --git a/gfx/drivers_display/gfx_display_d3d11.c b/gfx/drivers_display/gfx_display_d3d11.c index 66317e626f..0a92158341 100644 --- a/gfx/drivers_display/gfx_display_d3d11.c +++ b/gfx/drivers_display/gfx_display_d3d11.c @@ -24,7 +24,6 @@ #include "../gfx_display.h" #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/d3d11_common.h" static void gfx_display_d3d11_blend_begin(void *data) @@ -271,23 +270,6 @@ static void gfx_display_d3d11_draw_pipeline(gfx_display_ctx_draw_t *draw, } } -static bool gfx_display_d3d11_font_init_first( - void** font_handle, - void* video_data, - const char* font_path, - float menu_font_size, - bool is_threaded) -{ - font_data_t** handle = (font_data_t**)font_handle; - font_data_t* new_handle = font_driver_init_first( - video_data, font_path, menu_font_size, true, - is_threaded, FONT_DRIVER_RENDER_D3D11_API); - if (!new_handle) - return false; - *handle = new_handle; - return true; -} - void gfx_display_d3d11_scissor_begin(void *data, unsigned video_width, unsigned video_height, @@ -333,7 +315,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d11 = { NULL, /* get_default_mvp */ NULL, /* get_default_vertices */ NULL, /* get_default_tex_coords */ - gfx_display_d3d11_font_init_first, + FONT_DRIVER_RENDER_D3D11_API, GFX_VIDEO_DRIVER_DIRECT3D11, "d3d11", true, diff --git a/gfx/drivers_display/gfx_display_d3d12.c b/gfx/drivers_display/gfx_display_d3d12.c index 2b2de993b2..73e8602476 100644 --- a/gfx/drivers_display/gfx_display_d3d12.c +++ b/gfx/drivers_display/gfx_display_d3d12.c @@ -24,7 +24,6 @@ #include "../gfx_display.h" #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/d3d12_common.h" static void gfx_display_d3d12_blend_begin(void *data) @@ -247,22 +246,6 @@ static void gfx_display_d3d12_draw_pipeline(gfx_display_ctx_draw_t *draw, d3d12->queue.cmd, ROOT_ID_UBO, d3d12->ubo_view.BufferLocation); } -static bool gfx_display_d3d12_font_init_first( - void** font_handle, - void* video_data, - const char* font_path, - float menu_font_size, - bool is_threaded) -{ - font_data_t** handle = (font_data_t**)font_handle; - font_data_t* new_handle = font_driver_init_first( - video_data, font_path, menu_font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D12_API); - if (!new_handle) - return false; - *handle = new_handle; - return true; -} - void gfx_display_d3d12_scissor_begin(void *data, unsigned video_width, unsigned video_height, int x, int y, unsigned width, unsigned height) @@ -307,7 +290,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d12 = { NULL, /* get_default_mvp */ NULL, /* get_default_vertices */ NULL, /* get_default_tex_coords */ - gfx_display_d3d12_font_init_first, + FONT_DRIVER_RENDER_D3D12_API, GFX_VIDEO_DRIVER_DIRECT3D12, "d3d12", true, diff --git a/gfx/drivers_display/gfx_display_d3d8.c b/gfx/drivers_display/gfx_display_d3d8.c index 4cf982c20c..30c72899fa 100644 --- a/gfx/drivers_display/gfx_display_d3d8.c +++ b/gfx/drivers_display/gfx_display_d3d8.c @@ -234,20 +234,6 @@ static void gfx_display_d3d8_draw(gfx_display_ctx_draw_t *draw, d3d->menu_display.offset += draw->coords->vertices; } -static bool gfx_display_d3d8_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - if (!(*handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_D3D8_API))) - return false; - return true; -} - gfx_display_ctx_driver_t gfx_display_ctx_d3d8 = { gfx_display_d3d8_draw, NULL, /* draw_pipeline */ @@ -256,7 +242,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d8 = { gfx_display_d3d8_get_default_mvp, gfx_display_d3d8_get_default_vertices, gfx_display_d3d8_get_default_tex_coords, - gfx_display_d3d8_font_init_first, + FONT_DRIVER_RENDER_D3D8_API, GFX_VIDEO_DRIVER_DIRECT3D8, "d3d8", false, diff --git a/gfx/drivers_display/gfx_display_d3d9cg.c b/gfx/drivers_display/gfx_display_d3d9cg.c index 09c63e6099..14c97da393 100644 --- a/gfx/drivers_display/gfx_display_d3d9cg.c +++ b/gfx/drivers_display/gfx_display_d3d9cg.c @@ -264,20 +264,6 @@ static void gfx_display_d3d9_cg_draw_pipeline(gfx_display_ctx_draw_t *draw, } } -static bool gfx_display_d3d9_cg_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float menu_font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - if (!(*handle = font_driver_init_first(video_data, - font_path, menu_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_D3D9_API))) - return false; - return true; -} - void gfx_display_d3d9_cg_scissor_begin( void *data, unsigned video_width, unsigned video_height, @@ -322,7 +308,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d9_cg = { gfx_display_d3d9_cg_get_default_mvp, gfx_display_d3d9_cg_get_default_vertices, gfx_display_d3d9_cg_get_default_tex_coords, - gfx_display_d3d9_cg_font_init_first, + FONT_DRIVER_RENDER_D3D9_API, GFX_VIDEO_DRIVER_DIRECT3D9_CG, "d3d9_cg", false, diff --git a/gfx/drivers_display/gfx_display_d3d9hlsl.c b/gfx/drivers_display/gfx_display_d3d9hlsl.c index 5688ace1eb..9db374db3e 100644 --- a/gfx/drivers_display/gfx_display_d3d9hlsl.c +++ b/gfx/drivers_display/gfx_display_d3d9hlsl.c @@ -271,20 +271,6 @@ static void gfx_display_d3d9_hlsl_draw_pipeline( } } -static bool gfx_display_d3d9_hlsl_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float menu_font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - if (!(*handle = font_driver_init_first(video_data, - font_path, menu_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_D3D9_API))) - return false; - return true; -} - void gfx_display_d3d9_hlsl_scissor_begin( void *data, unsigned video_width, unsigned video_height, @@ -329,7 +315,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d9_hlsl = { gfx_display_d3d9_hlsl_get_default_mvp, gfx_display_d3d9_hlsl_get_default_vertices, gfx_display_d3d9_hlsl_get_default_tex_coords, - gfx_display_d3d9_hlsl_font_init_first, + FONT_DRIVER_RENDER_D3D9_API, GFX_VIDEO_DRIVER_DIRECT3D9_HLSL, "d3d9_hlsl", false, diff --git a/gfx/drivers_display/gfx_display_gdi.c b/gfx/drivers_display/gfx_display_gdi.c index d5fa9d992e..3903821727 100644 --- a/gfx/drivers_display/gfx_display_gdi.c +++ b/gfx/drivers_display/gfx_display_gdi.c @@ -21,7 +21,6 @@ #include #include "../../config.def.h" -#include "../font_driver.h" #include "../../retroarch.h" #include "../../verbosity.h" @@ -114,20 +113,6 @@ static void gfx_display_gdi_draw(gfx_display_ctx_draw_t *draw, } } -static bool gfx_display_gdi_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float gdi_font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - if (!(*handle = font_driver_init_first(video_data, - font_path, gdi_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_GDI))) - return false; - return true; -} - gfx_display_ctx_driver_t gfx_display_ctx_gdi = { gfx_display_gdi_draw, NULL, /* draw_pipeline */ @@ -136,7 +121,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_gdi = { NULL, /* get_default_mvp */ gfx_display_gdi_get_default_vertices, gfx_display_gdi_get_default_tex_coords, - gfx_display_gdi_font_init_first, + FONT_DRIVER_RENDER_GDI, GFX_VIDEO_DRIVER_GDI, "gdi", false, diff --git a/gfx/drivers_display/gfx_display_gl1.c b/gfx/drivers_display/gfx_display_gl1.c index 66e8376e04..22be7fdfcd 100644 --- a/gfx/drivers_display/gfx_display_gl1.c +++ b/gfx/drivers_display/gfx_display_gl1.c @@ -21,7 +21,6 @@ #endif #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/gl1_common.h" #include "../gfx_display.h" @@ -167,20 +166,6 @@ static void gfx_display_gl1_draw(gfx_display_ctx_draw_t *draw, gl1->coords.color = gl1->white_color_ptr; } -static bool gfx_display_gl1_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float menu_font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - if (!(*handle = font_driver_init_first(video_data, - font_path, menu_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_OPENGL1_API))) - return false; - return true; -} - static void gfx_display_gl1_scissor_begin(void *data, unsigned video_width, unsigned video_height, @@ -208,7 +193,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_gl1 = { gfx_display_gl1_get_default_mvp, gfx_display_gl1_get_default_vertices, gfx_display_gl1_get_default_tex_coords, - gfx_display_gl1_font_init_first, + FONT_DRIVER_RENDER_OPENGL1_API, GFX_VIDEO_DRIVER_OPENGL1, "gl1", false, diff --git a/gfx/drivers_display/gfx_display_gl2.c b/gfx/drivers_display/gfx_display_gl2.c index 9a606323a4..6d0493bbd6 100644 --- a/gfx/drivers_display/gfx_display_gl2.c +++ b/gfx/drivers_display/gfx_display_gl2.c @@ -20,7 +20,6 @@ #endif #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/gl2_common.h" #include "../gfx_display.h" @@ -331,20 +330,6 @@ static void gfx_display_gl2_draw_pipeline( #endif } -static bool gfx_display_gl2_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float menu_font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - if (!(*handle = font_driver_init_first(video_data, - font_path, menu_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_OPENGL_API))) - return false; - return true; -} - static void gfx_display_gl2_scissor_begin( void *data, unsigned video_width, @@ -387,7 +372,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_gl = { gfx_display_gl2_get_default_mvp, gfx_display_gl2_get_default_vertices, gfx_display_gl2_get_default_tex_coords, - gfx_display_gl2_font_init_first, + FONT_DRIVER_RENDER_OPENGL_API, GFX_VIDEO_DRIVER_OPENGL, "gl", false, diff --git a/gfx/drivers_display/gfx_display_gl3.c b/gfx/drivers_display/gfx_display_gl3.c index 00d39e40c7..9cb98f9bbb 100644 --- a/gfx/drivers_display/gfx_display_gl3.c +++ b/gfx/drivers_display/gfx_display_gl3.c @@ -24,7 +24,6 @@ #include "../gfx_display.h" -#include "../font_driver.h" #include "../../retroarch.h" static const float gl3_vertexes[] = { @@ -293,22 +292,6 @@ static void gfx_display_gl3_blend_end(void *data) glDisable(GL_BLEND); } -static bool gfx_display_gl3_font_init_first( - void **font_handle, void *video_data, const char *font_path, - float menu_font_size, bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, menu_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_OPENGL_CORE_API); - - if (*handle) - return true; - - return false; -} - static void gfx_display_gl3_scissor_begin(void *data, unsigned video_width, unsigned video_height, @@ -334,7 +317,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_gl3 = { gfx_display_gl3_get_default_mvp, gfx_display_gl3_get_default_vertices, gfx_display_gl3_get_default_tex_coords, - gfx_display_gl3_font_init_first, + FONT_DRIVER_RENDER_OPENGL_CORE_API, GFX_VIDEO_DRIVER_OPENGL_CORE, "glcore", false, diff --git a/gfx/drivers_display/gfx_display_metal.m b/gfx/drivers_display/gfx_display_metal.m index 481adb4403..9a790d4e7c 100644 --- a/gfx/drivers_display/gfx_display_metal.m +++ b/gfx/drivers_display/gfx_display_metal.m @@ -21,7 +21,6 @@ #include "../gfx_display.h" -#include "../font_driver.h" #include "../../retroarch.h" #import "../common/metal_common.h" @@ -113,23 +112,6 @@ static void gfx_display_metal_scissor_end(void *data, [md.display clearScissorRect]; } -static bool gfx_display_metal_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t **)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_METAL_API); - - if (*handle) - return true; - - return false; -} - gfx_display_ctx_driver_t gfx_display_ctx_metal = { .draw = gfx_display_metal_draw, .draw_pipeline = gfx_display_metal_draw_pipeline, @@ -138,7 +120,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_metal = { .get_default_mvp = gfx_display_metal_get_default_mvp, .get_default_vertices = gfx_display_metal_get_default_vertices, .get_default_tex_coords = gfx_display_metal_get_default_tex_coords, - .font_init_first = gfx_display_metal_font_init_first, + .font_type = FONT_DRIVER_RENDER_METAL_API, .type = GFX_VIDEO_DRIVER_METAL, .ident = "metal", .handles_transform = NO, diff --git a/gfx/drivers_display/gfx_display_rsx.c b/gfx/drivers_display/gfx_display_rsx.c index 2bbb17de5e..089b910ceb 100644 --- a/gfx/drivers_display/gfx_display_rsx.c +++ b/gfx/drivers_display/gfx_display_rsx.c @@ -23,7 +23,6 @@ #include "../../retroarch.h" #include "../common/rsx_common.h" -#include "../font_driver.h" static const float rsx_vertexes[] = { 0, 0, @@ -132,19 +131,6 @@ static void gfx_display_rsx_draw(gfx_display_ctx_draw_t *draw, rsxDrawVertexArray(rsx->context, GCM_TYPE_TRIANGLE_STRIP, 0, draw->coords->vertices); } -static bool gfx_display_rsx_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_RSX); - return *handle; -} - static void gfx_display_rsx_scissor_begin(void *data, unsigned video_width, unsigned video_height, @@ -196,7 +182,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_rsx = { gfx_display_rsx_get_default_mvp, gfx_display_rsx_get_default_vertices, gfx_display_rsx_get_default_tex_coords, - gfx_display_rsx_font_init_first, + FONT_DRIVER_RENDER_RSX, GFX_VIDEO_DRIVER_RSX, "rsx", true, diff --git a/gfx/drivers_display/gfx_display_switch.c b/gfx/drivers_display/gfx_display_switch.c index 80727eacc4..fbc01f193e 100644 --- a/gfx/drivers_display/gfx_display_switch.c +++ b/gfx/drivers_display/gfx_display_switch.c @@ -17,7 +17,6 @@ #include #include -#include "../font_driver.h" #include "../../retroarch.h" #include "../gfx_display.h" @@ -25,19 +24,6 @@ static void gfx_display_switch_draw(gfx_display_ctx_draw_t *draw, void *data, unsigned video_width, unsigned video_height) { } -static bool gfx_display_switch_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_SWITCH); - return *handle; -} - static const float *gfx_display_switch_get_default_vertices(void) { static float dummy[16] = {0.0f}; @@ -58,7 +44,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_switch = { NULL, /* get_default_mvp */ gfx_display_switch_get_default_vertices, gfx_display_switch_get_default_tex_coords, - gfx_display_switch_font_init_first, + FONT_DRIVER_RENDER_SWITCH, GFX_VIDEO_DRIVER_SWITCH, "switch", false, diff --git a/gfx/drivers_display/gfx_display_vita2d.c b/gfx/drivers_display/gfx_display_vita2d.c index f2744ce9c8..00b4194240 100644 --- a/gfx/drivers_display/gfx_display_vita2d.c +++ b/gfx/drivers_display/gfx_display_vita2d.c @@ -24,7 +24,6 @@ #include "../gfx_display.h" #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/vita2d_common.h" #include @@ -131,19 +130,6 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw, } } -static bool gfx_display_vita2d_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_VITA2D); - return *handle; -} - static void gfx_display_vita2d_scissor_begin(void *data, unsigned video_width, unsigned video_height, @@ -172,7 +158,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_vita2d = { gfx_display_vita2d_get_default_mvp, gfx_display_vita2d_get_default_vertices, gfx_display_vita2d_get_default_tex_coords, - gfx_display_vita2d_font_init_first, + FONT_DRIVER_RENDER_VITA2D, GFX_VIDEO_DRIVER_VITA2D, "vita2d", true, diff --git a/gfx/drivers_display/gfx_display_vulkan.c b/gfx/drivers_display/gfx_display_vulkan.c index acd12d3d28..5cd3902c5b 100644 --- a/gfx/drivers_display/gfx_display_vulkan.c +++ b/gfx/drivers_display/gfx_display_vulkan.c @@ -22,7 +22,6 @@ #include "../gfx_display.h" -#include "../font_driver.h" #include "../../retroarch.h" #include "../common/vulkan_common.h" @@ -287,22 +286,6 @@ static void gfx_display_vk_blend_end(void *data) vk->display.blend = false; } -static bool gfx_display_vk_font_init_first( - void **font_handle, void *video_data, const char *font_path, - float menu_font_size, bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, menu_font_size, true, - is_threaded, - FONT_DRIVER_RENDER_VULKAN_API); - - if (*handle) - return true; - - return false; -} - static void gfx_display_vk_scissor_begin( void *data, unsigned video_width, @@ -341,7 +324,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_vulkan = { gfx_display_vk_get_default_mvp, gfx_display_vk_get_default_vertices, gfx_display_vk_get_default_tex_coords, - gfx_display_vk_font_init_first, + FONT_DRIVER_RENDER_VULKAN_API, GFX_VIDEO_DRIVER_VULKAN, "vulkan", false, diff --git a/gfx/drivers_display/gfx_display_wiiu.c b/gfx/drivers_display/gfx_display_wiiu.c index 83fe7925ab..23c9831d03 100644 --- a/gfx/drivers_display/gfx_display_wiiu.c +++ b/gfx/drivers_display/gfx_display_wiiu.c @@ -23,7 +23,6 @@ #include "../gfx_display.h" #include "../../retroarch.h" -#include "../font_driver.h" #include "../common/gx2_common.h" #include "../../wiiu/system/memory.h" #include "../../wiiu/wiiu_dbg.h" @@ -263,19 +262,6 @@ static void gfx_display_wiiu_draw_pipeline( GX2SetPixelUniformBlock(1, sizeof(*wiiu->menu_shader_ubo), wiiu->menu_shader_ubo); } -static bool gfx_display_wiiu_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_WIIU); - return *handle; -} - static void gfx_display_wiiu_scissor_begin( void *data, unsigned video_width, @@ -303,7 +289,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_wiiu = { NULL, /* get_default_mvp */ NULL, /* get_default_vertices */ NULL, /* get_default_tex_coords */ - gfx_display_wiiu_font_init_first, + FONT_DRIVER_RENDER_WIIU, GFX_VIDEO_DRIVER_WIIU, "gx2", true, diff --git a/gfx/gfx_display.c b/gfx/gfx_display.c index 0b96e538f2..80df9f6c75 100644 --- a/gfx/gfx_display.c +++ b/gfx/gfx_display.c @@ -43,16 +43,14 @@ gfx_display_t *disp_get_ptr(void) return &dispgfx_st; } -static bool gfx_display_null_font_init_first( +static bool gfx_display_font_init_first( void **font_handle, void *video_data, const char *font_path, float font_size, - bool is_threaded) + bool is_threaded, enum font_driver_render_api font_type) { font_data_t **handle = (font_data_t**)font_handle; return ((*handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_DONT_CARE))); + font_path, font_size, true, is_threaded, font_type))); } static const float *null_get_default_matrix(void) @@ -69,7 +67,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_null = { NULL, /* get_default_mvp */ null_get_default_matrix, null_get_default_matrix, - gfx_display_null_font_init_first, + FONT_DRIVER_RENDER_DONT_CARE, GFX_VIDEO_DRIVER_GENERIC, "null", false, @@ -487,9 +485,9 @@ font_data_t *gfx_display_font_file( if (font_size < 2.0f) font_size = 2.0f; - if (!dispctx->font_init_first((void**)&font_data, + if (!gfx_display_font_init_first((void**)&font_data, video_driver_get_ptr(), - fontpath, font_size, is_threaded)) + fontpath, font_size, is_threaded, dispctx->font_type)) return NULL; return font_data; diff --git a/gfx/gfx_display.h b/gfx/gfx_display.h index 337b2ffd17..39d1b2b6d4 100644 --- a/gfx/gfx_display.h +++ b/gfx/gfx_display.h @@ -137,11 +137,7 @@ typedef struct gfx_display_ctx_driver const float *(*get_default_vertices)(void); /* Get the default texture coordinates matrix */ const float *(*get_default_tex_coords)(void); - /* Initialize the first compatible font driver for this menu driver. */ - bool (*font_init_first)( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded); + enum font_driver_render_api font_type; enum gfx_display_driver_type type; const char *ident; bool handles_transform;