|
49 | 49 | #include "menu_driver.h" |
50 | 50 | #include "menu_cbs.h" |
51 | 51 | #include "../driver.h" |
| 52 | +#include "../file_path_special.h" |
52 | 53 | #include "../list_special.h" |
53 | 54 | #include "../intl/msg_hash_lbl_str.h" |
54 | 55 | #include "../paths.h" |
@@ -3629,7 +3630,7 @@ static void bundle_decompressed(retro_task_t *task, |
3629 | 3630 | command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL); |
3630 | 3631 | } |
3631 | 3632 |
|
3632 | | -#if defined(HAVE_ONLINE_UPDATER) && defined(HAVE_NETWORKING) && defined(HAVE_COMPRESSION) && defined(HAVE_ZLIB) |
| 3633 | +#if defined(HAVE_ONLINE_UPDATER) && defined(HAVE_NETWORKING) && defined(HAVE_COMPRESSION) && defined(HAVE_ZLIB) && defined(HAVE_UPDATE_ASSETS_FIRST_RUN) |
3633 | 3634 | static void menu_download(enum msg_hash_enums enum_idx) |
3634 | 3635 | { |
3635 | 3636 | char s[PATH_MAX_LENGTH]; |
@@ -3747,25 +3748,36 @@ static bool rarch_menu_init( |
3747 | 3748 | configuration_set_int(settings, |
3748 | 3749 | settings->uints.bundle_assets_extract_last_version, 1); |
3749 | 3750 | } |
3750 | | -#if defined(HAVE_ONLINE_UPDATER) && defined(HAVE_NETWORKING) && defined(HAVE_ZLIB) |
| 3751 | +#if defined(HAVE_ONLINE_UPDATER) && defined(HAVE_NETWORKING) && defined(HAVE_ZLIB) && defined(HAVE_UPDATE_ASSETS_FIRST_RUN) |
3751 | 3752 | else |
3752 | 3753 | { |
| 3754 | +#ifdef HAVE_CONFIGFILE |
| 3755 | + if (!menu_show_start_screen) |
| 3756 | + return true; |
| 3757 | +#endif |
| 3758 | + |
3753 | 3759 | #ifdef HAVE_UPDATE_ASSETS |
3754 | | - if (!path_is_directory(settings->paths.directory_assets)) |
3755 | | - menu_download(MENU_ENUM_LABEL_CB_UPDATE_ASSETS); |
| 3760 | + if (!path_is_directory(settings->paths.directory_assets) || path_is_empty_directory(settings->paths.directory_assets)) |
| 3761 | + { |
| 3762 | + if (path_get_free_space(settings->paths.directory_assets) >= ASSETS_ZIP_PLUS_DECOMPRESSION_SIZE) |
| 3763 | + menu_download(MENU_ENUM_LABEL_CB_UPDATE_ASSETS); |
| 3764 | + } |
3756 | 3765 | #endif |
3757 | | - if (!path_is_directory(settings->paths.directory_autoconfig)) |
| 3766 | + if (!path_is_directory(settings->paths.directory_autoconfig) || path_is_empty_directory(settings->paths.directory_autoconfig)) |
3758 | 3767 | menu_download(MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES); |
3759 | 3768 | #ifdef HAVE_UPDATE_CORE_INFO |
3760 | | - if (!path_is_directory(settings->paths.path_libretro_info)) |
| 3769 | + if (!path_is_directory(settings->paths.path_libretro_info) || path_is_empty_directory(settings->paths.path_libretro_info)) |
3761 | 3770 | menu_download(MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES); |
3762 | 3771 | #endif |
3763 | | -#ifdef HAVE_LIBRETRODB |
3764 | | - if (!path_is_directory(settings->paths.path_content_database)) |
3765 | | - menu_download(MENU_ENUM_LABEL_CB_UPDATE_DATABASES); |
| 3772 | +#if defined(HAVE_LIBRETRODB) |
| 3773 | + if (!path_is_directory(settings->paths.path_content_database) || path_is_empty_directory(settings->paths.path_content_database)) |
| 3774 | + { |
| 3775 | + if (path_get_free_space(settings->paths.path_content_database) >= DATABASE_RDB_ZIP_PLUS_DECOMPRESSION_SIZE) |
| 3776 | + menu_download(MENU_ENUM_LABEL_CB_UPDATE_DATABASES); |
| 3777 | + } |
3766 | 3778 | #endif |
3767 | 3779 | #if defined(RARCH_MOBILE) && defined(HAVE_OVERLAY) |
3768 | | - if (!path_is_directory(settings->paths.directory_overlay)) |
| 3780 | + if (!path_is_directory(settings->paths.directory_overlay) || path_is_empty_directory(settings->paths.directory_overlay)) |
3769 | 3781 | menu_download(MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS); |
3770 | 3782 | #endif |
3771 | 3783 | } |
|
0 commit comments