mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Fix sigsegv and improve font fallback logic
This commit is contained in:
parent
846b42300c
commit
b85dfec4d4
@ -87,6 +87,9 @@ bool font_init_first(const void **font_driver, void **font_handle,
|
|||||||
void *video_data, const char *font_path, float font_size,
|
void *video_data, const char *font_path, float font_size,
|
||||||
enum font_driver_render_api api)
|
enum font_driver_render_api api)
|
||||||
{
|
{
|
||||||
|
if (font_path && !font_path[0])
|
||||||
|
font_path = NULL;
|
||||||
|
|
||||||
switch (api)
|
switch (api)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_D3D
|
#ifdef HAVE_D3D
|
||||||
|
@ -179,9 +179,6 @@ bool menu_display_init_main_font(menu_handle_t *menu,
|
|||||||
if (menu->font.buf)
|
if (menu->font.buf)
|
||||||
menu_display_free_main_font(menu);
|
menu_display_free_main_font(menu);
|
||||||
|
|
||||||
if (!font_path[0])
|
|
||||||
font_path = NULL;
|
|
||||||
|
|
||||||
result = menu_display_font_init_first(
|
result = menu_display_font_init_first(
|
||||||
(const void**)&driver->font_osd_driver, &menu->font.buf, video,
|
(const void**)&driver->font_osd_driver, &menu->font.buf, video,
|
||||||
font_path, font_size);
|
font_path, font_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user