Move path variables

This commit is contained in:
twinaphex 2017-04-29 00:39:29 +02:00
parent 59da394197
commit e6ab06a701
38 changed files with 528 additions and 532 deletions

View File

@ -1432,9 +1432,9 @@ static void command_event_restore_default_shader_preset(void)
RARCH_LOG("%s %s\n",
msg_hash_to_str(MSG_RESTORING_DEFAULT_SHADER_PRESET_TO),
path_get(RARCH_PATH_DEFAULT_SHADER_PRESET));
strlcpy(settings->path.shader,
strlcpy(settings->paths.path_shader,
path_get(RARCH_PATH_DEFAULT_SHADER_PRESET),
sizeof(settings->path.shader));
sizeof(settings->paths.path_shader));
}
path_clear(RARCH_PATH_DEFAULT_SHADER_PRESET);
@ -1521,8 +1521,8 @@ static bool command_event_save_core_config(void)
config_dir[0] = config_name[0] =
config_path[0] = msg[0] = '\0';
if (!string_is_empty(settings->directory.menu_config))
strlcpy(config_dir, settings->directory.menu_config,
if (!string_is_empty(settings->paths.directory_menu_config))
strlcpy(config_dir, settings->paths.directory_menu_config,
sizeof(config_dir));
else if (!path_is_empty(RARCH_PATH_CONFIG)) /* Fallback */
fill_pathname_basedir(config_dir, path_get(RARCH_PATH_CONFIG),
@ -2122,9 +2122,9 @@ bool command_event(enum event_command cmd, void *data)
{
settings_t *settings = config_get_ptr();
command_event(CMD_EVENT_DSP_FILTER_DEINIT, NULL);
if (string_is_empty(settings->path.audio_dsp_plugin))
if (string_is_empty(settings->paths.path_audio_dsp_plugin))
break;
audio_driver_dsp_filter_init(settings->path.audio_dsp_plugin);
audio_driver_dsp_filter_init(settings->paths.path_audio_dsp_plugin);
}
break;
case CMD_EVENT_GPU_RECORD_DEINIT:
@ -2184,33 +2184,33 @@ bool command_event(enum event_command cmd, void *data)
RARCH_LOG("%s: [%s].\n",
msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
settings->path.content_history);
settings->paths.path_content_history);
g_defaults.content_history = playlist_init(
settings->path.content_history,
settings->paths.path_content_history,
content_history_size);
#ifdef HAVE_FFMPEG
RARCH_LOG("%s: [%s].\n",
msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
settings->path.content_music_history);
settings->paths.path_content_music_history);
g_defaults.music_history = playlist_init(
settings->path.content_music_history,
settings->paths.path_content_music_history,
content_history_size);
RARCH_LOG("%s: [%s].\n",
msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
settings->path.content_video_history);
settings->paths.path_content_video_history);
g_defaults.video_history = playlist_init(
settings->path.content_video_history,
settings->paths.path_content_video_history,
content_history_size);
#endif
#ifdef HAVE_IMAGEVIEWER
RARCH_LOG("%s: [%s].\n",
msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
settings->path.content_image_history);
settings->paths.path_content_image_history);
g_defaults.image_history = playlist_init(
settings->path.content_image_history,
settings->paths.path_content_image_history,
content_history_size);
#endif
}
@ -2223,7 +2223,7 @@ bool command_event(enum event_command cmd, void *data)
settings_t *settings = config_get_ptr();
command_event(CMD_EVENT_CORE_INFO_DEINIT, NULL);
if (!string_is_empty(settings->directory.libretro))
if (!string_is_empty(settings->paths.directory_libretro))
core_info_init_list();
}
break;
@ -2446,7 +2446,7 @@ bool command_event(enum event_command cmd, void *data)
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
if (!init_netplay(
NULL, hostname ? hostname : settings->netplay.server,
NULL, hostname ? hostname : settings->paths.netplay_server,
settings->uints.netplay_port))
{
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);

View File

@ -650,93 +650,93 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
/* Paths */
#ifdef HAVE_XMB
SETTING_PATH("xmb_font", settings->menu.xmb_font, false, NULL, true);
SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true);
#endif
SETTING_PATH("netplay_nickname", settings->username, false, NULL, true);
SETTING_PATH("video_filter", settings->path.softfilter_plugin, false, NULL, true);
SETTING_PATH("audio_dsp_plugin", settings->path.audio_dsp_plugin, false, NULL, true);
SETTING_PATH("core_updater_buildbot_url", settings->network.buildbot_url, false, NULL, true);
SETTING_PATH("core_updater_buildbot_assets_url", settings->network.buildbot_assets_url, false, NULL, true);
SETTING_PATH("netplay_nickname", settings->paths.username, false, NULL, true);
SETTING_PATH("video_filter", settings->paths.path_softfilter_plugin, false, NULL, true);
SETTING_PATH("audio_dsp_plugin", settings->paths.path_audio_dsp_plugin, false, NULL, true);
SETTING_PATH("core_updater_buildbot_url", settings->paths.network_buildbot_url, false, NULL, true);
SETTING_PATH("core_updater_buildbot_assets_url", settings->paths.network_buildbot_assets_url, false, NULL, true);
#ifdef HAVE_NETWORKING
SETTING_PATH("netplay_ip_address", settings->netplay.server, false, NULL, true);
SETTING_PATH("netplay_password", settings->netplay.password, false, NULL, true);
SETTING_PATH("netplay_spectate_password", settings->netplay.spectate_password, false, NULL, true);
SETTING_PATH("netplay_ip_address", settings->paths.netplay_server, false, NULL, true);
SETTING_PATH("netplay_password", settings->paths.netplay_password, false, NULL, true);
SETTING_PATH("netplay_spectate_password", settings->paths.netplay_spectate_password, false, NULL, true);
#endif
SETTING_PATH("libretro_directory",
settings->directory.libretro, false, NULL, false);
settings->paths.directory_libretro, false, NULL, false);
SETTING_PATH("core_options_path",
settings->path.core_options, false, NULL, true);
settings->paths.path_core_options, false, NULL, true);
SETTING_PATH("libretro_info_path",
settings->path.libretro_info, false, NULL, true);
settings->paths.path_libretro_info, false, NULL, true);
SETTING_PATH("video_shader",
settings->path.shader, false, NULL, true);
settings->paths.path_shader, false, NULL, true);
SETTING_PATH("content_database_path",
settings->path.content_database, false, NULL, true);
settings->paths.path_content_database, false, NULL, true);
SETTING_PATH("cheat_database_path",
settings->path.cheat_database, false, NULL, true);
settings->paths.path_cheat_database, false, NULL, true);
#ifdef HAVE_MENU
SETTING_PATH("menu_wallpaper",
settings->path.menu_wallpaper, false, NULL, true);
settings->paths.path_menu_wallpaper, false, NULL, true);
#endif
SETTING_PATH("content_history_path",
settings->path.content_history, false, NULL, true);
settings->paths.path_content_history, false, NULL, true);
SETTING_PATH("content_music_history_path",
settings->path.content_music_history, false, NULL, true);
settings->paths.path_content_music_history, false, NULL, true);
SETTING_PATH("content_video_history_path",
settings->path.content_video_history, false, NULL, true);
settings->paths.path_content_video_history, false, NULL, true);
SETTING_PATH("content_image_history_path",
settings->path.content_image_history, false, NULL, true);
settings->paths.path_content_image_history, false, NULL, true);
#ifdef HAVE_OVERLAY
SETTING_PATH("input_overlay",
settings->path.overlay, false, NULL, true);
settings->paths.path_overlay, false, NULL, true);
#endif
SETTING_PATH("video_font_path",
settings->path.font, false, NULL, true);
settings->paths.path_font, false, NULL, true);
SETTING_PATH("cursor_directory",
settings->directory.cursor, false, NULL, true);
settings->paths.directory_cursor, false, NULL, true);
SETTING_PATH("content_history_dir",
settings->directory.content_history, false, NULL, true);
settings->paths.directory_content_history, false, NULL, true);
SETTING_PATH("screenshot_directory",
settings->directory.screenshot, true, NULL, true);
settings->paths.directory_screenshot, true, NULL, true);
SETTING_PATH("system_directory",
settings->directory.system, true, NULL, true);
settings->paths.directory_system, true, NULL, true);
SETTING_PATH("cache_directory",
settings->directory.cache, false, NULL, true);
settings->paths.directory_cache, false, NULL, true);
SETTING_PATH("input_remapping_directory",
settings->directory.input_remapping, false, NULL, true);
settings->paths.directory_input_remapping, false, NULL, true);
SETTING_PATH("resampler_directory",
settings->directory.resampler, false, NULL, true);
settings->paths.directory_resampler, false, NULL, true);
SETTING_PATH("video_shader_dir",
settings->directory.video_shader, true, NULL, true);
settings->paths.directory_video_shader, true, NULL, true);
SETTING_PATH("video_filter_dir",
settings->directory.video_filter, true, NULL, true);
settings->paths.directory_video_filter, true, NULL, true);
SETTING_PATH("core_assets_directory",
settings->directory.core_assets, true, NULL, true);
settings->paths.directory_core_assets, true, NULL, true);
SETTING_PATH("assets_directory",
settings->directory.assets, true, NULL, true);
settings->paths.directory_assets, true, NULL, true);
SETTING_PATH("dynamic_wallpapers_directory",
settings->directory.dynamic_wallpapers, true, NULL, true);
settings->paths.directory_dynamic_wallpapers, true, NULL, true);
SETTING_PATH("thumbnails_directory",
settings->directory.thumbnails, true, NULL, true);
settings->paths.directory_thumbnails, true, NULL, true);
SETTING_PATH("playlist_directory",
settings->directory.playlist, true, NULL, true);
settings->paths.directory_playlist, true, NULL, true);
SETTING_PATH("joypad_autoconfig_dir",
settings->directory.autoconfig, false, NULL, true);
settings->paths.directory_autoconfig, false, NULL, true);
SETTING_PATH("audio_filter_dir",
settings->directory.audio_filter, true, NULL, true);
settings->paths.directory_audio_filter, true, NULL, true);
SETTING_PATH("savefile_directory",
dir_get_ptr(RARCH_DIR_SAVEFILE), true, NULL, false);
SETTING_PATH("savestate_directory",
dir_get_ptr(RARCH_DIR_SAVESTATE), true, NULL, false);
#ifdef HAVE_MENU
SETTING_PATH("rgui_browser_directory",
settings->directory.menu_content, true, NULL, true);
settings->paths.directory_menu_content, true, NULL, true);
SETTING_PATH("rgui_config_directory",
settings->directory.menu_config, true, NULL, true);
settings->paths.directory_menu_config, true, NULL, true);
#endif
#ifdef HAVE_OVERLAY
SETTING_PATH("overlay_directory",
settings->directory.overlay, true, NULL, true);
settings->paths.directory_overlay, true, NULL, true);
#endif
#ifndef HAVE_DYNAMIC
SETTING_PATH("libretro_path",
@ -744,7 +744,7 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
#endif
SETTING_PATH(
"screenshot_directory",
settings->directory.screenshot, true, NULL, false);
settings->paths.directory_screenshot, true, NULL, false);
if (global)
{
@ -1156,7 +1156,7 @@ static void config_set_defaults(void)
strlcpy(settings->arrays.menu_driver,
def_menu, sizeof(settings->arrays.menu_driver));
#ifdef HAVE_XMB
*settings->menu.xmb_font = '\0';
*settings->paths.path_menu_xmb_font = '\0';
#endif
#ifdef HAVE_MATERIALUI
@ -1235,10 +1235,10 @@ static void config_set_defaults(void)
}
}
strlcpy(settings->network.buildbot_url, buildbot_server_url,
sizeof(settings->network.buildbot_url));
strlcpy(settings->network.buildbot_assets_url, buildbot_assets_server_url,
sizeof(settings->network.buildbot_assets_url));
strlcpy(settings->paths.network_buildbot_url, buildbot_server_url,
sizeof(settings->paths.network_buildbot_url));
strlcpy(settings->paths.network_buildbot_assets_url, buildbot_assets_server_url,
sizeof(settings->paths.network_buildbot_assets_url));
*settings->arrays.input_keyboard_layout = '\0';
@ -1259,28 +1259,28 @@ static void config_set_defaults(void)
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
dir_clear(RARCH_DIR_SAVESTATE);
*settings->path.libretro_info = '\0';
*settings->paths.path_libretro_info = '\0';
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL))
*settings->directory.libretro = '\0';
*settings->directory.cursor = '\0';
*settings->directory.resampler = '\0';
*settings->directory.screenshot = '\0';
*settings->directory.system = '\0';
*settings->directory.cache = '\0';
*settings->directory.input_remapping = '\0';
*settings->directory.core_assets = '\0';
*settings->directory.assets = '\0';
*settings->directory.dynamic_wallpapers = '\0';
*settings->directory.thumbnails = '\0';
*settings->directory.playlist = '\0';
*settings->directory.autoconfig = '\0';
*settings->paths.directory_libretro = '\0';
*settings->paths.directory_cursor = '\0';
*settings->paths.directory_resampler = '\0';
*settings->paths.directory_screenshot = '\0';
*settings->paths.directory_system = '\0';
*settings->paths.directory_cache = '\0';
*settings->paths.directory_input_remapping = '\0';
*settings->paths.directory_core_assets = '\0';
*settings->paths.directory_assets = '\0';
*settings->paths.directory_dynamic_wallpapers = '\0';
*settings->paths.directory_thumbnails = '\0';
*settings->paths.directory_playlist = '\0';
*settings->paths.directory_autoconfig = '\0';
#ifdef HAVE_MENU
*settings->directory.menu_content = '\0';
*settings->directory.menu_config = '\0';
*settings->paths.directory_menu_content = '\0';
*settings->paths.directory_menu_config = '\0';
#endif
*settings->directory.video_shader = '\0';
*settings->directory.video_filter = '\0';
*settings->directory.audio_filter = '\0';
*settings->paths.directory_video_shader = '\0';
*settings->paths.directory_video_filter = '\0';
*settings->paths.directory_audio_filter = '\0';
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_UPS_PREF, NULL))
rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
@ -1299,93 +1299,93 @@ static void config_set_defaults(void)
}
}
*settings->path.core_options = '\0';
*settings->path.content_history = '\0';
*settings->path.content_music_history = '\0';
*settings->path.content_image_history = '\0';
*settings->path.content_video_history = '\0';
*settings->path.cheat_settings = '\0';
*settings->path.shader = '\0';
*settings->paths.path_core_options = '\0';
*settings->paths.path_content_history = '\0';
*settings->paths.path_content_music_history = '\0';
*settings->paths.path_content_image_history = '\0';
*settings->paths.path_content_video_history = '\0';
*settings->paths.path_cheat_settings = '\0';
*settings->paths.path_shader = '\0';
#ifndef IOS
*settings->arrays.bundle_assets_src = '\0';
*settings->arrays.bundle_assets_dst = '\0';
*settings->arrays.bundle_assets_dst_subdir = '\0';
#endif
*settings->path.cheat_database = '\0';
*settings->path.menu_wallpaper = '\0';
*settings->path.content_database = '\0';
*settings->path.overlay = '\0';
*settings->path.softfilter_plugin = '\0';
*settings->paths.path_cheat_database = '\0';
*settings->paths.path_menu_wallpaper = '\0';
*settings->paths.path_content_database = '\0';
*settings->paths.path_overlay = '\0';
*settings->paths.path_softfilter_plugin = '\0';
*settings->arrays.playlist_names = '\0';
*settings->arrays.playlist_cores = '\0';
*settings->directory.content_history = '\0';
*settings->path.audio_dsp_plugin = '\0';
*settings->paths.directory_content_history = '\0';
*settings->paths.path_audio_dsp_plugin = '\0';
video_driver_default_settings();
if (!string_is_empty(g_defaults.dir.wallpapers))
strlcpy(settings->directory.dynamic_wallpapers,
g_defaults.dir.wallpapers, sizeof(settings->directory.dynamic_wallpapers));
strlcpy(settings->paths.directory_dynamic_wallpapers,
g_defaults.dir.wallpapers, sizeof(settings->paths.directory_dynamic_wallpapers));
if (!string_is_empty(g_defaults.dir.thumbnails))
strlcpy(settings->directory.thumbnails,
g_defaults.dir.thumbnails, sizeof(settings->directory.thumbnails));
strlcpy(settings->paths.directory_thumbnails,
g_defaults.dir.thumbnails, sizeof(settings->paths.directory_thumbnails));
if (!string_is_empty(g_defaults.dir.remap))
strlcpy(settings->directory.input_remapping,
g_defaults.dir.remap, sizeof(settings->directory.input_remapping));
strlcpy(settings->paths.directory_input_remapping,
g_defaults.dir.remap, sizeof(settings->paths.directory_input_remapping));
if (!string_is_empty(g_defaults.dir.cache))
strlcpy(settings->directory.cache,
g_defaults.dir.cache, sizeof(settings->directory.cache));
strlcpy(settings->paths.directory_cache,
g_defaults.dir.cache, sizeof(settings->paths.directory_cache));
if (!string_is_empty(g_defaults.dir.assets))
strlcpy(settings->directory.assets,
g_defaults.dir.assets, sizeof(settings->directory.assets));
strlcpy(settings->paths.directory_assets,
g_defaults.dir.assets, sizeof(settings->paths.directory_assets));
if (!string_is_empty(g_defaults.dir.core_assets))
strlcpy(settings->directory.core_assets,
g_defaults.dir.core_assets, sizeof(settings->directory.core_assets));
strlcpy(settings->paths.directory_core_assets,
g_defaults.dir.core_assets, sizeof(settings->paths.directory_core_assets));
if (!string_is_empty(g_defaults.dir.playlist))
strlcpy(settings->directory.playlist,
g_defaults.dir.playlist, sizeof(settings->directory.playlist));
strlcpy(settings->paths.directory_playlist,
g_defaults.dir.playlist, sizeof(settings->paths.directory_playlist));
if (!string_is_empty(g_defaults.dir.core))
fill_pathname_expand_special(settings->directory.libretro,
g_defaults.dir.core, sizeof(settings->directory.libretro));
fill_pathname_expand_special(settings->paths.directory_libretro,
g_defaults.dir.core, sizeof(settings->paths.directory_libretro));
if (!string_is_empty(g_defaults.dir.audio_filter))
strlcpy(settings->directory.audio_filter,
g_defaults.dir.audio_filter, sizeof(settings->directory.audio_filter));
strlcpy(settings->paths.directory_audio_filter,
g_defaults.dir.audio_filter, sizeof(settings->paths.directory_audio_filter));
if (!string_is_empty(g_defaults.dir.video_filter))
strlcpy(settings->directory.video_filter,
g_defaults.dir.video_filter, sizeof(settings->directory.video_filter));
strlcpy(settings->paths.directory_video_filter,
g_defaults.dir.video_filter, sizeof(settings->paths.directory_video_filter));
if (!string_is_empty(g_defaults.dir.shader))
fill_pathname_expand_special(settings->directory.video_shader,
g_defaults.dir.shader, sizeof(settings->directory.video_shader));
fill_pathname_expand_special(settings->paths.directory_video_shader,
g_defaults.dir.shader, sizeof(settings->paths.directory_video_shader));
if (!string_is_empty(g_defaults.path.buildbot_server_url))
strlcpy(settings->network.buildbot_url,
g_defaults.path.buildbot_server_url, sizeof(settings->network.buildbot_url));
strlcpy(settings->paths.network_buildbot_url,
g_defaults.path.buildbot_server_url, sizeof(settings->paths.network_buildbot_url));
if (!string_is_empty(g_defaults.path.core))
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, g_defaults.path.core);
if (!string_is_empty(g_defaults.dir.database))
strlcpy(settings->path.content_database, g_defaults.dir.database,
sizeof(settings->path.content_database));
strlcpy(settings->paths.path_content_database, g_defaults.dir.database,
sizeof(settings->paths.path_content_database));
if (!string_is_empty(g_defaults.dir.cursor))
strlcpy(settings->directory.cursor, g_defaults.dir.cursor,
sizeof(settings->directory.cursor));
strlcpy(settings->paths.directory_cursor, g_defaults.dir.cursor,
sizeof(settings->paths.directory_cursor));
if (!string_is_empty(g_defaults.dir.cheats))
strlcpy(settings->path.cheat_database, g_defaults.dir.cheats,
sizeof(settings->path.cheat_database));
strlcpy(settings->paths.path_cheat_database, g_defaults.dir.cheats,
sizeof(settings->paths.path_cheat_database));
if (!string_is_empty(g_defaults.dir.core_info))
fill_pathname_expand_special(settings->path.libretro_info,
g_defaults.dir.core_info, sizeof(settings->path.libretro_info));
fill_pathname_expand_special(settings->paths.path_libretro_info,
g_defaults.dir.core_info, sizeof(settings->paths.path_libretro_info));
#ifdef HAVE_OVERLAY
if (!string_is_empty(g_defaults.dir.overlay))
{
fill_pathname_expand_special(settings->directory.overlay,
g_defaults.dir.overlay, sizeof(settings->directory.overlay));
fill_pathname_expand_special(settings->paths.directory_overlay,
g_defaults.dir.overlay, sizeof(settings->paths.directory_overlay));
#ifdef RARCH_MOBILE
if (string_is_empty(settings->path.overlay))
fill_pathname_join(settings->path.overlay,
settings->directory.overlay,
if (string_is_empty(settings->paths.path_overlay))
fill_pathname_join(settings->paths.path_overlay,
settings->paths.directory_overlay,
"gamepads/retropad/retropad.cfg",
sizeof(settings->path.overlay));
sizeof(settings->paths.path_overlay));
#endif
}
#endif
@ -1393,24 +1393,24 @@ static void config_set_defaults(void)
#ifdef HAVE_MENU
if (!string_is_empty(g_defaults.dir.menu_config))
{
strlcpy(settings->directory.menu_config,
strlcpy(settings->paths.directory_menu_config,
g_defaults.dir.menu_config,
sizeof(settings->directory.menu_config));
sizeof(settings->paths.directory_menu_config));
#if TARGET_OS_IPHONE
path_set(RARCH_PATH_CONFIG,
settings->directory.menu_config);
settings->paths.directory_menu_config);
#endif
}
if (!string_is_empty(g_defaults.dir.menu_content))
strlcpy(settings->directory.menu_content,
strlcpy(settings->paths.directory_menu_content,
g_defaults.dir.menu_content,
sizeof(settings->directory.menu_content));
sizeof(settings->paths.directory_menu_content));
#endif
if (!string_is_empty(g_defaults.dir.autoconfig))
strlcpy(settings->directory.autoconfig,
strlcpy(settings->paths.directory_autoconfig,
g_defaults.dir.autoconfig,
sizeof(settings->directory.autoconfig));
sizeof(settings->paths.directory_autoconfig));
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL) &&
!string_is_empty(g_defaults.dir.savestate))
@ -1421,20 +1421,20 @@ static void config_set_defaults(void)
dir_set(RARCH_DIR_SAVEFILE, g_defaults.dir.sram);
if (!string_is_empty(g_defaults.dir.system))
strlcpy(settings->directory.system,
g_defaults.dir.system, sizeof(settings->directory.system));
strlcpy(settings->paths.directory_system,
g_defaults.dir.system, sizeof(settings->paths.directory_system));
if (!string_is_empty(g_defaults.dir.screenshot))
strlcpy(settings->directory.screenshot,
strlcpy(settings->paths.directory_screenshot,
g_defaults.dir.screenshot,
sizeof(settings->directory.screenshot));
sizeof(settings->paths.directory_screenshot));
if (!string_is_empty(g_defaults.dir.resampler))
strlcpy(settings->directory.resampler,
strlcpy(settings->paths.directory_resampler,
g_defaults.dir.resampler,
sizeof(settings->directory.resampler));
sizeof(settings->paths.directory_resampler));
if (!string_is_empty(g_defaults.dir.content_history))
strlcpy(settings->directory.content_history,
strlcpy(settings->paths.directory_content_history,
g_defaults.dir.content_history,
sizeof(settings->directory.content_history));
sizeof(settings->paths.directory_content_history));
if (!string_is_empty(g_defaults.path.config))
{
@ -1894,11 +1894,11 @@ static bool config_load_file(const char *path, bool set_defaults,
/* Overrides */
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
override_username = strdup(settings->username);
override_username = strdup(settings->paths.username);
#ifdef HAVE_NETWORKING
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL))
override_netplay_ip_address = strdup(settings->netplay.server);
override_netplay_ip_address = strdup(settings->paths.netplay_server);
#endif
/* Boolean settings */
@ -2047,7 +2047,7 @@ static bool config_load_file(const char *path, bool set_defaults,
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL))
{
if (config_get_path(conf, "libretro_directory", tmp_str, sizeof(tmp_str)))
strlcpy(settings->directory.libretro, tmp_str, sizeof(settings->directory.libretro));
strlcpy(settings->paths.directory_libretro, tmp_str, sizeof(settings->paths.directory_libretro));
}
#ifndef HAVE_DYNAMIC
@ -2063,14 +2063,18 @@ static bool config_load_file(const char *path, bool set_defaults,
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL) && override_username)
{
strlcpy(settings->username, override_username, sizeof(settings->username));
strlcpy(settings->paths.username,
override_username,
sizeof(settings->paths.username));
free(override_username);
}
#ifdef HAVE_NETWORKING
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL))
{
strlcpy(settings->netplay.server, override_netplay_ip_address, sizeof(settings->netplay.server));
strlcpy(settings->paths.netplay_server,
override_netplay_ip_address,
sizeof(settings->paths.netplay_server));
free(override_netplay_ip_address);
}
#endif
@ -2086,91 +2090,91 @@ static bool config_load_file(const char *path, bool set_defaults,
audio_driver_set_volume_gain(db_to_gain(settings->floats.audio_volume));
if (string_is_empty(settings->path.content_history))
if (string_is_empty(settings->paths.path_content_history))
{
if (string_is_empty(settings->directory.content_history))
if (string_is_empty(settings->paths.directory_content_history))
{
fill_pathname_resolve_relative(
settings->path.content_history,
settings->paths.path_content_history,
path_get(RARCH_PATH_CONFIG),
file_path_str(FILE_PATH_CONTENT_HISTORY),
sizeof(settings->path.content_history));
sizeof(settings->paths.path_content_history));
}
else
{
fill_pathname_join(settings->path.content_history,
settings->directory.content_history,
fill_pathname_join(settings->paths.path_content_history,
settings->paths.directory_content_history,
file_path_str(FILE_PATH_CONTENT_HISTORY),
sizeof(settings->path.content_history));
sizeof(settings->paths.path_content_history));
}
}
if (string_is_empty(settings->path.content_music_history))
if (string_is_empty(settings->paths.path_content_music_history))
{
if (string_is_empty(settings->directory.content_history))
if (string_is_empty(settings->paths.directory_content_history))
{
fill_pathname_resolve_relative(
settings->path.content_music_history,
settings->paths.path_content_music_history,
path_get(RARCH_PATH_CONFIG),
file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY),
sizeof(settings->path.content_music_history));
sizeof(settings->paths.path_content_music_history));
}
else
{
fill_pathname_join(settings->path.content_music_history,
settings->directory.content_history,
fill_pathname_join(settings->paths.path_content_music_history,
settings->paths.directory_content_history,
file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY),
sizeof(settings->path.content_music_history));
sizeof(settings->paths.path_content_music_history));
}
}
if (string_is_empty(settings->path.content_video_history))
if (string_is_empty(settings->paths.path_content_video_history))
{
if (string_is_empty(settings->directory.content_history))
if (string_is_empty(settings->paths.directory_content_history))
{
fill_pathname_resolve_relative(
settings->path.content_video_history,
settings->paths.path_content_video_history,
path_get(RARCH_PATH_CONFIG),
file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY),
sizeof(settings->path.content_video_history));
sizeof(settings->paths.path_content_video_history));
}
else
{
fill_pathname_join(settings->path.content_video_history,
settings->directory.content_history,
fill_pathname_join(settings->paths.path_content_video_history,
settings->paths.directory_content_history,
file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY),
sizeof(settings->path.content_video_history));
sizeof(settings->paths.path_content_video_history));
}
}
if (string_is_empty(settings->path.content_image_history))
if (string_is_empty(settings->paths.path_content_image_history))
{
if (string_is_empty(settings->directory.content_history))
if (string_is_empty(settings->paths.directory_content_history))
{
fill_pathname_resolve_relative(
settings->path.content_image_history,
settings->paths.path_content_image_history,
path_get(RARCH_PATH_CONFIG),
file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY),
sizeof(settings->path.content_image_history));
sizeof(settings->paths.path_content_image_history));
}
else
{
fill_pathname_join(settings->path.content_image_history,
settings->directory.content_history,
fill_pathname_join(settings->paths.path_content_image_history,
settings->paths.directory_content_history,
file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY),
sizeof(settings->path.content_image_history));
sizeof(settings->paths.path_content_image_history));
}
}
if (!string_is_empty(settings->directory.screenshot))
if (!string_is_empty(settings->paths.directory_screenshot))
{
if (memcmp(settings->directory.screenshot, "default", 7) == 0)
*settings->directory.screenshot = '\0';
else if (!path_is_directory(settings->directory.screenshot))
if (memcmp(settings->paths.directory_screenshot, "default", 7) == 0)
*settings->paths.directory_screenshot = '\0';
else if (!path_is_directory(settings->paths.directory_screenshot))
{
RARCH_WARN("screenshot_directory is not an existing directory, ignoring ...\n");
*settings->directory.screenshot = '\0';
*settings->paths.directory_screenshot = '\0';
}
}
@ -2178,42 +2182,42 @@ static bool config_load_file(const char *path, bool set_defaults,
if (path_is_directory(path_get(RARCH_PATH_CORE)))
{
RARCH_WARN("\"libretro_path\" is a directory, using this for \"libretro_directory\" instead.\n");
strlcpy(settings->directory.libretro, path_get(RARCH_PATH_CORE),
sizeof(settings->directory.libretro));
strlcpy(settings->paths.directory_libretro, path_get(RARCH_PATH_CORE),
sizeof(settings->paths.directory_libretro));
path_clear(RARCH_PATH_CORE);
}
if (memcmp(settings->path.menu_wallpaper, "default", 7) == 0)
*settings->path.menu_wallpaper = '\0';
if (memcmp(settings->directory.video_shader, "default", 7) == 0)
*settings->directory.video_shader = '\0';
if (memcmp(settings->directory.video_filter, "default", 7) == 0)
*settings->directory.video_filter = '\0';
if (memcmp(settings->directory.audio_filter, "default", 7) == 0)
*settings->directory.audio_filter = '\0';
if (memcmp(settings->directory.core_assets, "default", 7) == 0)
*settings->directory.core_assets = '\0';
if (memcmp(settings->directory.assets, "default", 7) == 0)
*settings->directory.assets = '\0';
if (memcmp(settings->directory.dynamic_wallpapers, "default", 7) == 0)
*settings->directory.dynamic_wallpapers = '\0';
if (memcmp(settings->directory.thumbnails, "default", 7) == 0)
*settings->directory.thumbnails = '\0';
if (memcmp(settings->directory.playlist, "default", 7) == 0)
*settings->directory.playlist = '\0';
if (memcmp(settings->paths.path_menu_wallpaper, "default", 7) == 0)
*settings->paths.path_menu_wallpaper = '\0';
if (memcmp(settings->paths.directory_video_shader, "default", 7) == 0)
*settings->paths.directory_video_shader = '\0';
if (memcmp(settings->paths.directory_video_filter, "default", 7) == 0)
*settings->paths.directory_video_filter = '\0';
if (memcmp(settings->paths.directory_audio_filter, "default", 7) == 0)
*settings->paths.directory_audio_filter = '\0';
if (memcmp(settings->paths.directory_core_assets, "default", 7) == 0)
*settings->paths.directory_core_assets = '\0';
if (memcmp(settings->paths.directory_assets, "default", 7) == 0)
*settings->paths.directory_assets = '\0';
if (memcmp(settings->paths.directory_dynamic_wallpapers, "default", 7) == 0)
*settings->paths.directory_dynamic_wallpapers = '\0';
if (memcmp(settings->paths.directory_thumbnails, "default", 7) == 0)
*settings->paths.directory_thumbnails = '\0';
if (memcmp(settings->paths.directory_playlist, "default", 7) == 0)
*settings->paths.directory_playlist = '\0';
#ifdef HAVE_MENU
if (memcmp(settings->directory.menu_content, "default", 7) == 0)
*settings->directory.menu_content = '\0';
if (memcmp(settings->directory.menu_config, "default", 7) == 0)
*settings->directory.menu_config = '\0';
if (memcmp(settings->paths.directory_menu_content, "default", 7) == 0)
*settings->paths.directory_menu_content = '\0';
if (memcmp(settings->paths.directory_menu_config, "default", 7) == 0)
*settings->paths.directory_menu_config = '\0';
#endif
#ifdef HAVE_OVERLAY
if (memcmp(settings->directory.overlay, "default", 7) == 0)
*settings->directory.overlay = '\0';
if (memcmp(settings->paths.directory_overlay, "default", 7) == 0)
*settings->paths.directory_overlay = '\0';
#endif
if (memcmp(settings->directory.system, "default", 7) == 0)
*settings->directory.system = '\0';
if (memcmp(settings->paths.directory_system, "default", 7) == 0)
*settings->paths.directory_system = '\0';
if (settings->floats.slowmotion_ratio < 1.0f)
{
@ -2289,7 +2293,7 @@ static bool config_load_file(const char *path, bool set_defaults,
ret = true;
{
const char *shader_ext = path_get_extension(settings->path.shader);
const char *shader_ext = path_get_extension(settings->paths.path_shader);
if (!string_is_empty(shader_ext))
{
@ -2304,7 +2308,7 @@ static bool config_load_file(const char *path, bool set_defaults,
RARCH_LOG("Incompatible shader for backend %s, clearing...\n",
settings->arrays.video_driver);
settings->path.shader[0] = '\0';
settings->paths.path_shader[0] = '\0';
break;
}
}
@ -2524,13 +2528,13 @@ bool config_load_remap(void)
/* Remap directory: remap_directory.
* Try remap directory setting, no fallbacks defined */
if (string_is_empty(settings->directory.input_remapping))
if (string_is_empty(settings->paths.directory_input_remapping))
return false;
remap_directory[0] = core_path[0] = game_path[0] = '\0';
strlcpy(remap_directory,
settings->directory.input_remapping,
settings->paths.directory_input_remapping,
sizeof(remap_directory));
RARCH_LOG("Remaps: remap directory: %s\n", remap_directory);
@ -2624,12 +2628,12 @@ bool config_load_shader_preset(void)
/* Shader directory: shader_directory.
* Try shader directory setting, no fallbacks defined */
if (string_is_empty(settings->directory.video_shader))
if (string_is_empty(settings->paths.directory_video_shader))
return false;
shader_directory[0] = core_path[0] = game_path[0] = '\0';
fill_pathname_join (shader_directory, settings->directory.video_shader,
fill_pathname_join (shader_directory, settings->paths.directory_video_shader,
"presets", sizeof(shader_directory));
RARCH_LOG("Shaders: preset directory: %s\n", shader_directory);
@ -2665,8 +2669,8 @@ bool config_load_shader_preset(void)
/* Game shader preset exists, load it. */
RARCH_LOG("Shaders: game-specific shader preset found at %s.\n", game_path);
path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->path.shader);
strlcpy(settings->path.shader, game_path, sizeof(settings->path.shader));
path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->paths.path_shader);
strlcpy(settings->paths.path_shader, game_path, sizeof(settings->paths.path_shader));
config_file_free(new_conf);
return true;
}
@ -2695,8 +2699,8 @@ bool config_load_shader_preset(void)
/* Core shader preset exists, load it. */
RARCH_LOG("Shaders: core-specific shader preset found at %s.\n", core_path);
path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->path.shader);
strlcpy(settings->path.shader, core_path, sizeof(settings->path.shader));
path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->paths.path_shader);
strlcpy(settings->paths.path_shader, core_path, sizeof(settings->paths.path_shader));
config_file_free(new_conf);
return true;
}
@ -2948,7 +2952,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
bool ret = false;
config_file_t *conf = NULL;
settings_t *settings = config_get_ptr();
const char *autoconf_dir = settings->directory.autoconfig;
const char *autoconf_dir = settings->paths.directory_autoconfig;
const char *joypad_ident = settings->arrays.input_joypad_driver;
buf[0] = autoconf_file[0] = '\0';
@ -3078,7 +3082,8 @@ bool config_save_file(const char *path)
#ifdef HAVE_MENU
config_set_path(conf, "xmb_font",
!string_is_empty(settings->menu.xmb_font) ? settings->menu.xmb_font : "");
!string_is_empty(settings->paths.path_menu_xmb_font)
? settings->paths.path_menu_xmb_font : "");
#endif
/* String settings */

View File

@ -357,82 +357,68 @@ typedef struct settings
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
} arrays;
struct
{
char placeholder;
char browse_url[4096];
#ifdef HAVE_MENU
char path_menu_xmb_font[PATH_MAX_LENGTH];
#endif
char path_cheat_database[PATH_MAX_LENGTH];
char path_content_database[PATH_MAX_LENGTH];
char path_overlay[PATH_MAX_LENGTH];
char path_menu_wallpaper[PATH_MAX_LENGTH];
char path_audio_dsp_plugin[PATH_MAX_LENGTH];
char path_softfilter_plugin[PATH_MAX_LENGTH];
char path_core_options[PATH_MAX_LENGTH];
char path_content_history[PATH_MAX_LENGTH];
char path_content_music_history[PATH_MAX_LENGTH];
char path_content_image_history[PATH_MAX_LENGTH];
char path_content_video_history[PATH_MAX_LENGTH];
char path_libretro_info[PATH_MAX_LENGTH];
char path_cheat_settings[PATH_MAX_LENGTH];
char path_shader[PATH_MAX_LENGTH];
char path_font[PATH_MAX_LENGTH];
char network_buildbot_url[255];
char network_buildbot_assets_url[255];
char directory_audio_filter[PATH_MAX_LENGTH];
char directory_autoconfig[PATH_MAX_LENGTH];
char directory_video_filter[PATH_MAX_LENGTH];
char directory_video_shader[PATH_MAX_LENGTH];
char directory_content_history[PATH_MAX_LENGTH];
char directory_libretro[PATH_MAX_LENGTH];
char directory_cursor[PATH_MAX_LENGTH];
char directory_input_remapping[PATH_MAX_LENGTH];
char directory_overlay[PATH_MAX_LENGTH];
char directory_resampler[PATH_MAX_LENGTH];
char directory_screenshot[PATH_MAX_LENGTH];
char directory_system[PATH_MAX_LENGTH];
char directory_cache[PATH_MAX_LENGTH];
char directory_playlist[PATH_MAX_LENGTH];
char directory_core_assets[PATH_MAX_LENGTH];
char directory_assets[PATH_MAX_LENGTH];
char directory_dynamic_wallpapers[PATH_MAX_LENGTH];
char directory_thumbnails[PATH_MAX_LENGTH];
char directory_menu_config[PATH_MAX_LENGTH];
char directory_menu_content[PATH_MAX_LENGTH];
#ifdef HAVE_NETWORKING
char netplay_server[255];
char netplay_password[128];
char netplay_spectate_password[128];
#endif
char username[32];
} paths;
bool modified;
video_viewport_t video_viewport_custom;
size_t rewind_buffer_size;
#ifdef HAVE_MENU
struct
{
char xmb_font[PATH_MAX_LENGTH];
} menu;
#endif
struct
{
char buildbot_url[255];
char buildbot_assets_url[255];
} network;
char browse_url[4096];
struct
{
char cheat_database[PATH_MAX_LENGTH];
char content_database[PATH_MAX_LENGTH];
char overlay[PATH_MAX_LENGTH];
char menu_wallpaper[PATH_MAX_LENGTH];
char audio_dsp_plugin[PATH_MAX_LENGTH];
char softfilter_plugin[PATH_MAX_LENGTH];
char core_options[PATH_MAX_LENGTH];
char content_history[PATH_MAX_LENGTH];
char content_music_history[PATH_MAX_LENGTH];
char content_image_history[PATH_MAX_LENGTH];
char content_video_history[PATH_MAX_LENGTH];
char libretro_info[PATH_MAX_LENGTH];
char cheat_settings[PATH_MAX_LENGTH];
char shader[PATH_MAX_LENGTH];
char font[PATH_MAX_LENGTH];
} path;
struct
{
char audio_filter[PATH_MAX_LENGTH];
char autoconfig[PATH_MAX_LENGTH];
char video_filter[PATH_MAX_LENGTH];
char video_shader[PATH_MAX_LENGTH];
char content_history[PATH_MAX_LENGTH];
char libretro[PATH_MAX_LENGTH];
char cursor[PATH_MAX_LENGTH];
char input_remapping[PATH_MAX_LENGTH];
char overlay[PATH_MAX_LENGTH];
char resampler[PATH_MAX_LENGTH];
char screenshot[PATH_MAX_LENGTH];
char system[PATH_MAX_LENGTH];
char cache[PATH_MAX_LENGTH];
char playlist[PATH_MAX_LENGTH];
char core_assets[PATH_MAX_LENGTH];
char assets[PATH_MAX_LENGTH];
char dynamic_wallpapers[PATH_MAX_LENGTH];
char thumbnails[PATH_MAX_LENGTH];
char menu_config[PATH_MAX_LENGTH];
char menu_content[PATH_MAX_LENGTH];
} directory;
#ifdef HAVE_NETWORKING
struct
{
char server[255];
char password[128];
char spectate_password[128];
} netplay;
#endif
char username[32];
} settings_t;
#define configuration_set_float(settings, var, newvar) \

View File

@ -216,8 +216,8 @@ static bool core_info_list_iterate(
sizeof(info_path_base));
fill_pathname_join(s,
(!string_is_empty(settings->path.libretro_info)) ?
settings->path.libretro_info : settings->directory.libretro,
(!string_is_empty(settings->paths.path_libretro_info)) ?
settings->paths.path_libretro_info : settings->paths.directory_libretro,
info_path_base, len);
return true;
@ -610,7 +610,7 @@ bool core_info_init_list(void)
settings_t *settings = config_get_ptr();
if (settings)
core_info_curr_list = core_info_list_new(settings->directory.libretro);
core_info_curr_list = core_info_list_new(settings->paths.directory_libretro);
if (!core_info_curr_list)
return false;
@ -726,7 +726,7 @@ void core_info_get_name(const char *path, char *s, size_t len)
size_t i;
settings_t *settings = config_get_ptr();
struct string_list *contents = dir_list_new_special(
settings->directory.libretro,
settings->paths.directory_libretro,
DIR_LIST_CORES, NULL);
if (!contents)

4
dirs.c
View File

@ -56,11 +56,11 @@ bool dir_init_shader(void)
struct rarch_dir_list *dir_list = (struct rarch_dir_list*)&dir_shader_list;
settings_t *settings = config_get_ptr();
if (!*settings->directory.video_shader)
if (!*settings->paths.directory_video_shader)
return false;
dir_list->list = dir_list_new_special(
settings->directory.video_shader, DIR_LIST_SHADERS, NULL);
settings->paths.directory_video_shader, DIR_LIST_SHADERS, NULL);
if (!dir_list->list || dir_list->list->size == 0)
{

View File

@ -1037,7 +1037,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
if (string_is_empty(settings->directory.system))
if (string_is_empty(settings->paths.directory_system))
{
const char *fullpath = path_get(RARCH_PATH_CONTENT);
if (!string_is_empty(fullpath))
@ -1058,9 +1058,9 @@ bool rarch_environment_cb(unsigned cmd, void *data)
}
else
{
*(const char**)data = settings->directory.system;
*(const char**)data = settings->paths.directory_system;
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n",
settings->directory.system);
settings->paths.directory_system);
}
break;
@ -1070,10 +1070,10 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_GET_USERNAME:
*(const char**)data = *settings->username ?
settings->username : NULL;
*(const char**)data = *settings->paths.username ?
settings->paths.username : NULL;
RARCH_LOG("Environ GET_USERNAME: \"%s\".\n",
settings->username);
settings->paths.username);
break;
case RETRO_ENVIRONMENT_GET_LANGUAGE:
@ -1406,10 +1406,10 @@ bool rarch_environment_cb(unsigned cmd, void *data)
{
const char **dir = (const char**)data;
*dir = *settings->directory.core_assets ?
settings->directory.core_assets : NULL;
*dir = *settings->paths.directory_core_assets ?
settings->paths.directory_core_assets : NULL;
RARCH_LOG("Environ CORE_ASSETS_DIRECTORY: \"%s\".\n",
settings->directory.core_assets);
settings->paths.directory_core_assets);
break;
}

View File

@ -296,7 +296,7 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
{
settings_t *settings = config_get_ptr();
fill_pathname_join(s,
settings->directory.autoconfig,
settings->paths.directory_autoconfig,
settings->arrays.input_joypad_driver,
len);
}
@ -307,8 +307,8 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
/* Try config directory setting first,
* fallback to the location of the current configuration file. */
if (!string_is_empty(settings->directory.menu_config))
strlcpy(s, settings->directory.menu_config, len);
if (!string_is_empty(settings->paths.directory_menu_config))
strlcpy(s, settings->paths.directory_menu_config, len);
else if (!path_is_empty(RARCH_PATH_CONFIG))
fill_pathname_basedir(s, path_get(RARCH_PATH_CONFIG), len);
}
@ -337,7 +337,7 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
{
settings_t *settings = config_get_ptr();
fill_pathname_join(s,
settings->directory.assets,
settings->paths.directory_assets,
"zarch",
len);
}
@ -365,8 +365,8 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
{
settings_t *settings = config_get_ptr();
if (!string_is_empty(settings->path.menu_wallpaper))
strlcpy(s, settings->path.menu_wallpaper, len);
if (!string_is_empty(settings->paths.path_menu_wallpaper))
strlcpy(s, settings->paths.path_menu_wallpaper, len);
else
{
char s1[PATH_MAX_LENGTH];
@ -393,7 +393,7 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
fill_pathname_join(
s1,
settings->directory.assets,
settings->paths.directory_assets,
"xmb",
sizeof(s1));
fill_pathname_join(s2,
@ -409,7 +409,7 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
fill_pathname_join(
s,
settings->directory.assets,
settings->paths.directory_assets,
"glui",
len);
}
@ -447,8 +447,8 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
{
settings_t *settings = config_get_ptr();
if (!string_is_empty(settings->menu.xmb_font))
strlcpy(s, settings->menu.xmb_font, len);
if (!string_is_empty(settings->paths.path_menu_xmb_font))
strlcpy(s, settings->paths.path_menu_xmb_font, len);
else
{
char s1[PATH_MAX_LENGTH];

View File

@ -816,8 +816,8 @@ static bool d3d_initialize(d3d_video_t *d3d, const video_info_t *info)
width, height, false, true);
#if defined(_XBOX360)
strlcpy(settings->path.font, "game:\\media\\Arial_12.xpr",
sizeof(settings->path.font));
strlcpy(settings->paths.path_font, "game:\\media\\Arial_12.xpr",
sizeof(settings->paths.path_font));
#endif
font_driver_init_osd(d3d, false, FONT_DRIVER_RENDER_DIRECT3D_API);
@ -1067,9 +1067,9 @@ static bool d3d_construct(d3d_video_t *d3d,
* to avoid set_shader() to be overridden
* later. */
enum rarch_shader_type type =
video_shader_parse_type(settings->path.shader, RARCH_SHADER_NONE);
video_shader_parse_type(settings->paths.path_shader, RARCH_SHADER_NONE);
if (settings->bools.video_shader_enable && type == RARCH_SHADER_CG)
d3d->shader_path = settings->path.shader;
d3d->shader_path = settings->paths.path_shader;
if (!d3d_process_shader(d3d))
return false;

View File

@ -413,7 +413,7 @@ static bool gl_shader_init(gl_t *gl)
enum rarch_shader_type type;
settings_t *settings = config_get_ptr();
const char *shader_path = (settings->bools.video_shader_enable
&& *settings->path.shader) ? settings->path.shader : NULL;
&& *settings->paths.path_shader) ? settings->paths.path_shader : NULL;
if (!gl)
{

View File

@ -839,7 +839,7 @@ static void omap_init_font(omap_video_t *vid, const char *font_path, unsigned fo
return;
if (!(font_renderer_create_default(&vid->font_driver, &vid->font,
*settings->path.font ? settings->path.font : NULL, settings->video.font_size)))
*settings->paths.path_font ? settings->paths.path_font : NULL, settings->video.font_size)))
{
RARCH_LOG("[video_omap]: font init failed\n");
return;
@ -966,7 +966,7 @@ static void *omap_gfx_init(const video_info_t *video,
if (input && input_data)
*input = NULL;
omap_init_font(vid, settings->path.font, settings->video.font_size);
omap_init_font(vid, settings->paths.path_font, settings->video.font_size);
vid->menu.frame = calloc(vid->width * vid->height, vid->bytes_per_pixel);
if (!vid->menu.frame)

View File

@ -450,7 +450,7 @@ static void *sdl2_gfx_init(const video_info_t *video,
SDL_ShowCursor(SDL_DISABLE);
sdl2_init_renderer(vid);
sdl2_init_font(vid, settings->path.font, settings->floats.video_font_size);
sdl2_init_font(vid, settings->paths.path_font, settings->floats.video_font_size);
sdl2_gfx_set_handles(vid);

View File

@ -99,7 +99,7 @@ static void sdl_init_font(sdl_video_t *vid, const char *font_path, unsigned font
return;
if (!font_renderer_create_default((const void**)&vid->font_driver, &vid->font,
*settings->path.font ? settings->path.font : NULL,
*settings->paths.path_font ? settings->paths.path_font : NULL,
settings->floats.video_font_size))
{
RARCH_LOG("[SDL]: Could not initialize fonts.\n");
@ -294,7 +294,7 @@ static void *sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
}
}
sdl_init_font(vid, settings->path.font, settings->floats.video_font_size);
sdl_init_font(vid, settings->paths.path_font, settings->floats.video_font_size);
vid->scaler.scaler_type = video->smooth ? SCALER_TYPE_BILINEAR : SCALER_TYPE_POINT;
vid->scaler.in_fmt = video->rgb32 ? SCALER_FMT_ARGB8888 : SCALER_FMT_RGB565;

View File

@ -196,7 +196,7 @@ static void *vg_init(const video_info_t *video,
if ( video->font_enable
&& font_renderer_create_default((const void**)&vg->font_driver, &vg->mFontRenderer,
*settings->path.font ? settings->path.font : NULL, settings->floats.video_font_size))
*settings->paths.path_font ? settings->paths.path_font : NULL, settings->floats.video_font_size))
{
vg->mFont = vgCreateFont(0);

View File

@ -783,8 +783,8 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path)
static bool vulkan_init_filter_chain(vk_t *vk)
{
settings_t *settings = config_get_ptr();
const char *shader_path = (settings->bools.video_shader_enable && *settings->path.shader) ?
settings->path.shader : NULL;
const char *shader_path = (settings->bools.video_shader_enable && *settings->paths.path_shader) ?
settings->paths.path_shader : NULL;
enum rarch_shader_type type = video_shader_parse_type(shader_path, RARCH_SHADER_NONE);

View File

@ -140,8 +140,9 @@ static void xv_init_font(xv_t *xv, const char *font_path, unsigned font_size)
return;
if (font_renderer_create_default((const void**)&xv->font_driver,
&xv->font, *settings->path.font
? settings->path.font : NULL, settings->floats.video_font_size))
&xv->font, *settings->paths.path_font
? settings->paths.path_font : NULL,
settings->floats.video_font_size))
{
int r, g, b;
r = settings->floats.video_msg_color_r * 255;
@ -605,7 +606,7 @@ static void *xv_init(const video_info_t *video,
}
xv_init_yuv_tables(xv);
xv_init_font(xv, settings->path.font, settings->floats.video_font_size);
xv_init_font(xv, settings->paths.path_font, settings->floats.video_font_size);
if (!x11_input_ctx_new(true))
goto error;

View File

@ -494,7 +494,7 @@ void font_driver_init_osd(void *video_data, bool threading_hint, enum font_drive
return;
video_font_driver = font_driver_init_first(video_data,
*settings->path.font ? settings->path.font : NULL,
*settings->paths.path_font ? settings->paths.path_font : NULL,
settings->floats.video_font_size, threading_hint, api);
if (!video_font_driver)

View File

@ -460,7 +460,7 @@ static void video_driver_init_filter(enum retro_pixel_format colfmt)
height = geom->max_height;
video_driver_state_filter = rarch_softfilter_new(
settings->path.softfilter_plugin,
settings->paths.path_softfilter_plugin,
RARCH_SOFTFILTER_THREADS_AUTO, colfmt, width, height);
if (!video_driver_state_filter)
@ -685,7 +685,7 @@ static bool video_driver_init_internal(void)
video_driver_filter_free();
if (!string_is_empty(settings->path.softfilter_plugin))
if (!string_is_empty(settings->paths.path_softfilter_plugin))
{
if (video_driver_is_hw_context())
{

View File

@ -109,7 +109,7 @@ bool input_remapping_save_file(const char *path)
buf[0] = remap_file[0] = '\0';
fill_pathname_join(buf, settings->directory.input_remapping,
fill_pathname_join(buf, settings->paths.directory_input_remapping,
path, sizeof(buf));
fill_pathname_noext(remap_file, buf, ".rmp", sizeof(remap_file));

View File

@ -33,7 +33,7 @@ bool find_libretro_core(char *fullpath,
{
size_t i;
settings_t *settings = config_get_ptr();
const char *dir = settings->directory.libretro;
const char *dir = settings->paths.directory_libretro;
struct string_list *list = dir_list_new(dir, ext, false, true, false, false);
if (!list)

View File

@ -439,7 +439,8 @@ static int deferred_push_cursor_manager_list_deferred(
rdb_path[0] = '\0';
fill_pathname_join(rdb_path, settings->path.content_database,
fill_pathname_join(rdb_path,
settings->paths.path_content_database,
rdb, sizeof(rdb_path));
strlcpy(info->path_b, info->path, sizeof(info->path_b));

View File

@ -185,9 +185,9 @@ static void menu_action_setting_disp_set_label_filter(
strlcpy(s2, path, len2);
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len);
if (settings && *settings->path.softfilter_plugin)
if (settings && *settings->paths.path_softfilter_plugin)
fill_short_pathname_representation(s,
settings->path.softfilter_plugin, len);
settings->paths.path_softfilter_plugin, len);
}
static void menu_action_setting_disp_set_label_pipeline(

View File

@ -334,7 +334,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_AUDIO_DSP_PLUGIN:
filebrowser_clear_type();
info.directory_ptr = idx;
info_path = settings->directory.audio_filter;
info_path = settings->paths.directory_audio_filter;
info_label = msg_hash_to_str(MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN);
info.enum_idx = MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
@ -343,7 +343,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->directory.video_shader;
info_path = settings->paths.directory_video_shader;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
@ -385,7 +385,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->directory.video_shader;
info_path = settings->paths.directory_video_shader;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
@ -408,7 +408,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->directory.input_remapping;
info_path = settings->paths.directory_input_remapping;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
@ -427,7 +427,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->directory.menu_content;
info_path = settings->paths.directory_menu_content;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
@ -443,7 +443,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->path.cheat_database;
info_path = settings->paths.path_cheat_database;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
@ -451,7 +451,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->directory.libretro;
info_path = settings->paths.directory_libretro;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_CORE;
break;
@ -467,7 +467,7 @@ int generic_action_ok_displaylist_push(const char *path,
filebrowser_set_type(FILEBROWSER_SELECT_COLLECTION);
info.type = type;
info.directory_ptr = idx;
info_path = settings->directory.playlist;
info_path = settings->paths.directory_playlist;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION;
break;
@ -491,10 +491,10 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_CONFIGURATIONS_LIST:
info.type = type;
info.directory_ptr = idx;
if (string_is_empty(settings->directory.menu_config))
if (string_is_empty(settings->paths.directory_menu_config))
info_path = label;
else
info_path = settings->directory.menu_config;
info_path = settings->paths.directory_menu_config;
info_label = label;
dl_type = DISPLAYLIST_GENERIC;
break;
@ -548,7 +548,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_DATABASE_MANAGER_LIST:
filebrowser_clear_type();
fill_pathname_join(tmp,
settings->path.content_database,
settings->paths.path_content_database,
path, sizeof(tmp));
info.directory_ptr = idx;
@ -560,7 +560,7 @@ int generic_action_ok_displaylist_push(const char *path,
break;
case ACTION_OK_DL_CURSOR_MANAGER_LIST:
filebrowser_clear_type();
fill_pathname_join(tmp, settings->directory.cursor,
fill_pathname_join(tmp, settings->paths.directory_cursor,
path, sizeof(tmp));
info.directory_ptr = idx;
@ -627,7 +627,7 @@ int generic_action_ok_displaylist_push(const char *path,
break;
case ACTION_OK_DL_DEFERRED_CORE_LIST:
info.directory_ptr = idx;
info_path = settings->directory.libretro;
info_path = settings->paths.directory_libretro;
info_label = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_LIST);
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_CORE_LIST;
dl_type = DISPLAYLIST_GENERIC;
@ -635,7 +635,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_DEFERRED_CORE_LIST_SET:
info.directory_ptr = idx;
rdb_entry_start_game_selection_ptr = (unsigned)idx;
info_path = settings->directory.libretro;
info_path = settings->paths.directory_libretro;
info_label = msg_hash_to_str(
MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET);
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET;
@ -1066,8 +1066,8 @@ static int generic_action_ok(const char *path,
{
settings_t *settings = config_get_ptr();
strlcpy(settings->path.menu_wallpaper,
action_path, sizeof(settings->path.menu_wallpaper));
strlcpy(settings->paths.path_menu_wallpaper,
action_path, sizeof(settings->paths.path_menu_wallpaper));
if (path_file_exists(action_path))
task_push_image_load(action_path,
@ -1884,7 +1884,7 @@ static int generic_action_ok_shader_preset_save(const char *path,
{
fill_pathname_join(
tmp,
settings->directory.video_shader,
settings->paths.directory_video_shader,
"presets",
sizeof(tmp));
fill_pathname_join(
@ -1954,7 +1954,7 @@ static void menu_input_st_string_cb_cheat_file_save_as(
menu_setting_generic(setting, false);
}
else if (!string_is_empty(label))
cheat_manager_save(str, settings->path.cheat_database);
cheat_manager_save(str, settings->paths.path_cheat_database);
}
menu_input_dialog_end();
@ -2000,7 +2000,7 @@ static int generic_action_ok_remap_file_save(const char *path,
if (!string_is_empty(core_name))
fill_pathname_join(
directory,
settings->directory.input_remapping,
settings->paths.directory_input_remapping,
core_name,
sizeof(directory));
@ -2395,10 +2395,11 @@ static int generic_action_ok_network(const char *path,
{
case MENU_ENUM_LABEL_CB_CORE_CONTENT_DIRS_LIST:
if (string_is_empty(settings->network.buildbot_assets_url))
if (string_is_empty(settings->paths.network_buildbot_assets_url))
return menu_cbs_exit();
fill_pathname_join(url_path, settings->network.buildbot_assets_url,
fill_pathname_join(url_path,
settings->paths.network_buildbot_assets_url,
"cores/.index-dirs", sizeof(url_path));
url_label = msg_hash_to_str(enum_idx);
type_id2 = ACTION_OK_DL_CORE_CONTENT_DIRS_LIST;
@ -2415,10 +2416,10 @@ static int generic_action_ok_network(const char *path,
break;
case MENU_ENUM_LABEL_CB_CORE_UPDATER_LIST:
if (string_is_empty(settings->network.buildbot_url))
if (string_is_empty(settings->paths.network_buildbot_url))
return menu_cbs_exit();
fill_pathname_join(url_path, settings->network.buildbot_url,
fill_pathname_join(url_path, settings->paths.network_buildbot_url,
file_path_str(FILE_PATH_INDEX_EXTENDED_URL), sizeof(url_path));
url_label = msg_hash_to_str(enum_idx);
type_id2 = ACTION_OK_DL_CORE_UPDATER_LIST;
@ -2534,32 +2535,32 @@ static void cb_generic_download(void *task_data,
switch (transf->enum_idx)
{
case MENU_ENUM_LABEL_CB_CORE_THUMBNAILS_DOWNLOAD:
dir_path = settings->directory.thumbnails;
dir_path = settings->paths.directory_thumbnails;
break;
case MENU_ENUM_LABEL_CB_CORE_UPDATER_DOWNLOAD:
dir_path = settings->directory.libretro;
dir_path = settings->paths.directory_libretro;
break;
case MENU_ENUM_LABEL_CB_CORE_CONTENT_DOWNLOAD:
dir_path = settings->directory.core_assets;
dir_path = settings->paths.directory_core_assets;
extract = settings->bools.network_buildbot_auto_extract_archive;
break;
case MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES:
dir_path = settings->path.libretro_info;
dir_path = settings->paths.path_libretro_info;
break;
case MENU_ENUM_LABEL_CB_UPDATE_ASSETS:
dir_path = settings->directory.assets;
dir_path = settings->paths.directory_assets;
break;
case MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES:
dir_path = settings->directory.autoconfig;
dir_path = settings->paths.directory_autoconfig;
break;
case MENU_ENUM_LABEL_CB_UPDATE_DATABASES:
dir_path = settings->path.content_database;
dir_path = settings->paths.path_content_database;
break;
case MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS:
dir_path = settings->directory.overlay;
dir_path = settings->paths.directory_overlay;
break;
case MENU_ENUM_LABEL_CB_UPDATE_CHEATS:
dir_path = settings->path.cheat_database;
dir_path = settings->paths.path_cheat_database;
break;
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG:
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL:
@ -2576,7 +2577,7 @@ static void cb_generic_download(void *task_data,
dirname = "shaders_slang";
fill_pathname_join(shaderdir,
settings->directory.video_shader,
settings->paths.directory_video_shader,
dirname,
sizeof(shaderdir));
@ -2691,7 +2692,7 @@ static int action_ok_download_generic(const char *path,
s[0] = s3[0] = '\0';
fill_pathname_join(s,
settings->network.buildbot_assets_url,
settings->paths.network_buildbot_assets_url,
"frontend", sizeof(s));
switch (enum_idx)
@ -2748,7 +2749,7 @@ static int action_ok_download_generic(const char *path,
strlcpy(s, file_path_str(FILE_PATH_CORE_THUMBNAILS_URL), sizeof(s));
break;
default:
strlcpy(s, settings->network.buildbot_url, sizeof(s));
strlcpy(s, settings->paths.network_buildbot_url, sizeof(s));
break;
}
@ -3433,7 +3434,7 @@ static int action_ok_push_content_list(const char *path,
{
settings_t *settings = config_get_ptr();
return generic_action_ok_displaylist_push(path,
settings->directory.menu_content, label, type, idx,
settings->paths.directory_menu_content, label, type, idx,
entry_idx, ACTION_OK_DL_CONTENT_LIST);
}
@ -3669,7 +3670,7 @@ static int action_ok_scan_directory_list(const char *path,
filebrowser_clear_type();
return generic_action_ok_displaylist_push(path,
settings->directory.menu_content, label, type, idx,
settings->paths.directory_menu_content, label, type, idx,
entry_idx, ACTION_OK_DL_SCAN_DIR_LIST);
}
@ -3688,7 +3689,7 @@ static int action_ok_push_downloads_dir(const char *path,
settings_t *settings = config_get_ptr();
filebrowser_clear_type();
return generic_action_ok_displaylist_push(path, settings->directory.core_assets,
return generic_action_ok_displaylist_push(path, settings->paths.directory_core_assets,
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
type, idx,
entry_idx, ACTION_OK_DL_CONTENT_LIST);
@ -4131,7 +4132,7 @@ static int action_ok_netplay_enable_client(const char *path,
}
/* If no host was specified in the config, ask for one */
if (!settings->netplay.server[0])
if (!settings->paths.netplay_server[0])
{
menu_input_ctx_line_t line;
memset(&line, 0, sizeof(line));

View File

@ -62,8 +62,8 @@ int action_scan_file(const char *path,
fill_pathname_join(fullpath, menu_path, path, sizeof(fullpath));
task_push_dbscan(
settings->directory.playlist,
settings->path.content_database,
settings->paths.directory_playlist,
settings->paths.path_content_database,
fullpath, false, handle_dbscan_finished);
return 0;
@ -88,8 +88,8 @@ int action_scan_directory(const char *path,
fill_pathname_join(fullpath, fullpath, path, sizeof(fullpath));
task_push_dbscan(
settings->directory.playlist,
settings->path.content_database,
settings->paths.directory_playlist,
settings->paths.path_content_database,
fullpath, true, handle_dbscan_finished);
return 0;

View File

@ -67,7 +67,7 @@ static int action_start_video_filter_file_load(unsigned type, const char *label)
if (!settings)
return -1;
settings->path.softfilter_plugin[0] = '\0';
settings->paths.path_softfilter_plugin[0] = '\0';
command_event(CMD_EVENT_REINIT, NULL);
return 0;
}

View File

@ -1642,8 +1642,8 @@ static void mui_context_reset(void *data)
menu_display_allocate_white_texture();
mui_context_reset_textures(mui);
if (path_file_exists(settings->path.menu_wallpaper))
task_push_image_load(settings->path.menu_wallpaper,
if (path_file_exists(settings->paths.path_menu_wallpaper))
task_push_image_load(settings->paths.path_menu_wallpaper,
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -951,7 +951,7 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
fill_pathname_join(
xmb->thumbnail_file_path,
settings->directory.thumbnails,
settings->paths.directory_thumbnails,
xmb->title_name,
sizeof(xmb->thumbnail_file_path));
@ -1404,7 +1404,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
{
fill_pathname_join_noext(
path,
settings->directory.dynamic_wallpapers,
settings->paths.directory_dynamic_wallpapers,
tmp,
sizeof(path));
free(tmp);
@ -1667,7 +1667,7 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb)
info.need_navigation_clear = false;
info.list = xmb->horizontal_list;
info.menu_list = NULL;
strlcpy(info.path, settings->directory.playlist, sizeof(info.path));
strlcpy(info.path, settings->paths.directory_playlist, sizeof(info.path));
info.path_b[0] = '\0';
info.path_c[0] = '\0';
strlcpy(info.label,
@ -3524,8 +3524,8 @@ static void xmb_context_reset_background(const char *iconpath)
fill_pathname_join(path, iconpath, "bg.png", sizeof(path));
if (!string_is_empty(settings->path.menu_wallpaper))
strlcpy(path, settings->path.menu_wallpaper, sizeof(path));
if (!string_is_empty(settings->paths.path_menu_wallpaper))
strlcpy(path, settings->paths.path_menu_wallpaper, sizeof(path));
if (path_file_exists(path))

View File

@ -177,7 +177,7 @@ static void print_buf_lines(file_list_t *list, char *buf,
fill_pathname_join_noext(
core_path,
settings->path.libretro_info,
settings->paths.path_libretro_info,
(extended && !string_is_empty(core_pathname))
? core_pathname : line_start,
sizeof(core_path));
@ -444,7 +444,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
settings_t *settings = config_get_ptr();
firmware_info.path = core_info->path;
firmware_info.directory.system = settings->directory.system;
firmware_info.directory.system = settings->paths.directory_system;
if (core_info_list_update_missing_firmware(&firmware_info))
{
@ -1713,7 +1713,8 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
file_path_str(FILE_PATH_LPL_EXTENSION),
sizeof(path_base));
fill_pathname_join(path_playlist, settings->directory.playlist, path_base,
fill_pathname_join(path_playlist,
settings->paths.directory_playlist, path_base,
sizeof(path_playlist));
playlist = playlist_init(path_playlist, COLLECTION_SIZE);
@ -2612,7 +2613,7 @@ static int menu_displaylist_parse_horizontal_list(
fill_pathname_join(
path_playlist,
settings->directory.playlist,
settings->paths.directory_playlist,
item->path,
sizeof(path_playlist));
@ -2843,7 +2844,7 @@ static int menu_displaylist_parse_horizontal_content_actions(
db_path[0] = '\0';
fill_pathname_join_noext(db_path, settings->path.content_database,
fill_pathname_join_noext(db_path, settings->paths.path_content_database,
db_name, sizeof(db_path));
strlcat(db_path, file_path_str(FILE_PATH_RDB_EXTENSION),
sizeof(db_path));
@ -3596,8 +3597,9 @@ static void menu_displaylist_parse_playlist_associations(
menu_displaylist_info_t *info)
{
settings_t *settings = config_get_ptr();
struct string_list *str_list = dir_list_new_special(settings->directory.playlist,
DIR_LIST_COLLECTIONS, NULL);
struct string_list *str_list = dir_list_new_special(
settings->paths.directory_playlist,
DIR_LIST_COLLECTIONS, NULL);
if (str_list && str_list->size)
{
@ -3840,7 +3842,7 @@ static bool menu_displaylist_push_internal(
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST),
sizeof(info->label));
if (string_is_empty(settings->directory.playlist))
if (string_is_empty(settings->paths.directory_playlist))
{
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_entries_append_enum(info->list,
@ -3857,7 +3859,7 @@ static bool menu_displaylist_push_internal(
{
strlcpy(
info->path,
settings->directory.playlist,
settings->paths.directory_playlist,
sizeof(info->path));
if (!menu_displaylist_ctl(
@ -5471,7 +5473,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
info->need_refresh = true;
break;
case DISPLAYLIST_LOAD_CONTENT_LIST:
if (!string_is_empty(settings->directory.menu_content))
if (!string_is_empty(settings->paths.directory_menu_content))
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
@ -5670,7 +5672,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
new_label[0] = '\0';
fill_pathname_join(new_label,
settings->network.buildbot_assets_url,
settings->paths.network_buildbot_assets_url,
"cores", sizeof(new_label));
print_buf_lines(info->list, core_buf, new_label,
(int)core_len, FILE_TYPE_DOWNLOAD_URL, true, false);
@ -5726,7 +5728,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
fill_pathname_join(
path_playlist,
settings->directory.playlist,
settings->paths.directory_playlist,
info->path,
sizeof(path_playlist));
@ -5759,7 +5761,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_playlist_history(menu, info,
g_defaults.content_history,
"history",
settings->path.content_history,
settings->paths.path_content_history,
&ret);
else
{
@ -5783,7 +5785,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_playlist_history(menu, info,
g_defaults.image_history,
"images_history",
settings->path.content_image_history,
settings->paths.path_content_image_history,
&ret);
else
{
@ -5808,7 +5810,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_playlist_history(menu, info,
g_defaults.music_history,
"music_history",
settings->path.content_music_history,
settings->paths.path_content_music_history,
&ret);
else
{
@ -5833,7 +5835,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_playlist_history(menu, info,
g_defaults.video_history,
"video_history",
settings->path.content_video_history,
settings->paths.path_content_video_history,
&ret);
else
{
@ -6211,7 +6213,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
file_path_str(FILE_PATH_RDB_EXTENSION),
sizeof(info->exts));
info->enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST;
strlcpy(info->path, settings->path.content_database, sizeof(info->path));
strlcpy(info->path, settings->paths.path_content_database, sizeof(info->path));
break;
case DISPLAYLIST_ARCHIVE_ACTION:
#ifdef HAVE_COMPRESSION
@ -6247,7 +6249,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
filebrowser_clear_type();
info->type_default = FILE_TYPE_CURSOR;
strlcpy(info->exts, "dbc", sizeof(info->exts));
strlcpy(info->path, settings->directory.cursor, sizeof(info->path));
strlcpy(info->path, settings->paths.directory_cursor, sizeof(info->path));
break;
case DISPLAYLIST_CORES:
{

View File

@ -3667,11 +3667,11 @@ static bool setting_append_list(
CONFIG_PATH(
list, list_info,
settings->path.softfilter_plugin,
sizeof(settings->path.softfilter_plugin),
settings->paths.path_softfilter_plugin,
sizeof(settings->paths.path_softfilter_plugin),
MENU_ENUM_LABEL_VIDEO_FILTER,
MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
settings->directory.video_filter,
settings->paths.directory_video_filter,
&group_info,
&subgroup_info,
parent_group,
@ -3906,11 +3906,11 @@ static bool setting_append_list(
CONFIG_PATH(
list, list_info,
settings->path.audio_dsp_plugin,
sizeof(settings->path.audio_dsp_plugin),
settings->paths.path_audio_dsp_plugin,
sizeof(settings->paths.path_audio_dsp_plugin),
MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN,
MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN,
settings->directory.audio_filter,
settings->paths.directory_audio_filter,
&group_info,
&subgroup_info,
parent_group,
@ -4508,8 +4508,8 @@ static bool setting_append_list(
CONFIG_PATH(
list, list_info,
settings->path.font,
sizeof(settings->path.font),
settings->paths.path_font,
sizeof(settings->paths.path_font),
MENU_ENUM_LABEL_VIDEO_FONT_PATH,
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH,
"",
@ -4627,11 +4627,11 @@ static bool setting_append_list(
CONFIG_PATH(
list, list_info,
settings->path.overlay,
sizeof(settings->path.overlay),
settings->paths.path_overlay,
sizeof(settings->paths.path_overlay),
MENU_ENUM_LABEL_OVERLAY_PRESET,
MENU_ENUM_LABEL_VALUE_OVERLAY_PRESET,
settings->directory.overlay,
settings->paths.directory_overlay,
&group_info,
&subgroup_info,
parent_group,
@ -4694,8 +4694,8 @@ static bool setting_append_list(
{
CONFIG_PATH(
list, list_info,
settings->path.menu_wallpaper,
sizeof(settings->path.menu_wallpaper),
settings->paths.path_menu_wallpaper,
sizeof(settings->paths.path_menu_wallpaper),
MENU_ENUM_LABEL_MENU_WALLPAPER,
MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
"",
@ -4987,11 +4987,11 @@ static bool setting_append_list(
CONFIG_PATH(
list, list_info,
settings->menu.xmb_font,
sizeof(settings->menu.xmb_font),
settings->paths.path_menu_xmb_font,
sizeof(settings->paths.path_menu_xmb_font),
MENU_ENUM_LABEL_XMB_FONT,
MENU_ENUM_LABEL_VALUE_XMB_FONT,
settings->menu.xmb_font,
settings->paths.path_menu_xmb_font,
&group_info,
&subgroup_info,
parent_group,
@ -5601,8 +5601,8 @@ static bool setting_append_list(
#ifdef HAVE_NETWORKING
CONFIG_STRING(
list, list_info,
settings->network.buildbot_url,
sizeof(settings->network.buildbot_url),
settings->paths.network_buildbot_url,
sizeof(settings->paths.network_buildbot_url),
MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL,
MENU_ENUM_LABEL_VALUE_CORE_UPDATER_BUILDBOT_URL,
buildbot_server_url,
@ -5615,8 +5615,8 @@ static bool setting_append_list(
CONFIG_STRING(
list, list_info,
settings->network.buildbot_assets_url,
sizeof(settings->network.buildbot_assets_url),
settings->paths.network_buildbot_assets_url,
sizeof(settings->paths.network_buildbot_assets_url),
MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL,
MENU_ENUM_LABEL_VALUE_BUILDBOT_ASSETS_URL,
buildbot_assets_server_url,
@ -5692,8 +5692,8 @@ static bool setting_append_list(
CONFIG_STRING(
list, list_info,
settings->netplay.server,
sizeof(settings->netplay.server),
settings->paths.netplay_server,
sizeof(settings->paths.netplay_server),
MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS,
MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS,
"",
@ -5722,8 +5722,8 @@ static bool setting_append_list(
CONFIG_STRING(
list, list_info,
settings->netplay.password,
sizeof(settings->netplay.password),
settings->paths.netplay_password,
sizeof(settings->paths.netplay_password),
MENU_ENUM_LABEL_NETPLAY_PASSWORD,
MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD,
"",
@ -5736,8 +5736,8 @@ static bool setting_append_list(
CONFIG_STRING(
list, list_info,
settings->netplay.spectate_password,
sizeof(settings->netplay.spectate_password),
settings->paths.netplay_spectate_password,
sizeof(settings->paths.netplay_spectate_password),
MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD,
MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD,
"",
@ -6087,8 +6087,8 @@ static bool setting_append_list(
CONFIG_STRING(
list, list_info,
settings->username,
sizeof(settings->username),
settings->paths.username,
sizeof(settings->paths.username),
MENU_ENUM_LABEL_NETPLAY_NICKNAME,
MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME,
"",
@ -6101,8 +6101,8 @@ static bool setting_append_list(
CONFIG_STRING(
list, list_info,
settings->browse_url,
sizeof(settings->browse_url),
settings->paths.browse_url,
sizeof(settings->paths.browse_url),
MENU_ENUM_LABEL_BROWSE_URL,
MENU_ENUM_LABEL_VALUE_BROWSE_URL,
"",
@ -6219,8 +6219,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.system,
sizeof(settings->directory.system),
settings->paths.directory_system,
sizeof(settings->paths.directory_system),
MENU_ENUM_LABEL_SYSTEM_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SYSTEM_DIRECTORY,
"",
@ -6233,8 +6233,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.core_assets,
sizeof(settings->directory.core_assets),
settings->paths.directory_core_assets,
sizeof(settings->paths.directory_core_assets),
MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY,
"",
@ -6247,8 +6247,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.assets,
sizeof(settings->directory.assets),
settings->paths.directory_assets,
sizeof(settings->paths.directory_assets),
MENU_ENUM_LABEL_ASSETS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY,
"",
@ -6261,8 +6261,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.dynamic_wallpapers,
sizeof(settings->directory.dynamic_wallpapers),
settings->paths.directory_dynamic_wallpapers,
sizeof(settings->paths.directory_dynamic_wallpapers),
MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY,
"",
@ -6275,8 +6275,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.thumbnails,
sizeof(settings->directory.thumbnails),
settings->paths.directory_thumbnails,
sizeof(settings->paths.directory_thumbnails),
MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY,
"",
@ -6289,8 +6289,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.menu_content,
sizeof(settings->directory.menu_content),
settings->paths.directory_menu_content,
sizeof(settings->paths.directory_menu_content),
MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY,
"",
@ -6303,8 +6303,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.menu_config,
sizeof(settings->directory.menu_config),
settings->paths.directory_menu_config,
sizeof(settings->paths.directory_menu_config),
MENU_ENUM_LABEL_RGUI_CONFIG_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY,
"",
@ -6318,8 +6318,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.libretro,
sizeof(settings->directory.libretro),
settings->paths.directory_libretro,
sizeof(settings->paths.directory_libretro),
MENU_ENUM_LABEL_LIBRETRO_DIR_PATH,
MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH,
g_defaults.dir.core,
@ -6333,8 +6333,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->path.libretro_info,
sizeof(settings->path.libretro_info),
settings->paths.path_libretro_info,
sizeof(settings->paths.path_libretro_info),
MENU_ENUM_LABEL_LIBRETRO_INFO_PATH,
MENU_ENUM_LABEL_VALUE_LIBRETRO_INFO_PATH,
g_defaults.dir.core_info,
@ -6349,8 +6349,8 @@ static bool setting_append_list(
#ifdef HAVE_LIBRETRODB
CONFIG_DIR(
list, list_info,
settings->path.content_database,
sizeof(settings->path.content_database),
settings->paths.path_content_database,
sizeof(settings->paths.path_content_database),
MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY,
"",
@ -6363,8 +6363,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.cursor,
sizeof(settings->directory.cursor),
settings->paths.directory_cursor,
sizeof(settings->paths.directory_cursor),
MENU_ENUM_LABEL_CURSOR_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CURSOR_DIRECTORY,
"",
@ -6378,8 +6378,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->path.cheat_database,
sizeof(settings->path.cheat_database),
settings->paths.path_cheat_database,
sizeof(settings->paths.path_cheat_database),
MENU_ENUM_LABEL_CHEAT_DATABASE_PATH,
MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH,
"",
@ -6392,8 +6392,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.video_filter,
sizeof(settings->directory.video_filter),
settings->paths.directory_video_filter,
sizeof(settings->paths.directory_video_filter),
MENU_ENUM_LABEL_VIDEO_FILTER_DIR,
MENU_ENUM_LABEL_VALUE_VIDEO_FILTER_DIR,
"",
@ -6406,8 +6406,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.audio_filter,
sizeof(settings->directory.audio_filter),
settings->paths.directory_audio_filter,
sizeof(settings->paths.directory_audio_filter),
MENU_ENUM_LABEL_AUDIO_FILTER_DIR,
MENU_ENUM_LABEL_VALUE_AUDIO_FILTER_DIR,
"",
@ -6420,8 +6420,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.video_shader,
sizeof(settings->directory.video_shader),
settings->paths.directory_video_shader,
sizeof(settings->paths.directory_video_shader),
MENU_ENUM_LABEL_VIDEO_SHADER_DIR,
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DIR,
g_defaults.dir.shader,
@ -6465,8 +6465,8 @@ static bool setting_append_list(
#ifdef HAVE_OVERLAY
CONFIG_DIR(
list, list_info,
settings->directory.overlay,
sizeof(settings->directory.overlay),
settings->paths.directory_overlay,
sizeof(settings->paths.directory_overlay),
MENU_ENUM_LABEL_OVERLAY_DIRECTORY,
MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY,
g_defaults.dir.overlay,
@ -6480,8 +6480,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.screenshot,
sizeof(settings->directory.screenshot),
settings->paths.directory_screenshot,
sizeof(settings->paths.directory_screenshot),
MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY,
"",
@ -6494,8 +6494,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.autoconfig,
sizeof(settings->directory.autoconfig),
settings->paths.directory_autoconfig,
sizeof(settings->paths.directory_autoconfig),
MENU_ENUM_LABEL_JOYPAD_AUTOCONFIG_DIR,
MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR,
"",
@ -6508,8 +6508,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.input_remapping,
sizeof(settings->directory.input_remapping),
settings->paths.directory_input_remapping,
sizeof(settings->paths.directory_input_remapping),
MENU_ENUM_LABEL_INPUT_REMAPPING_DIRECTORY,
MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY,
"",
@ -6522,8 +6522,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.playlist,
sizeof(settings->directory.playlist),
settings->paths.directory_playlist,
sizeof(settings->paths.directory_playlist),
MENU_ENUM_LABEL_PLAYLIST_DIRECTORY,
MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY,
"",
@ -6564,8 +6564,8 @@ static bool setting_append_list(
CONFIG_DIR(
list, list_info,
settings->directory.cache,
sizeof(settings->directory.cache),
settings->paths.directory_cache,
sizeof(settings->paths.directory_cache),
MENU_ENUM_LABEL_CACHE_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY,
"",

View File

@ -130,7 +130,7 @@ bool menu_shader_manager_init(void)
#ifdef HAVE_SHADER_MANAGER
settings_t *settings = config_get_ptr();
const char *config_path = path_get(RARCH_PATH_CONFIG);
const char *path_shader = settings->path.shader;
const char *path_shader = settings->paths.path_shader;
menu_shader_manager_free();
@ -199,9 +199,9 @@ bool menu_shader_manager_init(void)
char preset_path[PATH_MAX_LENGTH];
config_file_t *conf = NULL;
const char *shader_dir =
*settings->directory.video_shader ?
settings->directory.video_shader :
settings->directory.system;
*settings->paths.directory_video_shader ?
settings->paths.directory_video_shader :
settings->paths.directory_system;
preset_path[0] = '\0';
@ -265,9 +265,9 @@ void menu_shader_manager_set_preset(void *data,
/* Makes sure that we use Menu Preset shader on driver reinit.
* Only do this when the cgp actually works to avoid potential errors. */
strlcpy(settings->path.shader,
strlcpy(settings->paths.path_shader,
preset_path ? preset_path : "",
sizeof(settings->path.shader));
sizeof(settings->paths.path_shader));
configuration_set_bool(settings, settings->bools.video_shader_enable, true);
if (!preset_path || !shader)
@ -390,8 +390,8 @@ bool menu_shader_manager_save_preset(
if (!fullpath)
{
settings_t *settings = config_get_ptr();
dirs[0] = settings->directory.video_shader;
dirs[1] = settings->directory.menu_config;
dirs[0] = settings->paths.directory_video_shader;
dirs[1] = settings->paths.directory_menu_config;
dirs[2] = config_directory;
}

View File

@ -611,7 +611,7 @@ static void netplay_announce(void)
content_get_crc(&content_crc_ptr);
net_http_urlencode_full(&username, settings->username);
net_http_urlencode_full(&username, settings->paths.username);
net_http_urlencode_full(&corename, system->info.library_name);
net_http_urlencode_full(&gamename, !string_is_empty(path_basename(path_get(RARCH_PATH_BASENAME))) ? path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A");
net_http_urlencode_full(&coreversion, system->info.library_version);
@ -623,8 +623,8 @@ static void netplay_announce(void)
"&has_password=%d&has_spectate_password=%d&force_mitm=%d",
username, corename, coreversion, gamename, *content_crc_ptr,
settings->uints.netplay_port,
*settings->netplay.password ? 1 : 0,
*settings->netplay.spectate_password ? 1 : 0,
*settings->paths.netplay_password ? 1 : 0,
*settings->paths.netplay_spectate_password ? 1 : 0,
settings->bools.netplay_use_mitm_server);
task_push_http_post_transfer(url, buf, true, NULL, netplay_announce_cb, NULL);
@ -1214,7 +1214,7 @@ bool init_netplay(void *direct_host, const char *server, unsigned port)
settings->ints.netplay_check_frames,
&cbs,
settings->bools.netplay_nat_traversal,
settings->username,
settings->paths.username,
quirks);
if (netplay_data)

View File

@ -222,7 +222,7 @@ bool netplay_handshake_init_send(netplay_t *netplay,
header[1] = htonl(netplay_platform_magic());
header[2] = htonl(NETPLAY_COMPRESSION_SUPPORTED);
if (netplay->is_server &&
(settings->netplay.password[0] || settings->netplay.spectate_password[0]))
(settings->paths.netplay_password[0] || settings->paths.netplay_spectate_password[0]))
{
/* Demand a password */
if (simple_rand_next == 1)
@ -655,7 +655,7 @@ bool netplay_handshake_pre_nick(netplay_t *netplay,
if (netplay->is_server)
{
settings_t *settings = config_get_ptr();
if (settings->netplay.password[0] || settings->netplay.spectate_password[0])
if (settings->paths.netplay_password[0] || settings->paths.netplay_spectate_password[0])
{
/* There's a password, so just put them in PRE_PASSWORD mode */
connection->mode = NETPLAY_CONNECTION_PRE_PASSWORD;
@ -722,9 +722,9 @@ bool netplay_handshake_pre_password(netplay_t *netplay,
correct = false;
snprintf(password, sizeof(password), "%08X", connection->salt);
if (settings->netplay.password[0])
if (settings->paths.netplay_password[0])
{
strlcpy(password + 8, settings->netplay.password, sizeof(password)-8);
strlcpy(password + 8, settings->paths.netplay_password, sizeof(password)-8);
sha256_hash(corr_password_buf.password, (uint8_t *) password, strlen(password));
if (!memcmp(password_buf.password, corr_password_buf.password, sizeof(password_buf.password)))
{
@ -732,9 +732,9 @@ bool netplay_handshake_pre_password(netplay_t *netplay,
connection->can_play = true;
}
}
if (settings->netplay.spectate_password[0])
if (settings->paths.netplay_spectate_password[0])
{
strlcpy(password + 8, settings->netplay.spectate_password, sizeof(password)-8);
strlcpy(password + 8, settings->paths.netplay_spectate_password, sizeof(password)-8);
sha256_hash(corr_password_buf.password, (uint8_t *) password, strlen(password));
if (!memcmp(password_buf.password, corr_password_buf.password, sizeof(password_buf.password)))
correct = true;

View File

@ -637,8 +637,8 @@ static void retroarch_parse_input(int argc, char *argv[])
settings_t *settings = config_get_ptr();
path_clear(RARCH_PATH_CORE);
strlcpy(settings->directory.libretro, optarg,
sizeof(settings->directory.libretro));
strlcpy(settings->paths.directory_libretro, optarg,
sizeof(settings->paths.directory_libretro));
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL);
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL);
@ -710,8 +710,8 @@ static void retroarch_parse_input(int argc, char *argv[])
retroarch_override_setting_set(
RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL);
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL);
strlcpy(settings->netplay.server, optarg,
sizeof(settings->netplay.server));
strlcpy(settings->paths.netplay_server, optarg,
sizeof(settings->paths.netplay_server));
}
break;
@ -796,8 +796,8 @@ static void retroarch_parse_input(int argc, char *argv[])
{
settings_t *settings = config_get_ptr();
rarch_ctl(RARCH_CTL_USERNAME_SET, NULL);
strlcpy(settings->username, optarg,
sizeof(settings->username));
strlcpy(settings->paths.username, optarg,
sizeof(settings->paths.username));
}
break;

View File

@ -583,7 +583,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
buf[0] = '\0';
if (settings)
options_path = settings->path.core_options;
options_path = settings->paths.path_core_options;
if (string_is_empty(options_path) && !path_is_empty(RARCH_PATH_CONFIG))
{

View File

@ -427,7 +427,7 @@ bool input_autoconfigure_connect(
retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task));
autoconfig_params_t *state = (autoconfig_params_t*)calloc(1, sizeof(*state));
settings_t *settings = config_get_ptr();
const char *dir_autoconf = settings->directory.autoconfig;
const char *dir_autoconf = settings->paths.directory_autoconfig;
if (!task || !state || !settings->bools.input_autodetect_enable)
goto error;

View File

@ -1045,8 +1045,8 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
content_ctx.history_list_enable = settings->bools.history_list_enable;
if (!string_is_empty(settings->directory.system))
content_ctx.directory_system = strdup(settings->directory.system);
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
#ifdef HAVE_MENU
if (!content_info->environ_get)
@ -1119,8 +1119,8 @@ bool task_push_load_content_from_playlist_from_menu(
content_ctx.history_list_enable = settings->bools.history_list_enable;
if (!string_is_empty(settings->directory.system))
content_ctx.directory_system = strdup(settings->directory.system);
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
/* Set libretro core path */
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
@ -1195,8 +1195,8 @@ bool task_push_start_current_core(content_ctx_info_t *content_info)
content_ctx.history_list_enable = settings->bools.history_list_enable;
if (!string_is_empty(settings->directory.system))
content_ctx.directory_system = strdup(settings->directory.system);
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
#ifdef HAVE_MENU
if (!content_info->environ_get)
@ -1304,8 +1304,8 @@ bool task_push_load_content_with_new_core_from_menu(
content_ctx.history_list_enable = settings->bools.history_list_enable;
if (!string_is_empty(settings->directory.system))
content_ctx.directory_system = strdup(settings->directory.system);
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
/* Set content path */
path_set(RARCH_PATH_CONTENT, fullpath);
@ -1384,8 +1384,8 @@ static bool task_load_content_callback(content_ctx_info_t *content_info,
content_ctx.history_list_enable = settings->bools.history_list_enable;
if (!string_is_empty(settings->directory.system))
content_ctx.directory_system = strdup(settings->directory.system);
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
#ifdef HAVE_MENU
if (!content_info->environ_get)
@ -1636,10 +1636,10 @@ bool content_init(void)
content_ctx.history_list_enable = settings->bools.history_list_enable;
content_ctx.set_supports_no_game_enable = settings->bools.set_supports_no_game_enable;
if (!string_is_empty(settings->directory.system))
content_ctx.directory_system = strdup(settings->directory.system);
if (!string_is_empty(settings->directory.cache))
content_ctx.directory_cache = strdup(settings->directory.cache);
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
if (!string_is_empty(settings->paths.directory_cache))
content_ctx.directory_cache = strdup(settings->paths.directory_cache);
if (!string_is_empty(sys_info->info.valid_extensions))
content_ctx.valid_extensions = strdup(sys_info->info.valid_extensions);

View File

@ -272,7 +272,7 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name,
strlcpy(state->hostname, hostname, sizeof(state->hostname));
strlcpy(state->core_name, core_name, sizeof(state->core_name));
state->lpl_list = dir_list_new(settings->directory.playlist,
state->lpl_list = dir_list_new(settings->paths.directory_playlist,
NULL, true, true, true, false);
state->found = false;

View File

@ -809,7 +809,7 @@ bool task_push_overlay_load_default(
retro_task_callback_t cb, void *user_data)
{
settings_t *settings = config_get_ptr();
const char *path = settings->path.overlay;
const char *path = settings->paths.path_overlay;
if (string_is_empty(path))
return false;

View File

@ -205,7 +205,7 @@ static bool screenshot_dump(
retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task));
screenshot_task_state_t *state = (screenshot_task_state_t*)
calloc(1, sizeof(*state));
const char *screenshot_dir = settings->directory.screenshot;
const char *screenshot_dir = settings->paths.directory_screenshot;
screenshot_path[0] = '\0';
@ -342,7 +342,7 @@ static bool take_screenshot_choice(const char *name_base, bool savestate,
void *frame_data = NULL;
const void* old_data = NULL;
settings_t *settings = config_get_ptr();
const char *screenshot_dir = settings->directory.screenshot;
const char *screenshot_dir = settings->paths.directory_screenshot;
/* No way to infer screenshot directory. */
if ( string_is_empty(screenshot_dir)