4949#include "menu_driver.h"
5050#include "menu_cbs.h"
5151#include "../driver.h"
52+ #include "../file_path_special.h"
5253#include "../list_special.h"
5354#include "../msg_hash_lbl_str.h"
5455#include "../paths.h"
@@ -3724,13 +3725,15 @@ static bool rarch_menu_init(
37243725#endif
37253726
37263727#ifdef HAVE_COMPRESSION
3728+ bool have_bundled_assets = false;
37273729 if ( settings -> bools .bundle_assets_extract_enable
37283730 && !string_is_empty (settings -> paths .bundle_assets_src )
37293731 && !string_is_empty (settings -> paths .bundle_assets_dst )
37303732 && (settings -> uints .bundle_assets_extract_version_current
37313733 != settings -> uints .bundle_assets_extract_last_version )
37323734 )
37333735 {
3736+ have_bundled_assets = true;
37343737 p_dialog -> current_type = MENU_DIALOG_HELP_EXTRACT ;
37353738 task_push_decompress (
37363739 settings -> paths .bundle_assets_src ,
@@ -3750,22 +3753,37 @@ static bool rarch_menu_init(
37503753#if defined(HAVE_ONLINE_UPDATER ) && defined(HAVE_NETWORKING ) && defined(HAVE_ZLIB )
37513754 else
37523755 {
3756+ #ifdef HAVE_CONFIGFILE
3757+ if (!menu_show_start_screen )
3758+ return true;
3759+ #endif
3760+ #ifdef HAVE_COMPRESSION
3761+ if (have_bundled_assets )
3762+ return true;
3763+ #endif
3764+
37533765#ifdef HAVE_UPDATE_ASSETS
3754- if (!path_is_directory (settings -> paths .directory_assets ))
3755- menu_download (MENU_ENUM_LABEL_CB_UPDATE_ASSETS );
3766+ if (!path_is_directory (settings -> paths .directory_assets ) || path_is_empty_directory (settings -> paths .directory_assets ))
3767+ {
3768+ if (path_get_free_space (settings -> paths .directory_assets ) >= ASSETS_ZIP_PLUS_DECOMPRESSION_SIZE )
3769+ menu_download (MENU_ENUM_LABEL_CB_UPDATE_ASSETS );
3770+ }
37563771#endif
3757- if (!path_is_directory (settings -> paths .directory_autoconfig ))
3772+ if (!path_is_directory (settings -> paths .directory_autoconfig ) || path_is_empty_directory ( settings -> paths . directory_autoconfig ) )
37583773 menu_download (MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES );
37593774#ifdef HAVE_UPDATE_CORE_INFO
3760- if (!path_is_directory (settings -> paths .path_libretro_info ))
3775+ if (!path_is_directory (settings -> paths .path_libretro_info ) || path_is_empty_directory ( settings -> paths . path_libretro_info ) )
37613776 menu_download (MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES );
37623777#endif
3763- #ifdef HAVE_LIBRETRODB
3764- if (!path_is_directory (settings -> paths .path_content_database ))
3765- menu_download (MENU_ENUM_LABEL_CB_UPDATE_DATABASES );
3778+ #if defined(HAVE_LIBRETRODB )
3779+ if (!path_is_directory (settings -> paths .path_content_database ) || path_is_empty_directory (settings -> paths .path_content_database ))
3780+ {
3781+ if (path_get_free_space (settings -> paths .path_content_database ) >= DATABASE_RDB_ZIP_PLUS_DECOMPRESSION_SIZE )
3782+ menu_download (MENU_ENUM_LABEL_CB_UPDATE_DATABASES );
3783+ }
37663784#endif
37673785#if defined(RARCH_MOBILE ) && defined(HAVE_OVERLAY )
3768- if (!path_is_directory (settings -> paths .directory_overlay ))
3786+ if (!path_is_directory (settings -> paths .directory_overlay ) || path_is_empty_directory ( settings -> paths . directory_overlay ) )
37693787 menu_download (MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS );
37703788#endif
37713789 }
0 commit comments