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"
@@ -3689,6 +3690,9 @@ static bool rarch_menu_init(
36893690 bool menu_show_start_screen = settings -> bools .menu_show_start_screen ;
36903691 bool config_save_on_exit = settings -> bools .config_save_on_exit ;
36913692#endif
3693+ #ifdef HAVE_COMPRESSION
3694+ bool have_bundled_assets = false;
3695+ #endif
36923696
36933697 /* thumbnail initialization */
36943698 if (!(menu_st -> thumbnail_path_data = gfx_thumbnail_path_init ()))
@@ -3731,6 +3735,7 @@ static bool rarch_menu_init(
37313735 != settings -> uints .bundle_assets_extract_last_version )
37323736 )
37333737 {
3738+ have_bundled_assets = true;
37343739 p_dialog -> current_type = MENU_DIALOG_HELP_EXTRACT ;
37353740 task_push_decompress (
37363741 settings -> paths .bundle_assets_src ,
@@ -3750,22 +3755,37 @@ static bool rarch_menu_init(
37503755#if defined(HAVE_ONLINE_UPDATER ) && defined(HAVE_NETWORKING ) && defined(HAVE_ZLIB )
37513756 else
37523757 {
3758+ #ifdef HAVE_CONFIGFILE
3759+ if (!menu_show_start_screen )
3760+ return true;
3761+ #endif
3762+ #ifdef HAVE_COMPRESSION
3763+ if (have_bundled_assets )
3764+ return true;
3765+ #endif
3766+
37533767#ifdef HAVE_UPDATE_ASSETS
3754- if (!path_is_directory (settings -> paths .directory_assets ))
3755- menu_download (MENU_ENUM_LABEL_CB_UPDATE_ASSETS );
3768+ if (!path_is_directory (settings -> paths .directory_assets ) || path_is_empty_directory (settings -> paths .directory_assets ))
3769+ {
3770+ if (path_get_free_space (settings -> paths .directory_assets ) >= ASSETS_ZIP_PLUS_DECOMPRESSION_SIZE )
3771+ menu_download (MENU_ENUM_LABEL_CB_UPDATE_ASSETS );
3772+ }
37563773#endif
3757- if (!path_is_directory (settings -> paths .directory_autoconfig ))
3774+ if (!path_is_directory (settings -> paths .directory_autoconfig ) || path_is_empty_directory ( settings -> paths . directory_autoconfig ) )
37583775 menu_download (MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES );
37593776#ifdef HAVE_UPDATE_CORE_INFO
3760- if (!path_is_directory (settings -> paths .path_libretro_info ))
3777+ if (!path_is_directory (settings -> paths .path_libretro_info ) || path_is_empty_directory ( settings -> paths . path_libretro_info ) )
37613778 menu_download (MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES );
37623779#endif
3763- #ifdef HAVE_LIBRETRODB
3764- if (!path_is_directory (settings -> paths .path_content_database ))
3765- menu_download (MENU_ENUM_LABEL_CB_UPDATE_DATABASES );
3780+ #if defined(HAVE_LIBRETRODB )
3781+ if (!path_is_directory (settings -> paths .path_content_database ) || path_is_empty_directory (settings -> paths .path_content_database ))
3782+ {
3783+ if (path_get_free_space (settings -> paths .path_content_database ) >= DATABASE_RDB_ZIP_PLUS_DECOMPRESSION_SIZE )
3784+ menu_download (MENU_ENUM_LABEL_CB_UPDATE_DATABASES );
3785+ }
37663786#endif
37673787#if defined(RARCH_MOBILE ) && defined(HAVE_OVERLAY )
3768- if (!path_is_directory (settings -> paths .directory_overlay ))
3788+ if (!path_is_directory (settings -> paths .directory_overlay ) || path_is_empty_directory ( settings -> paths . directory_overlay ) )
37693789 menu_download (MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS );
37703790#endif
37713791 }
0 commit comments