Should save font renderer API now
This commit is contained in:
parent
eae2f3eeda
commit
92632a4dbb
|
@ -17,6 +17,8 @@
|
||||||
#include "font_driver.h"
|
#include "font_driver.h"
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
|
|
||||||
|
static enum font_driver_render_api selected_api;
|
||||||
|
|
||||||
#ifdef HAVE_D3D
|
#ifdef HAVE_D3D
|
||||||
static const font_renderer_t *d3d_font_backends[] = {
|
static const font_renderer_t *d3d_font_backends[] = {
|
||||||
#if defined(_XBOX1)
|
#if defined(_XBOX1)
|
||||||
|
@ -116,7 +118,10 @@ bool font_init_first(const void **font_driver, void **font_handle,
|
||||||
if (font_path && !font_path[0])
|
if (font_path && !font_path[0])
|
||||||
font_path = NULL;
|
font_path = NULL;
|
||||||
|
|
||||||
switch (api)
|
if (selected_api != FONT_DRIVER_RENDER_DONT_CARE)
|
||||||
|
selected_api = api;
|
||||||
|
|
||||||
|
switch (selected_api)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_D3D
|
#ifdef HAVE_D3D
|
||||||
case FONT_DRIVER_RENDER_DIRECT3D_API:
|
case FONT_DRIVER_RENDER_DIRECT3D_API:
|
||||||
|
|
|
@ -154,7 +154,7 @@ bool menu_display_font_init_first(const void **font_driver,
|
||||||
pkt.data.font_init.video_data = video_data;
|
pkt.data.font_init.video_data = video_data;
|
||||||
pkt.data.font_init.font_path = font_path;
|
pkt.data.font_init.font_path = font_path;
|
||||||
pkt.data.font_init.font_size = font_size;
|
pkt.data.font_init.font_size = font_size;
|
||||||
pkt.data.font_init.api = FONT_DRIVER_RENDER_OPENGL_API;
|
pkt.data.font_init.api = FONT_DRIVER_RENDER_DONT_CARE;
|
||||||
|
|
||||||
thr->send_and_wait(thr, &pkt);
|
thr->send_and_wait(thr, &pkt);
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ bool menu_display_font_init_first(const void **font_driver,
|
||||||
}
|
}
|
||||||
|
|
||||||
return font_init_first(font_driver, font_handle, video_data,
|
return font_init_first(font_driver, font_handle, video_data,
|
||||||
font_path, font_size, FONT_DRIVER_RENDER_OPENGL_API);
|
font_path, font_size, FONT_DRIVER_RENDER_DONT_CARE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_display_font_bind_block(void *data, const void *font_data, void *userdata)
|
bool menu_display_font_bind_block(void *data, const void *font_data, void *userdata)
|
||||||
|
|
Loading…
Reference in New Issue