From f4b6dcb6a198a8e4f902cefbcd850b96283e6b60 Mon Sep 17 00:00:00 2001 From: Alfrix Date: Sat, 17 Nov 2018 10:34:37 -0300 Subject: [PATCH] Add missing assets warning to xmb --- intl/msg_hash_us.h | 121 ++++++++++++++++++++++++++------------------- menu/drivers/xmb.c | 22 +++++++-- msg_hash.h | 2 + 3 files changed, 89 insertions(+), 56 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index e4d584270c..56b07c6a2f 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -2910,45 +2910,45 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, "Show date / time" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE, - "Style of date / time" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE, + "Style of date / time" ) - MSG_HASH( - MENU_ENUM_SUBLABEL_TIMEDATE_STYLE, - "Changes the style current date and/or time is shown inside the menu." +MSG_HASH( + MENU_ENUM_SUBLABEL_TIMEDATE_STYLE, + "Changes the style current date and/or time is shown inside the menu." ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS, - "YYYY-MM-DD HH:MM:SS" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS, + "YYYY-MM-DD HH:MM:SS" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM, - "YYYY-MM-DD HH:MM" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM, + "YYYY-MM-DD HH:MM" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY, - "MM-DD-YYYY HH:MM" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY, + "MM-DD-YYYY HH:MM" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS, - "HH:MM:SS" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS, + "HH:MM:SS" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM, - "HH:MM" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM, + "HH:MM" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM, - "DD/MM HH:MM" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM, + "DD/MM HH:MM" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM, - "MM/DD HH:MM" +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM, + "MM/DD HH:MM" ) - MSG_HASH( - MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM, - "HH:MM:SS (AM/PM)" + MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM, + "HH:MM:SS (AM/PM)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TITLE_COLOR, @@ -4995,19 +4995,20 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_TOGGLE, "Apply cheat immediately after toggling." -) + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_LOAD, "Auto-apply cheats when game loads." -) + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "The number of times the cheat will be applied. Use with the other two Iteration options to affect large areas of memory." + "The number of times the cheat will be applied.\n" + "Use with the other two Iteration options to affect large areas of memory." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, "After each 'Number of Iterations' the Memory Address will be increased by this number times the 'Memory Search Size'." -) + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, "After each 'Number of Iterations' the Value will be increased by this amount." @@ -6922,15 +6923,15 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, "Number of Iterations" -) + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, "Value Increase Each Iteration" -) + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, "Address Increase Each Iteration" -) + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_AFTER, "Add New Cheat After This One" @@ -7731,20 +7732,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME, "Select a different color theme." ) -MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, - "Use preferred system color theme") -MSG_HASH(MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, - "Use your operating system's color theme (if any) - overrides theme settings.") -MSG_HASH(MSG_RESAMPLER_QUALITY_LOWEST, - "Lowest") -MSG_HASH(MSG_RESAMPLER_QUALITY_LOWER, - "Lower") -MSG_HASH(MSG_RESAMPLER_QUALITY_NORMAL, - "Normal") -MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHER, - "Higher") -MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHEST, - "Highest") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, + "Use preferred system color theme" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, + "Use your operating system's color theme (if any) - overrides theme settings." + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_LOWEST, + "Lowest" + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_LOWER, + "Lower" + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_NORMAL, + "Normal" + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_HIGHER, + "Higher" + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_HIGHEST, + "Highest" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_MUSIC_AVAILABLE, "No music available." @@ -7761,3 +7776,7 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "No favorites available." ) +MSG_HASH( + MSG_MISSING_ASSETS, + "Warning: Some assets are missing, use the Online Updater if available" + ) \ No newline at end of file diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 66e02c18d2..51748cf1c5 100755 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -4924,11 +4924,8 @@ static const char *xmb_texture_path(unsigned id) if (!filestream_exists(icon_fullpath)) { - /* If the icon doesn't exist at least try to return the subsetting icon*/ - if (id == XMB_TEXTURE_DIALOG_SLICE || id == XMB_TEXTURE_KEY_HOVER || id == XMB_TEXTURE_KEY_HOVER) - return NULL; - else - return "subsetting.png"; + RARCH_WARN("[XMB] Asset missing: %s\n", icon_fullpath); + return NULL; } else return icon_name; @@ -4939,9 +4936,20 @@ static void xmb_context_reset_textures( xmb_handle_t *xmb, const char *iconpath) { unsigned i; + bool missing_assets = false; for (i = 0; i < XMB_TEXTURE_LAST; i++) + { + if (xmb_texture_path(i) == NULL) + { + missing_assets = true; + /* If the icon doesn't exist at least try to return the subsetting icon*/ + if (!(i == XMB_TEXTURE_DIALOG_SLICE || i == XMB_TEXTURE_KEY_HOVER || i == XMB_TEXTURE_KEY_HOVER)) + menu_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_SUBSETTING), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR); + continue; + } menu_display_reset_textures_list(xmb_texture_path(i), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR); + } menu_display_allocate_white_texture(); @@ -4986,6 +4994,10 @@ static void xmb_context_reset_textures( xmb->netplay_tab_node.alpha = xmb->categories_active_alpha; xmb->netplay_tab_node.zoom = xmb->categories_active_zoom; #endif + + if (missing_assets) + runloop_msg_queue_push(msg_hash_to_str(MSG_MISSING_ASSETS), 1, 256, false); + } static void xmb_context_reset_background(const char *iconpath) diff --git a/msg_hash.h b/msg_hash.h index c343242314..08fba9705c 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -421,6 +421,8 @@ enum msg_hash_enums MSG_RUNAHEAD_FAILED_TO_SAVE_STATE, MSG_RUNAHEAD_FAILED_TO_LOAD_STATE, MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE, + MSG_MISSING_ASSETS, + MENU_LABEL(STREAMING_TITLE), MENU_LABEL(STREAMING_MODE), MENU_LABEL(VIDEO_RECORD_QUALITY),