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"
@@ -3687,6 +3688,9 @@ static bool rarch_menu_init(
36873688 bool menu_show_start_screen = settings -> bools .menu_show_start_screen ;
36883689 bool config_save_on_exit = settings -> bools .config_save_on_exit ;
36893690#endif
3691+ #ifdef HAVE_COMPRESSION
3692+ bool have_bundled_assets = false;
3693+ #endif
36903694
36913695 /* thumbnail initialization */
36923696 if (!(menu_st -> thumbnail_path_data = gfx_thumbnail_path_init ()))
@@ -3729,6 +3733,7 @@ static bool rarch_menu_init(
37293733 != settings -> uints .bundle_assets_extract_last_version )
37303734 )
37313735 {
3736+ have_bundled_assets = true;
37323737 p_dialog -> current_type = MENU_DIALOG_HELP_EXTRACT ;
37333738 task_push_decompress (
37343739 settings -> paths .bundle_assets_src ,
@@ -3748,22 +3753,37 @@ static bool rarch_menu_init(
37483753#if defined(HAVE_ONLINE_UPDATER ) && defined(HAVE_NETWORKING ) && defined(HAVE_ZLIB )
37493754 else
37503755 {
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+
37513765#ifdef HAVE_UPDATE_ASSETS
3752- if (!path_is_directory (settings -> paths .directory_assets ))
3753- 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+ }
37543771#endif
3755- 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 ) )
37563773 menu_download (MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES );
37573774#ifdef HAVE_UPDATE_CORE_INFO
3758- 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 ) )
37593776 menu_download (MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES );
37603777#endif
3761- #ifdef HAVE_LIBRETRODB
3762- if (!path_is_directory (settings -> paths .path_content_database ))
3763- 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+ }
37643784#endif
37653785#if defined(RARCH_MOBILE ) && defined(HAVE_OVERLAY )
3766- 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 ) )
37673787 menu_download (MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS );
37683788#endif
37693789 }
0 commit comments