mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
[LIBNX] Fix font driver
This commit is contained in:
parent
870cd941e3
commit
fd155db9cc
@ -110,7 +110,7 @@ NO_ICON := 1
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) -Ideps -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h $(shell $(DEVKITPRO)/portlibs/switch/bin/freetype-config --cflags)
|
||||
$(ARCH) $(DEFINES) -Ideps -Ideps/libz -Ilibretro-common/include -Ideps/stb -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(DEVKITPRO)/portlibs/switch/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1
|
||||
|
||||
|
@ -524,6 +524,37 @@ static bool ctr_font_init_first(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
static const font_renderer_t *switch_font_backends[] = {
|
||||
&switch_font,
|
||||
NULL
|
||||
};
|
||||
|
||||
static bool switch_font_init_first(
|
||||
const void **font_driver, void **font_handle,
|
||||
void *video_data, const char *font_path,
|
||||
float font_size, bool is_threaded)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; switch_font_backends[i]; i++)
|
||||
{
|
||||
void *data = switch_font_backends[i]->init(
|
||||
video_data, font_path, font_size,
|
||||
is_threaded);
|
||||
|
||||
if (!data)
|
||||
continue;
|
||||
|
||||
*font_driver = switch_font_backends[i];
|
||||
*font_handle = data;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WIIU
|
||||
static const font_renderer_t *wiiu_font_backends[] = {
|
||||
&wiiu_font,
|
||||
@ -630,6 +661,11 @@ static bool font_init_first(
|
||||
return sixel_font_init_first(font_driver, font_handle,
|
||||
video_data, font_path, font_size, is_threaded);
|
||||
#endif
|
||||
#ifdef HAVE_LIBNX
|
||||
case FONT_DRIVER_RENDER_SWITCH:
|
||||
return switch_font_init_first(font_driver, font_handle,
|
||||
video_data, font_path, font_size, is_threaded);
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
case FONT_DRIVER_RENDER_GDI:
|
||||
return gdi_font_init_first(font_driver, font_handle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user