mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Menu) Fix a regression in xmb_draw_text
This commit is contained in:
parent
a912a64514
commit
29d07d1ba6
@ -245,10 +245,13 @@ static void mui_draw_tab(mui_handle_t *mui,
|
||||
static void mui_draw_text(float x, float y, unsigned width, unsigned height,
|
||||
const char *msg, uint32_t color, enum text_alignment text_align)
|
||||
{
|
||||
int font_size;
|
||||
struct font_params params;
|
||||
|
||||
params.x = x;
|
||||
params.y = y;
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_SIZE, &font_size);
|
||||
|
||||
params.x = x / width;
|
||||
params.y = 1.0f - (y + font_size / 3) / height;
|
||||
params.scale = 1.0f;
|
||||
params.drop_mod = 0.0f;
|
||||
params.drop_x = 0.0f;
|
||||
|
@ -512,8 +512,8 @@ static void xmb_draw_text(xmb_handle_t *xmb,
|
||||
|| y < -xmb->icon.size || y > height + xmb->icon.size)
|
||||
return;
|
||||
|
||||
params.x = x;
|
||||
params.y = y;
|
||||
params.x = x / width;
|
||||
params.y = 1.0f - y / height;
|
||||
params.scale = scale_factor;
|
||||
params.drop_mod = 0.0f;
|
||||
params.drop_x = 0.0f;
|
||||
|
@ -784,13 +784,10 @@ void menu_display_snow(int width, int height)
|
||||
void menu_display_draw_text(const char *msg,
|
||||
int width, int height, struct font_params *params)
|
||||
{
|
||||
int font_size;
|
||||
void *fb_buf = NULL;
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_SIZE, &font_size);
|
||||
|
||||
params->x = params->x / width;
|
||||
params->y = 1.0f - (params->y + font_size / 3) / height;
|
||||
params->x = params->x;
|
||||
params->y = params->y;
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_BUF, &fb_buf);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user