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"
@@ -3697,6 +3698,9 @@ static bool rarch_menu_init(
36973698 bool menu_show_start_screen = settings -> bools .menu_show_start_screen ;
36983699 bool config_save_on_exit = settings -> bools .config_save_on_exit ;
36993700#endif
3701+ #ifdef HAVE_COMPRESSION
3702+ bool have_bundled_assets = false;
3703+ #endif
37003704
37013705 /* thumbnail initialization */
37023706 if (!(menu_st -> thumbnail_path_data = gfx_thumbnail_path_init ()))
@@ -3739,6 +3743,7 @@ static bool rarch_menu_init(
37393743 != settings -> uints .bundle_assets_extract_last_version )
37403744 )
37413745 {
3746+ have_bundled_assets = true;
37423747 p_dialog -> current_type = MENU_DIALOG_HELP_EXTRACT ;
37433748 task_push_decompress (
37443749 settings -> paths .bundle_assets_src ,
@@ -3758,22 +3763,37 @@ static bool rarch_menu_init(
37583763#if defined(HAVE_ONLINE_UPDATER ) && defined(HAVE_NETWORKING ) && defined(HAVE_ZLIB )
37593764 else
37603765 {
3766+ #ifdef HAVE_CONFIGFILE
3767+ if (!menu_show_start_screen )
3768+ return true;
3769+ #endif
3770+ #ifdef HAVE_COMPRESSION
3771+ if (have_bundled_assets )
3772+ return true;
3773+ #endif
3774+
37613775#ifdef HAVE_UPDATE_ASSETS
3762- if (!path_is_directory (settings -> paths .directory_assets ))
3763- menu_download (MENU_ENUM_LABEL_CB_UPDATE_ASSETS );
3776+ if (!path_is_directory (settings -> paths .directory_assets ) || path_is_empty_directory (settings -> paths .directory_assets ))
3777+ {
3778+ if (path_get_free_space (settings -> paths .directory_assets ) >= ASSETS_ZIP_PLUS_DECOMPRESSION_SIZE )
3779+ menu_download (MENU_ENUM_LABEL_CB_UPDATE_ASSETS );
3780+ }
37643781#endif
3765- if (!path_is_directory (settings -> paths .directory_autoconfig ))
3782+ if (!path_is_directory (settings -> paths .directory_autoconfig ) || path_is_empty_directory ( settings -> paths . directory_autoconfig ) )
37663783 menu_download (MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES );
37673784#ifdef HAVE_UPDATE_CORE_INFO
3768- if (!path_is_directory (settings -> paths .path_libretro_info ))
3785+ if (!path_is_directory (settings -> paths .path_libretro_info ) || path_is_empty_directory ( settings -> paths . path_libretro_info ) )
37693786 menu_download (MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES );
37703787#endif
3771- #ifdef HAVE_LIBRETRODB
3772- if (!path_is_directory (settings -> paths .path_content_database ))
3773- menu_download (MENU_ENUM_LABEL_CB_UPDATE_DATABASES );
3788+ #if defined(HAVE_LIBRETRODB )
3789+ if (!path_is_directory (settings -> paths .path_content_database ) || path_is_empty_directory (settings -> paths .path_content_database ))
3790+ {
3791+ if (path_get_free_space (settings -> paths .path_content_database ) >= DATABASE_RDB_ZIP_PLUS_DECOMPRESSION_SIZE )
3792+ menu_download (MENU_ENUM_LABEL_CB_UPDATE_DATABASES );
3793+ }
37743794#endif
37753795#if defined(RARCH_MOBILE ) && defined(HAVE_OVERLAY )
3776- if (!path_is_directory (settings -> paths .directory_overlay ))
3796+ if (!path_is_directory (settings -> paths .directory_overlay ) || path_is_empty_directory ( settings -> paths . directory_overlay ) )
37773797 menu_download (MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS );
37783798#endif
37793799 }
0 commit comments