This commit is contained in:
libretroadmin 2023-06-15 23:51:29 +02:00
parent 0c51321099
commit 8ea67c0d99
3 changed files with 6 additions and 7 deletions

View File

@ -916,12 +916,11 @@ font_data_t *font_driver_init_first(
void font_driver_init_osd(
void *video_data,
const void *video_info_data,
const video_info_t *video_info,
bool threading_hint,
bool is_threaded,
enum font_driver_render_api api)
{
const video_info_t *video_info = (const video_info_t*)video_info_data;
if (!video_font_driver && video_info)
video_font_driver = font_driver_init_first(video_data,
*video_info->path_font ? video_info->path_font : NULL,

View File

@ -98,7 +98,7 @@ font_data_t *font_driver_init_first(
void font_driver_init_osd(
void *video_data,
const void *video_info_data,
const video_info_t *video_info,
bool threading_hint,
bool is_threaded,
enum font_driver_render_api api);

View File

@ -1058,7 +1058,7 @@ static void xmb_render_messagebox_internal(
if (!string_is_empty(msg))
{
int width = font_driver_get_message_width(
xmb->font, msg, strlen(msg), 1);
xmb->font, msg, strlen(msg), 1.0f);
if (width > longest_width)
longest_width = width;
}
@ -6097,7 +6097,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
percent_width = (unsigned)
font_driver_get_message_width(
xmb->font, msg, strlen(msg), 1);
xmb->font, msg, strlen(msg), 1.0f);
xmb_draw_text(xmb_shadows_enable, xmb, settings, msg,
video_width - xmb->margins_title_left - x_pos,
@ -7363,9 +7363,9 @@ static void xmb_context_reset_internal(xmb_handle_t *xmb,
if (wideglyph_str)
{
int char_width =
font_driver_get_message_width(xmb->font, "a", 1, 1);
font_driver_get_message_width(xmb->font, "a", 1, 1.0f);
int wideglyph_width =
font_driver_get_message_width(xmb->font, wideglyph_str, strlen(wideglyph_str), 1);
font_driver_get_message_width(xmb->font, wideglyph_str, strlen(wideglyph_str), 1.0f);
if (wideglyph_width > 0 && char_width > 0)
xmb->wideglyph_width = wideglyph_width * 100 / char_width;