Merge pull request #7796 from orbea/xmb

xmb: Don't show a black background without assets.
This commit is contained in:
Twinaphex 2018-12-23 13:39:33 +01:00 committed by GitHub
commit c46e3468e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

19
menu/drivers/xmb.c Executable file → Normal file
View File

@ -370,7 +370,6 @@ static float item_color[] = {
1, 1, 1, 1 1, 1, 1, 1
}; };
float gradient_dark_purple[16] = { float gradient_dark_purple[16] = {
20/255.0, 13/255.0, 20/255.0, 1.0, 20/255.0, 13/255.0, 20/255.0, 1.0,
20/255.0, 13/255.0, 20/255.0, 1.0, 20/255.0, 13/255.0, 20/255.0, 1.0,
@ -2023,7 +2022,6 @@ static void xmb_context_reset_horizontal_list(
continue; continue;
} }
file_list_get_at_offset(xmb->horizontal_list, i, file_list_get_at_offset(xmb->horizontal_list, i,
&path, NULL, NULL, NULL); &path, NULL, NULL, NULL);
@ -2192,7 +2190,6 @@ static void xmb_list_open(xmb_handle_t *xmb)
xmb_list_open_new(xmb, selection_buf, xmb_list_open_new(xmb, selection_buf,
dir, selection); dir, selection);
entry.duration = XMB_DELAY; entry.duration = XMB_DELAY;
entry.target_value = xmb->icon_size * -(xmb->depth*2-2); entry.target_value = xmb->icon_size * -(xmb->depth*2-2);
entry.subject = &xmb->x; entry.subject = &xmb->x;
@ -2314,7 +2311,6 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR: case MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR:
return xmb->textures.list[XMB_TEXTURE_RDB]; return xmb->textures.list[XMB_TEXTURE_RDB];
/* Menu collection submenus*/ /* Menu collection submenus*/
case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST: case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST:
return xmb->textures.list[XMB_TEXTURE_ZIP]; return xmb->textures.list[XMB_TEXTURE_ZIP];
@ -2965,7 +2961,6 @@ static int xmb_draw_item(
TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT,
width, height, xmb->font); width, height, xmb->font);
menu_display_set_alpha(color, MIN(node->alpha, xmb->alpha)); menu_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
if ( if (
@ -2995,7 +2990,6 @@ static int xmb_draw_item(
menu_display_rotate_z(&rotate_draw, video_info); menu_display_rotate_z(&rotate_draw, video_info);
xmb_draw_icon(video_info, xmb_draw_icon(video_info,
xmb->icon_size, xmb->icon_size,
&mymat_tmp, &mymat_tmp,
@ -3795,13 +3789,13 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
} }
} }
if (video_info->timedate_enable && !xmb->assets_missing) if (video_info->timedate_enable)
{ {
menu_display_ctx_datetime_t datetime; menu_display_ctx_datetime_t datetime;
char timedate[255]; char timedate[255];
int x_pos = 0; int x_pos = 0;
if (coord_white[3] != 0) if (coord_white[3] != 0 && !xmb->assets_missing)
{ {
int x_pos = 0; int x_pos = 0;
@ -4162,7 +4156,6 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
xmb->font2_size = 24.0 * scale_factor; xmb->font2_size = 24.0 * scale_factor;
new_header_height = 128.0 * scale_factor; new_header_height = 128.0 * scale_factor;
xmb->thumbnail_width = 1024.0 * scale_factor; xmb->thumbnail_width = 1024.0 * scale_factor;
xmb->left_thumbnail_width = 1024.0 * scale_factor; xmb->left_thumbnail_width = 1024.0 * scale_factor;
xmb->savestate_thumbnail_width= 460.0 * scale_factor; xmb->savestate_thumbnail_width= 460.0 * scale_factor;
@ -4876,6 +4869,8 @@ static void xmb_context_reset_textures(
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
xmb->assets_missing = false; xmb->assets_missing = false;
menu_display_allocate_white_texture();
for (i = 0; i < XMB_TEXTURE_LAST; i++) for (i = 0; i < XMB_TEXTURE_LAST; i++)
{ {
if (!menu_display_reset_textures_list(xmb_texture_path(i), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR)) if (!menu_display_reset_textures_list(xmb_texture_path(i), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR))
@ -4910,8 +4905,6 @@ static void xmb_context_reset_textures(
} }
} }
menu_display_allocate_white_texture();
xmb->main_menu_node.icon = xmb->textures.list[XMB_TEXTURE_MAIN_MENU]; xmb->main_menu_node.icon = xmb->textures.list[XMB_TEXTURE_MAIN_MENU];
xmb->main_menu_node.alpha = xmb->categories_active_alpha; xmb->main_menu_node.alpha = xmb->categories_active_alpha;
xmb->main_menu_node.zoom = xmb->categories_active_zoom; xmb->main_menu_node.zoom = xmb->categories_active_zoom;
@ -4957,7 +4950,7 @@ static void xmb_context_reset_textures(
return; return;
error: error:
xmb->assets_missing = true ; xmb->assets_missing = true;
RARCH_WARN("[XMB] Critical asset missing, no icons will be drawn\n"); RARCH_WARN("[XMB] Critical asset missing, no icons will be drawn\n");
return; return;
} }
@ -5347,7 +5340,6 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
} }
} }
static void xmb_context_destroy(void *data) static void xmb_context_destroy(void *data)
{ {
unsigned i; unsigned i;
@ -5547,7 +5539,6 @@ static int xmb_list_push(void *data, void *userdata,
if (settings->bools.menu_show_load_content) if (settings->bools.menu_show_load_content)
{ {
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST; entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
menu_displaylist_setting(&entry); menu_displaylist_setting(&entry);
/* Core fully loaded, use the subsystem data */ /* Core fully loaded, use the subsystem data */