mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Merge pull request #2876 from lakkatv/master
(Menu) Fix a regression in xmb_draw_text
This commit is contained in:
commit
6de2827b57
@ -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,
|
static void mui_draw_text(float x, float y, unsigned width, unsigned height,
|
||||||
const char *msg, uint32_t color, enum text_alignment text_align)
|
const char *msg, uint32_t color, enum text_alignment text_align)
|
||||||
{
|
{
|
||||||
|
int font_size;
|
||||||
struct font_params params;
|
struct font_params params;
|
||||||
|
|
||||||
params.x = x;
|
menu_display_ctl(MENU_DISPLAY_CTL_FONT_SIZE, &font_size);
|
||||||
params.y = y;
|
|
||||||
|
params.x = x / width;
|
||||||
|
params.y = 1.0f - (y + font_size / 3) / height;
|
||||||
params.scale = 1.0f;
|
params.scale = 1.0f;
|
||||||
params.drop_mod = 0.0f;
|
params.drop_mod = 0.0f;
|
||||||
params.drop_x = 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)
|
|| y < -xmb->icon.size || y > height + xmb->icon.size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
params.x = x;
|
params.x = x / width;
|
||||||
params.y = y;
|
params.y = 1.0f - y / height;
|
||||||
params.scale = scale_factor;
|
params.scale = scale_factor;
|
||||||
params.drop_mod = 0.0f;
|
params.drop_mod = 0.0f;
|
||||||
params.drop_x = 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,
|
void menu_display_draw_text(const char *msg,
|
||||||
int width, int height, struct font_params *params)
|
int width, int height, struct font_params *params)
|
||||||
{
|
{
|
||||||
int font_size;
|
|
||||||
void *fb_buf = NULL;
|
void *fb_buf = NULL;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_SIZE, &font_size);
|
params->x = params->x;
|
||||||
|
params->y = params->y;
|
||||||
params->x = params->x / width;
|
|
||||||
params->y = 1.0f - (params->y + font_size / 3) / height;
|
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_BUF, &fb_buf);
|
menu_display_ctl(MENU_DISPLAY_CTL_FONT_BUF, &fb_buf);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user