1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-25 21:41:03 +00:00

Don't try to load wallpaper from an empty path in materialui.c

This commit is contained in:
Josh Palmer 2016-12-27 17:45:47 +00:00
parent 0ea81fc874
commit 99988bbac5

@ -99,7 +99,7 @@ typedef struct mui_handle
int size;
} cursor;
struct
struct
{
struct
{
@ -387,7 +387,7 @@ static void mui_draw_tab_end(mui_handle_t *mui,
&active_tab_marker_color[0]);
}
static void mui_draw_scrollbar(mui_handle_t *mui,
static void mui_draw_scrollbar(mui_handle_t *mui,
unsigned width, unsigned height, float *coord_color)
{
unsigned header_height;
@ -529,7 +529,7 @@ static void mui_render(void *data)
int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS);
float old_accel_val = 0.0f;
float new_accel_val = 0.0f;
unsigned new_pointer_val =
unsigned new_pointer_val =
(pointer_y - mui->line_height + mui->scroll_y - 16)
/ mui->line_height;
@ -547,7 +547,7 @@ static void mui_render(void *data)
{
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);
unsigned new_pointer_val =
unsigned new_pointer_val =
(mouse_y - mui->line_height + mui->scroll_y - 16)
/ mui->line_height;
@ -640,7 +640,7 @@ static void mui_render_label_value(mui_handle_t *mui,
y + mui->line_height / 2 + label_offset,
width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_DISABLED)) ||
if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_DISABLED)) ||
(string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))))
{
if (mui->textures.list[MUI_TEXTURE_SWITCH_OFF])
@ -651,7 +651,7 @@ static void mui_render_label_value(mui_handle_t *mui,
else
do_draw_text = true;
}
else if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_ENABLED)) ||
else if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_ENABLED)) ||
(string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON))))
{
if (mui->textures.list[MUI_TEXTURE_SWITCH_ON])
@ -777,12 +777,12 @@ static void mui_render_menu_list(mui_handle_t *mui,
width,
height,
*frame_count / 20,
font_hover_color,
font_hover_color,
entry_selected,
rich_label,
entry_value,
rich_label,
entry_value,
menu_list_color
);
);
}
}
@ -812,12 +812,12 @@ static int mui_get_core_title(char *s, size_t len)
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
&system);
core_name = system->library_name;
core_version = system->library_version;
if (!settings->menu.core_enable)
return -1;
return -1;
if (runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info))
{
@ -1194,7 +1194,7 @@ static void mui_frame(void *data)
header_height - mui->scroll_y + mui->line_height *selection,
width,
mui->line_height,
width,
width,
height,
&highlighted_entry_color[0]
);
@ -1203,11 +1203,11 @@ static void mui_frame(void *data)
menu_display_font_bind_block(mui->font2, &mui->raster_block2);
mui_render_menu_list(
mui,
width,
mui,
width,
height,
font_normal_color,
font_hover_color,
font_normal_color,
font_hover_color,
&active_tab_marker_color[0]
);
@ -1217,11 +1217,11 @@ static void mui_frame(void *data)
/* header */
menu_display_draw_quad(
0,
0,
width,
0,
0,
width,
header_height,
width,
width,
height,
&header_bg_color[0]);
@ -1239,11 +1239,11 @@ static void mui_frame(void *data)
}
menu_display_draw_quad(
0,
header_height,
0,
header_height,
width,
mui->shadow_height,
width,
width,
height,
&shadow_bg[0]);
@ -1284,7 +1284,7 @@ static void mui_frame(void *data)
size_t usable_width = width - (mui->margin * 2);
title_buf_msg_tmp[0] = title_buf_msg[0] = '\0';
snprintf(title_buf_msg, sizeof(title_buf), "%s (%s)",
title_buf, title_msg);
value_len = utf8len(title_buf);
@ -1347,8 +1347,8 @@ static void mui_layout(mui_handle_t *mui)
video_driver_get_size(&width, &height);
/* Mobiles platforms may have very small display metrics
* coupled to a high resolution, so we should be DPI aware
/* Mobiles platforms may have very small display metrics
* coupled to a high resolution, so we should be DPI aware
* to ensure the entries hitboxes are big enough.
*
* On desktops, we just care about readability, with every widget
@ -1379,7 +1379,7 @@ static void mui_layout(mui_handle_t *mui)
if (mui->font) /* calculate a more realistic ticker_limit */
{
unsigned m_width =
unsigned m_width =
font_driver_get_message_width(mui->font, "a", 1, 1);
if (m_width)
@ -1616,21 +1616,21 @@ static void mui_preswitch_tabs(mui_handle_t *mui, unsigned action)
switch (mui->categories.selection_ptr)
{
case MUI_SYSTEM_TAB_MAIN:
menu_stack->list[stack_size - 1].label =
menu_stack->list[stack_size - 1].label =
strdup(msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU));
menu_stack->list[stack_size - 1].type =
menu_stack->list[stack_size - 1].type =
MENU_SETTINGS;
break;
case MUI_SYSTEM_TAB_PLAYLISTS:
menu_stack->list[stack_size - 1].label =
menu_stack->list[stack_size - 1].label =
strdup(msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
menu_stack->list[stack_size - 1].type =
menu_stack->list[stack_size - 1].type =
MENU_PLAYLISTS_TAB;
break;
case MUI_SYSTEM_TAB_SETTINGS:
menu_stack->list[stack_size - 1].label =
menu_stack->list[stack_size - 1].label =
strdup(msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS_TAB));
menu_stack->list[stack_size - 1].type =
menu_stack->list[stack_size - 1].type =
MENU_SETTINGS;
break;
}
@ -1802,7 +1802,7 @@ static size_t mui_list_get_selection(void *data)
}
static int mui_pointer_tap(void *userdata,
unsigned x, unsigned y,
unsigned x, unsigned y,
unsigned ptr, menu_file_list_cbs_t *cbs,
menu_entry_t *entry, unsigned action)
{