mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Cleanup
This commit is contained in:
parent
017961d433
commit
eb12526b79
@ -325,7 +325,9 @@ static font_data_t *menu_display_font_main_init(
|
|||||||
return font_data;
|
return font_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
font_data_t *menu_display_font(enum application_special_type type, float font_size,
|
font_data_t *menu_display_font(
|
||||||
|
enum application_special_type type,
|
||||||
|
float font_size,
|
||||||
bool is_threaded)
|
bool is_threaded)
|
||||||
{
|
{
|
||||||
menu_display_ctx_font_t font_info;
|
menu_display_ctx_font_t font_info;
|
||||||
@ -333,7 +335,8 @@ font_data_t *menu_display_font(enum application_special_type type, float font_si
|
|||||||
|
|
||||||
fontpath[0] = '\0';
|
fontpath[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_application_special(fontpath, sizeof(fontpath), type);
|
fill_pathname_application_special(
|
||||||
|
fontpath, sizeof(fontpath), type);
|
||||||
|
|
||||||
font_info.path = fontpath;
|
font_info.path = fontpath;
|
||||||
font_info.size = font_size;
|
font_info.size = font_size;
|
||||||
@ -1195,10 +1198,12 @@ void menu_display_snow(int width, int height)
|
|||||||
|
|
||||||
if (p->alive)
|
if (p->alive)
|
||||||
{
|
{
|
||||||
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
int16_t mouse_x = menu_input_mouse_state(
|
||||||
|
MENU_MOUSE_X_AXIS);
|
||||||
|
|
||||||
p->y += p->yspeed;
|
p->y += p->yspeed;
|
||||||
p->x += menu_display_scalef(mouse_x, 0, width, -0.3, 0.3);
|
p->x += menu_display_scalef(
|
||||||
|
mouse_x, 0, width, -0.3, 0.3);
|
||||||
p->x += p->xspeed;
|
p->x += p->xspeed;
|
||||||
|
|
||||||
p->alive = p->y >= 0 && p->y < height
|
p->alive = p->y >= 0 && p->y < height
|
||||||
@ -1231,7 +1236,8 @@ void menu_display_snow(int width, int height)
|
|||||||
if (!p->alive)
|
if (!p->alive)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
alpha = menu_display_randf(0, 100) > 90 ? p->alpha/2 : p->alpha;
|
alpha = menu_display_randf(0, 100) > 90 ?
|
||||||
|
p->alpha/2 : p->alpha;
|
||||||
|
|
||||||
for (j = 0; j < 16; j++)
|
for (j = 0; j < 16; j++)
|
||||||
{
|
{
|
||||||
@ -1258,8 +1264,9 @@ void menu_display_draw_text(
|
|||||||
struct font_params params;
|
struct font_params params;
|
||||||
|
|
||||||
/* Don't draw outside of the screen */
|
/* Don't draw outside of the screen */
|
||||||
if (x < -64 || x > width + 64
|
if ( (x < -64 || x > width + 64)
|
||||||
|| y < -64 || y > height + 64)
|
|| (y < -64 || y > height + 64)
|
||||||
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
params.x = x / width;
|
params.x = x / width;
|
||||||
@ -1701,24 +1708,20 @@ static bool menu_driver_init_internal(bool video_is_threaded)
|
|||||||
menu_driver_ctx->init(&menu_userdata, video_is_threaded);
|
menu_driver_ctx->init(&menu_userdata, video_is_threaded);
|
||||||
|
|
||||||
if (!menu_driver_data || !menu_init(menu_driver_data))
|
if (!menu_driver_data || !menu_init(menu_driver_data))
|
||||||
{
|
goto error;
|
||||||
retroarch_fail(1, "init_menu()");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
strlcpy(settings->arrays.menu_driver, menu_driver_ctx->ident,
|
strlcpy(settings->arrays.menu_driver, menu_driver_ctx->ident,
|
||||||
sizeof(settings->arrays.menu_driver));
|
sizeof(settings->arrays.menu_driver));
|
||||||
|
|
||||||
if (menu_driver_ctx->lists_init)
|
if (menu_driver_ctx->lists_init)
|
||||||
{
|
|
||||||
if (!menu_driver_ctx->lists_init(menu_driver_data))
|
if (!menu_driver_ctx->lists_init(menu_driver_data))
|
||||||
{
|
goto error;
|
||||||
retroarch_fail(1, "init_menu()");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
error:
|
||||||
|
retroarch_fail(1, "init_menu()");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool menu_driver_context_reset(bool video_is_threaded)
|
static bool menu_driver_context_reset(bool video_is_threaded)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user