Move bundle_assets_{src/dst} to settings->paths

This commit is contained in:
libretroadmin 2022-07-05 19:15:29 +02:00
parent fbd37f8926
commit 95db09d8c5
4 changed files with 17 additions and 16 deletions

View File

@ -1414,9 +1414,6 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
SETTING_ARRAY("input_driver", settings->arrays.input_driver, false, NULL, true); SETTING_ARRAY("input_driver", settings->arrays.input_driver, false, NULL, true);
SETTING_ARRAY("input_joypad_driver", settings->arrays.input_joypad_driver, false, NULL, true); SETTING_ARRAY("input_joypad_driver", settings->arrays.input_joypad_driver, false, NULL, true);
SETTING_ARRAY("input_keyboard_layout", settings->arrays.input_keyboard_layout, false, NULL, true); SETTING_ARRAY("input_keyboard_layout", settings->arrays.input_keyboard_layout, false, NULL, true);
SETTING_ARRAY("bundle_assets_src_path", settings->arrays.bundle_assets_src, false, NULL, true);
SETTING_ARRAY("bundle_assets_dst_path", settings->arrays.bundle_assets_dst, false, NULL, true);
SETTING_ARRAY("bundle_assets_dst_path_subdir", settings->arrays.bundle_assets_dst_subdir, false, NULL, true);
SETTING_ARRAY("led_driver", settings->arrays.led_driver, false, NULL, true); SETTING_ARRAY("led_driver", settings->arrays.led_driver, false, NULL, true);
SETTING_ARRAY("netplay_mitm_server", settings->arrays.netplay_mitm_server, false, NULL, true); SETTING_ARRAY("netplay_mitm_server", settings->arrays.netplay_mitm_server, false, NULL, true);
SETTING_ARRAY("midi_driver", settings->arrays.midi_driver, false, NULL, true); SETTING_ARRAY("midi_driver", settings->arrays.midi_driver, false, NULL, true);
@ -1578,6 +1575,10 @@ static struct config_path_setting *populate_settings_path(
SETTING_PATH("recording_config_directory", SETTING_PATH("recording_config_directory",
recording_st->config_dir, false, NULL, true); recording_st->config_dir, false, NULL, true);
SETTING_PATH("bundle_assets_src_path", settings->paths.bundle_assets_src, false, NULL, true);
SETTING_PATH("bundle_assets_dst_path", settings->paths.bundle_assets_dst, false, NULL, true);
SETTING_PATH("bundle_assets_dst_path_subdir", settings->paths.bundle_assets_dst_subdir, false, NULL, true);
SETTING_ARRAY("log_dir", settings->paths.log_dir, true, NULL, true); SETTING_ARRAY("log_dir", settings->paths.log_dir, true, NULL, true);
*size = count; *size = count;
@ -2745,9 +2746,9 @@ void config_set_defaults(void *data)
*settings->paths.path_content_video_history = '\0'; *settings->paths.path_content_video_history = '\0';
*settings->paths.path_cheat_settings = '\0'; *settings->paths.path_cheat_settings = '\0';
#if !defined(__APPLE__) #if !defined(__APPLE__)
*settings->arrays.bundle_assets_src = '\0'; *settings->paths.bundle_assets_src = '\0';
*settings->arrays.bundle_assets_dst = '\0'; *settings->paths.bundle_assets_dst = '\0';
*settings->arrays.bundle_assets_dst_subdir = '\0'; *settings->paths.bundle_assets_dst_subdir = '\0';
#endif #endif
*settings->paths.path_cheat_database = '\0'; *settings->paths.path_cheat_database = '\0';
*settings->paths.path_menu_wallpaper = '\0'; *settings->paths.path_menu_wallpaper = '\0';

View File

@ -416,9 +416,6 @@ typedef struct settings
char translation_service_url[2048]; char translation_service_url[2048];
char bundle_assets_src[PATH_MAX_LENGTH];
char bundle_assets_dst[PATH_MAX_LENGTH];
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
char youtube_stream_key[PATH_MAX_LENGTH]; char youtube_stream_key[PATH_MAX_LENGTH];
char twitch_stream_key[PATH_MAX_LENGTH]; char twitch_stream_key[PATH_MAX_LENGTH];
char facebook_stream_key[PATH_MAX_LENGTH]; char facebook_stream_key[PATH_MAX_LENGTH];
@ -451,6 +448,9 @@ typedef struct settings
char path_stream_url[8192]; char path_stream_url[8192];
char bundle_assets_src[PATH_MAX_LENGTH];
char bundle_assets_dst[PATH_MAX_LENGTH];
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
char path_menu_xmb_font[PATH_MAX_LENGTH]; char path_menu_xmb_font[PATH_MAX_LENGTH];
char menu_content_show_settings_password[PATH_MAX_LENGTH]; char menu_content_show_settings_password[PATH_MAX_LENGTH];
char kiosk_mode_password[PATH_MAX_LENGTH]; char kiosk_mode_password[PATH_MAX_LENGTH];

View File

@ -474,10 +474,10 @@ static void frontend_darwin_get_env(int *argc, char *argv[],
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
configuration_set_string(settings, configuration_set_string(settings,
settings->arrays.bundle_assets_src, settings->paths.bundle_assets_src,
assets_zip_path); assets_zip_path);
configuration_set_string(settings, configuration_set_string(settings,
settings->arrays.bundle_assets_dst, settings->paths.bundle_assets_dst,
#if TARGET_OS_IOS || TARGET_OS_TV #if TARGET_OS_IOS || TARGET_OS_TV
home_dir_buf home_dir_buf
#else #else

View File

@ -3464,18 +3464,18 @@ bool rarch_menu_init(
#ifdef HAVE_COMPRESSION #ifdef HAVE_COMPRESSION
if ( settings->bools.bundle_assets_extract_enable if ( settings->bools.bundle_assets_extract_enable
&& !string_is_empty(settings->arrays.bundle_assets_src) && !string_is_empty(settings->paths.bundle_assets_src)
&& !string_is_empty(settings->arrays.bundle_assets_dst) && !string_is_empty(settings->paths.bundle_assets_dst)
&& (settings->uints.bundle_assets_extract_version_current && (settings->uints.bundle_assets_extract_version_current
!= settings->uints.bundle_assets_extract_last_version) != settings->uints.bundle_assets_extract_last_version)
) )
{ {
p_dialog->current_type = MENU_DIALOG_HELP_EXTRACT; p_dialog->current_type = MENU_DIALOG_HELP_EXTRACT;
task_push_decompress( task_push_decompress(
settings->arrays.bundle_assets_src, settings->paths.bundle_assets_src,
settings->arrays.bundle_assets_dst, settings->paths.bundle_assets_dst,
NULL, NULL,
settings->arrays.bundle_assets_dst_subdir, settings->paths.bundle_assets_dst_subdir,
NULL, NULL,
bundle_decompressed, bundle_decompressed,
NULL, NULL,