mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Move some variables
This commit is contained in:
parent
65dec874a8
commit
895783d854
2
cheats.c
2
cheats.c
@ -130,7 +130,7 @@ bool cheat_manager_save(const char *path)
|
||||
settings_t *settings = config_get_ptr();
|
||||
cheat_manager_t *handle = cheat_manager_state;
|
||||
|
||||
fill_pathname_join(buf, settings->cheat_database,
|
||||
fill_pathname_join(buf, settings->path.cheat_database,
|
||||
path, sizeof(buf));
|
||||
|
||||
fill_pathname_noext(cheats_file, buf, ".cht", sizeof(cheats_file));
|
||||
|
@ -682,9 +682,10 @@ static bool event_save_core_config(void)
|
||||
RARCH_ERR("%s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Infer file name based on libretro core. */
|
||||
if (!string_is_empty(settings->libretro)
|
||||
&& path_file_exists(settings->libretro))
|
||||
if (!string_is_empty(settings->path.libretro)
|
||||
&& path_file_exists(settings->path.libretro))
|
||||
{
|
||||
unsigned i;
|
||||
RARCH_LOG("Using core name for new config\n");
|
||||
@ -693,8 +694,11 @@ static bool event_save_core_config(void)
|
||||
{
|
||||
char tmp[64];
|
||||
|
||||
fill_pathname_base(config_name, settings->libretro,
|
||||
fill_pathname_base(
|
||||
config_name,
|
||||
settings->path.libretro,
|
||||
sizeof(config_name));
|
||||
|
||||
path_remove_extension(config_name);
|
||||
fill_pathname_join(config_path, config_dir, config_name,
|
||||
sizeof(config_path));
|
||||
@ -984,7 +988,7 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
#else
|
||||
char *fullpath = NULL;
|
||||
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, settings->libretro);
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, settings->path.libretro);
|
||||
event_cmd_ctl(EVENT_CMD_EXEC, (void*)fullpath);
|
||||
event_cmd_ctl(EVENT_CMD_QUIT, NULL);
|
||||
#endif
|
||||
@ -1009,15 +1013,17 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
core_info_ctx_find_t info_find;
|
||||
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
if (!(*settings->libretro))
|
||||
if (!(*settings->path.libretro))
|
||||
return false;
|
||||
|
||||
libretro_get_system_info(settings->libretro, system,
|
||||
libretro_get_system_info(
|
||||
settings->path.libretro,
|
||||
system,
|
||||
ptr);
|
||||
#else
|
||||
libretro_get_system_info_static(system, ptr);
|
||||
#endif
|
||||
info_find.path = settings->libretro;
|
||||
info_find.path = settings->path.libretro;
|
||||
|
||||
if (!core_info_ctl(CORE_INFO_CTL_LOAD, &info_find))
|
||||
return false;
|
||||
@ -1266,9 +1272,9 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
break;
|
||||
case EVENT_CMD_DSP_FILTER_INIT:
|
||||
event_cmd_ctl(EVENT_CMD_DSP_FILTER_DEINIT, NULL);
|
||||
if (!*settings->audio.dsp_plugin)
|
||||
if (!*settings->path.audio_dsp_plugin)
|
||||
break;
|
||||
audio_driver_dsp_filter_init(settings->audio.dsp_plugin);
|
||||
audio_driver_dsp_filter_init(settings->path.audio_dsp_plugin);
|
||||
break;
|
||||
case EVENT_CMD_GPU_RECORD_DEINIT:
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_GPU_RECORD_DEINIT, NULL);
|
||||
|
286
configuration.c
286
configuration.c
@ -622,7 +622,6 @@ static void config_set_defaults(void)
|
||||
settings->menu.core_enable = true;
|
||||
settings->menu.dynamic_wallpaper_enable = false;
|
||||
settings->menu.thumbnails = 0;
|
||||
*settings->menu.wallpaper = '\0';
|
||||
settings->menu.show_advanced_settings = show_advanced_settings;
|
||||
settings->menu.entry_normal_color = menu_entry_normal_color;
|
||||
settings->menu.entry_hover_color = menu_entry_hover_color;
|
||||
@ -743,10 +742,14 @@ static void config_set_defaults(void)
|
||||
*settings->directory.dynamic_wallpapers = '\0';
|
||||
*settings->directory.thumbnails = '\0';
|
||||
*settings->directory.playlist = '\0';
|
||||
*settings->directory.autoconfig = '\0';
|
||||
#ifdef HAVE_MENU
|
||||
*settings->directory.menu_content = '\0';
|
||||
*settings->directory.menu_config = '\0';
|
||||
#endif
|
||||
*settings->directory.video_shader = '\0';
|
||||
*settings->directory.video_filter = '\0';
|
||||
*settings->directory.audio_filter = '\0';
|
||||
|
||||
if (!global->has_set.ups_pref)
|
||||
global->patch.ups_pref = false;
|
||||
@ -767,21 +770,18 @@ static void config_set_defaults(void)
|
||||
*settings->path.bundle_assets_dst = '\0';
|
||||
*settings->path.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->bundle_assets_extract_version_current = 0;
|
||||
settings->bundle_assets_extract_last_version = 0;
|
||||
*settings->playlist_names = '\0';
|
||||
*settings->playlist_cores = '\0';
|
||||
*settings->directory.content_history = '\0';
|
||||
*settings->content_database = '\0';
|
||||
*settings->cheat_database = '\0';
|
||||
*settings->input.autoconfig_dir = '\0';
|
||||
*settings->input.overlay = '\0';
|
||||
*settings->video.shader_dir = '\0';
|
||||
*settings->video.filter_dir = '\0';
|
||||
*settings->audio.filter_dir = '\0';
|
||||
*settings->video.softfilter_plugin = '\0';
|
||||
*settings->audio.dsp_plugin = '\0';
|
||||
*settings->path.audio_dsp_plugin = '\0';
|
||||
settings->core_specific_config = default_core_specific_config;
|
||||
settings->game_specific_options = default_game_specific_options;
|
||||
settings->auto_overrides_enable = default_auto_overrides_enable;
|
||||
@ -828,27 +828,30 @@ static void config_set_defaults(void)
|
||||
if (*g_defaults.dir.core)
|
||||
fill_pathname_expand_special(settings->directory.libretro,
|
||||
g_defaults.dir.core, sizeof(settings->directory.libretro));
|
||||
if (*g_defaults.dir.audio_filter)
|
||||
strlcpy(settings->directory.audio_filter,
|
||||
g_defaults.dir.audio_filter, sizeof(settings->directory.audio_filter));
|
||||
if (*g_defaults.dir.video_filter)
|
||||
strlcpy(settings->directory.video_filter,
|
||||
g_defaults.dir.video_filter, sizeof(settings->directory.video_filter));
|
||||
if (*g_defaults.dir.shader)
|
||||
fill_pathname_expand_special(settings->directory.video_shader,
|
||||
g_defaults.dir.shader, sizeof(settings->directory.video_shader));
|
||||
|
||||
if (*g_defaults.path.buildbot_server_url)
|
||||
strlcpy(settings->network.buildbot_url,
|
||||
g_defaults.path.buildbot_server_url, sizeof(settings->network.buildbot_url));
|
||||
if (*g_defaults.dir.audio_filter)
|
||||
strlcpy(settings->audio.filter_dir,
|
||||
g_defaults.dir.audio_filter, sizeof(settings->audio.filter_dir));
|
||||
if (*g_defaults.dir.video_filter)
|
||||
strlcpy(settings->video.filter_dir,
|
||||
g_defaults.dir.video_filter, sizeof(settings->video.filter_dir));
|
||||
if (*g_defaults.path.core)
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, g_defaults.path.core);
|
||||
if (*g_defaults.dir.database)
|
||||
strlcpy(settings->content_database, g_defaults.dir.database,
|
||||
sizeof(settings->content_database));
|
||||
strlcpy(settings->path.content_database, g_defaults.dir.database,
|
||||
sizeof(settings->path.content_database));
|
||||
if (*g_defaults.dir.cursor)
|
||||
strlcpy(settings->directory.cursor, g_defaults.dir.cursor,
|
||||
sizeof(settings->directory.cursor));
|
||||
if (*g_defaults.dir.cheats)
|
||||
strlcpy(settings->cheat_database, g_defaults.dir.cheats,
|
||||
sizeof(settings->cheat_database));
|
||||
strlcpy(settings->path.cheat_database, g_defaults.dir.cheats,
|
||||
sizeof(settings->path.cheat_database));
|
||||
if (*g_defaults.dir.core_info)
|
||||
fill_pathname_expand_special(settings->path.libretro_info,
|
||||
g_defaults.dir.core_info, sizeof(settings->path.libretro_info));
|
||||
@ -888,13 +891,10 @@ static void config_set_defaults(void)
|
||||
g_defaults.dir.menu_config,
|
||||
sizeof(settings->directory.menu_config));
|
||||
#endif
|
||||
if (*g_defaults.dir.shader)
|
||||
fill_pathname_expand_special(settings->video.shader_dir,
|
||||
g_defaults.dir.shader, sizeof(settings->video.shader_dir));
|
||||
if (*g_defaults.dir.autoconfig)
|
||||
strlcpy(settings->input.autoconfig_dir,
|
||||
strlcpy(settings->directory.autoconfig,
|
||||
g_defaults.dir.autoconfig,
|
||||
sizeof(settings->input.autoconfig_dir));
|
||||
sizeof(settings->directory.autoconfig));
|
||||
|
||||
if (!global->has_set.state_path && *g_defaults.dir.savestate)
|
||||
strlcpy(global->dir.savestate,
|
||||
@ -1377,9 +1377,9 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
config_get_hex_base(conf, "menu_title_color",
|
||||
&settings->menu.title_color);
|
||||
config_get_path(conf, "menu_wallpaper",
|
||||
settings->menu.wallpaper, sizeof(settings->menu.wallpaper));
|
||||
if (string_is_equal(settings->menu.wallpaper, "default"))
|
||||
*settings->menu.wallpaper = '\0';
|
||||
settings->path.menu_wallpaper, sizeof(settings->path.menu_wallpaper));
|
||||
if (string_is_equal(settings->path.menu_wallpaper, "default"))
|
||||
*settings->path.menu_wallpaper = '\0';
|
||||
#endif
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, video.hard_sync_frames, "video_hard_sync_frames");
|
||||
@ -1450,17 +1450,16 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.gpu_record, "video_gpu_record");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.gpu_screenshot, "video_gpu_screenshot");
|
||||
|
||||
config_get_path(conf, "video_shader_dir", settings->video.shader_dir, sizeof(settings->video.shader_dir));
|
||||
if (string_is_equal(settings->video.shader_dir, "default"))
|
||||
*settings->video.shader_dir = '\0';
|
||||
if (string_is_equal(settings->directory.video_shader, "default"))
|
||||
*settings->directory.video_shader = '\0';
|
||||
|
||||
config_get_path(conf, "video_filter_dir", settings->video.filter_dir, sizeof(settings->video.filter_dir));
|
||||
if (string_is_equal(settings->video.filter_dir, "default"))
|
||||
*settings->video.filter_dir = '\0';
|
||||
config_get_path(conf, "video_filter_dir", settings->directory.video_filter, sizeof(settings->directory.video_filter));
|
||||
if (string_is_equal(settings->directory.video_filter, "default"))
|
||||
*settings->directory.video_filter = '\0';
|
||||
|
||||
config_get_path(conf, "audio_filter_dir", settings->audio.filter_dir, sizeof(settings->audio.filter_dir));
|
||||
if (string_is_equal(settings->audio.filter_dir, "default"))
|
||||
*settings->audio.filter_dir = '\0';
|
||||
config_get_path(conf, "audio_filter_dir", settings->directory.audio_filter, sizeof(settings->directory.audio_filter));
|
||||
if (string_is_equal(settings->directory.audio_filter, "default"))
|
||||
*settings->directory.audio_filter = '\0';
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.back_as_menu_toggle_enable, "back_as_menu_toggle_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.remap_binds_enable, "input_remap_binds_enable");
|
||||
@ -1557,23 +1556,10 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
#endif
|
||||
config_get_array(conf, "video_context_driver", settings->video.context_driver, sizeof(settings->video.context_driver));
|
||||
config_get_array(conf, "audio_driver", settings->audio.driver, sizeof(settings->audio.driver));
|
||||
config_get_path(conf, "video_filter", settings->video.softfilter_plugin, sizeof(settings->video.softfilter_plugin));
|
||||
config_get_path(conf, "audio_dsp_plugin", settings->audio.dsp_plugin, sizeof(settings->audio.dsp_plugin));
|
||||
config_get_array(conf, "input_driver", settings->input.driver, sizeof(settings->input.driver));
|
||||
config_get_array(conf, "input_joypad_driver", settings->input.joypad_driver, sizeof(settings->input.joypad_driver));
|
||||
config_get_array(conf, "input_keyboard_layout", settings->input.keyboard_layout, sizeof(settings->input.keyboard_layout));
|
||||
|
||||
if (!global->has_set.libretro_directory)
|
||||
config_get_path(conf, "libretro_directory", settings->directory.libretro, sizeof(settings->directory.libretro));
|
||||
|
||||
/* Safe-guard against older behavior. */
|
||||
if (path_is_directory(settings->libretro))
|
||||
{
|
||||
RARCH_WARN("\"libretro_path\" is a directory, using this for \"libretro_directory\" instead.\n");
|
||||
strlcpy(settings->directory.libretro, settings->libretro,
|
||||
sizeof(settings->directory.libretro));
|
||||
*settings->libretro = '\0';
|
||||
}
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, ui.menubar_enable, "ui_menubar_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, ui.suspend_screensaver_enable, "suspend_screensaver_enable");
|
||||
@ -1582,9 +1568,49 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, multimedia.builtin_mediaplayer_enable, "builtin_mediaplayer_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, multimedia.builtin_imageviewer_enable, "builtin_imageviewer_enable");
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
config_get_path(conf, "input_overlay", settings->path.overlay, sizeof(settings->path.overlay));
|
||||
config_get_path(conf, "input_osk_overlay", settings->path.osk_overlay, sizeof(settings->path.osk_overlay));
|
||||
#endif
|
||||
config_get_path(conf, "video_filter", settings->path.softfilter_plugin, sizeof(settings->path.softfilter_plugin));
|
||||
config_get_path(conf, "audio_dsp_plugin", settings->path.audio_dsp_plugin, sizeof(settings->path.audio_dsp_plugin));
|
||||
config_get_path(conf, "libretro_info_path", settings->path.libretro_info, sizeof(settings->path.libretro_info));
|
||||
|
||||
config_get_path(conf, "core_options_path", settings->path.core_options, sizeof(settings->path.core_options));
|
||||
config_get_array(conf, "bundle_assets_src_path", settings->path.bundle_assets_src, sizeof(settings->path.bundle_assets_src));
|
||||
config_get_array(conf, "bundle_assets_dst_path", settings->path.bundle_assets_dst, sizeof(settings->path.bundle_assets_dst));
|
||||
config_get_array(conf, "bundle_assets_dst_path_subdir", settings->path.bundle_assets_dst_subdir, sizeof(settings->path.bundle_assets_dst_subdir));
|
||||
|
||||
config_get_path(conf, "content_database_path",
|
||||
settings->path.content_database, sizeof(settings->path.content_database));
|
||||
config_get_path(conf, "cheat_database_path",
|
||||
settings->path.cheat_database, sizeof(settings->path.cheat_database));
|
||||
config_get_path(conf, "cursor_directory",
|
||||
settings->directory.cursor, sizeof(settings->directory.cursor));
|
||||
config_get_path(conf, "cheat_settings_path",
|
||||
settings->path.cheat_settings, sizeof(settings->path.cheat_settings));
|
||||
config_get_path(conf, "content_history_path", settings->path.content_history,
|
||||
sizeof(settings->path.content_history));
|
||||
if (string_is_empty(settings->path.content_history))
|
||||
{
|
||||
if (string_is_empty(settings->directory.content_history))
|
||||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->path.content_history,
|
||||
global->path.config,
|
||||
"content_history.lpl",
|
||||
sizeof(settings->path.content_history));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(settings->path.content_history,
|
||||
settings->directory.content_history,
|
||||
"content_history.lpl",
|
||||
sizeof(settings->path.content_history));
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, auto_screenshot_filename, "auto_screenshot_filename");
|
||||
|
||||
config_get_path(conf, "screenshot_directory", settings->directory.screenshot, sizeof(settings->directory.screenshot));
|
||||
if (*settings->directory.screenshot)
|
||||
{
|
||||
@ -1596,7 +1622,22 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
*settings->directory.screenshot = '\0';
|
||||
}
|
||||
}
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, auto_screenshot_filename, "auto_screenshot_filename");
|
||||
|
||||
config_get_path(conf,
|
||||
"video_shader_dir",
|
||||
settings->directory.video_shader,
|
||||
sizeof(settings->directory.video_shader));
|
||||
if (!global->has_set.libretro_directory)
|
||||
config_get_path(conf, "libretro_directory", settings->directory.libretro, sizeof(settings->directory.libretro));
|
||||
|
||||
/* Safe-guard against older behavior. */
|
||||
if (path_is_directory(settings->path.libretro))
|
||||
{
|
||||
RARCH_WARN("\"libretro_path\" is a directory, using this for \"libretro_directory\" instead.\n");
|
||||
strlcpy(settings->directory.libretro, settings->path.libretro,
|
||||
sizeof(settings->directory.libretro));
|
||||
*settings->path.libretro = '\0';
|
||||
}
|
||||
|
||||
config_get_path(conf, "resampler_directory", settings->directory.resampler,
|
||||
sizeof(settings->directory.resampler));
|
||||
@ -1675,7 +1716,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
if (string_is_equal(settings->directory.overlay, "default"))
|
||||
*settings->directory.overlay = '\0';
|
||||
|
||||
config_get_path(conf, "input_overlay", settings->input.overlay, sizeof(settings->input.overlay));
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.overlay_enable, "input_overlay_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.overlay_enable_autopreferred, "input_overlay_enable_autopreferred");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.overlay_hide_in_menu, "input_overlay_hide_in_menu");
|
||||
@ -1686,7 +1726,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
if (string_is_equal(global->dir.osk_overlay, "default"))
|
||||
*global->dir.osk_overlay = '\0';
|
||||
|
||||
config_get_path(conf, "input_osk_overlay", settings->osk.overlay, sizeof(settings->osk.overlay));
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, osk.enable, "input_osk_overlay_enable");
|
||||
#endif
|
||||
|
||||
@ -1702,9 +1741,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, bundle_assets_extract_enable, "bundle_assets_extract_enable");
|
||||
CONFIG_GET_INT_BASE(conf, settings, bundle_assets_extract_version_current, "bundle_assets_extract_version_current");
|
||||
CONFIG_GET_INT_BASE(conf, settings, bundle_assets_extract_last_version, "bundle_assets_extract_last_version");
|
||||
config_get_array(conf, "bundle_assets_src_path", settings->path.bundle_assets_src, sizeof(settings->path.bundle_assets_src));
|
||||
config_get_array(conf, "bundle_assets_dst_path", settings->path.bundle_assets_dst, sizeof(settings->path.bundle_assets_dst));
|
||||
config_get_array(conf, "bundle_assets_dst_path_subdir", settings->path.bundle_assets_dst_subdir, sizeof(settings->path.bundle_assets_dst_subdir));
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, rewind_granularity, "rewind_granularity");
|
||||
CONFIG_GET_FLOAT_BASE(conf, settings, slowmotion_ratio, "slowmotion_ratio");
|
||||
@ -1721,14 +1757,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, pause_nonactive, "pause_nonactive");
|
||||
CONFIG_GET_INT_BASE(conf, settings, autosave_interval, "autosave_interval");
|
||||
|
||||
config_get_path(conf, "content_database_path",
|
||||
settings->content_database, sizeof(settings->content_database));
|
||||
config_get_path(conf, "cheat_database_path",
|
||||
settings->cheat_database, sizeof(settings->cheat_database));
|
||||
config_get_path(conf, "cursor_directory",
|
||||
settings->directory.cursor, sizeof(settings->directory.cursor));
|
||||
config_get_path(conf, "cheat_settings_path",
|
||||
settings->path.cheat_settings, sizeof(settings->path.cheat_settings));
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, block_sram_overwrite, "block_sram_overwrite");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, savestate_auto_index, "savestate_auto_index");
|
||||
@ -1766,8 +1794,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, history_list_enable, "history_list_enable");
|
||||
|
||||
config_get_path(conf, "content_history_path", settings->path.content_history,
|
||||
sizeof(settings->path.content_history));
|
||||
CONFIG_GET_INT_BASE(conf, settings, content_history_size, "content_history_size");
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.turbo_period, "input_turbo_period");
|
||||
@ -1775,7 +1801,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.autodetect_enable, "input_autodetect_enable");
|
||||
config_get_path(conf, "joypad_autoconfig_dir",
|
||||
settings->input.autoconfig_dir, sizeof(settings->input.autoconfig_dir));
|
||||
settings->directory.autoconfig, sizeof(settings->directory.autoconfig));
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
|
||||
config_get_path(conf, "netplay_nickname", settings->username, sizeof(settings->username));
|
||||
@ -1834,24 +1860,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
RARCH_WARN("savestate_directory is not a directory, ignoring ...\n");
|
||||
}
|
||||
|
||||
if (string_is_empty(settings->path.content_history))
|
||||
{
|
||||
if (string_is_empty(settings->directory.content_history))
|
||||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->path.content_history,
|
||||
global->path.config,
|
||||
"content_history.lpl",
|
||||
sizeof(settings->path.content_history));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(settings->path.content_history,
|
||||
settings->directory.content_history,
|
||||
"content_history.lpl",
|
||||
sizeof(settings->path.content_history));
|
||||
}
|
||||
}
|
||||
|
||||
if (!config_get_path(conf, "system_directory",
|
||||
settings->directory.system, sizeof(settings->directory.system)))
|
||||
@ -1896,7 +1904,7 @@ static void config_load_core_specific(void)
|
||||
|
||||
*global->path.core_specific_config = '\0';
|
||||
|
||||
if (!*settings->libretro)
|
||||
if (!*settings->path.libretro)
|
||||
return;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
@ -1920,7 +1928,7 @@ static void config_load_core_specific(void)
|
||||
global->path.config, sizeof(global->path.core_specific_config));
|
||||
}
|
||||
|
||||
fill_pathname_dir(global->path.core_specific_config, settings->libretro,
|
||||
fill_pathname_dir(global->path.core_specific_config, settings->path.libretro,
|
||||
".cfg", sizeof(global->path.core_specific_config));
|
||||
|
||||
if (settings->core_specific_config)
|
||||
@ -1931,7 +1939,7 @@ static void config_load_core_specific(void)
|
||||
global->has_set.save_path = false;
|
||||
global->has_set.state_path = false;
|
||||
|
||||
strlcpy(tmp, settings->libretro, sizeof(tmp));
|
||||
strlcpy(tmp, settings->path.libretro, sizeof(tmp));
|
||||
RARCH_LOG("Config: loading core-specific config from: %s.\n",
|
||||
global->path.core_specific_config);
|
||||
|
||||
@ -1940,7 +1948,7 @@ static void config_load_core_specific(void)
|
||||
|
||||
/* Force some parameters which are implied when using core specific configs.
|
||||
* Don't have the core config file overwrite the libretro path. */
|
||||
strlcpy(settings->libretro, tmp, sizeof(settings->libretro));
|
||||
strlcpy(settings->path.libretro, tmp, sizeof(settings->path.libretro));
|
||||
|
||||
/* This must be true for core specific configs. */
|
||||
settings->core_specific_config = true;
|
||||
@ -2079,7 +2087,7 @@ bool config_load_override(void)
|
||||
#endif
|
||||
|
||||
/* Store the libretro_path we're using since it will be overwritten by the override when reloading */
|
||||
strlcpy(buf, settings->libretro, sizeof(buf));
|
||||
strlcpy(buf, settings->path.libretro, sizeof(buf));
|
||||
|
||||
/* Toggle has_save_path to false so it resets */
|
||||
global->has_set.save_path = false;
|
||||
@ -2090,7 +2098,7 @@ bool config_load_override(void)
|
||||
|
||||
/* Restore the libretro_path we're using
|
||||
* since it will be overwritten by the override when reloading. */
|
||||
strlcpy(settings->libretro, buf, sizeof(settings->libretro));
|
||||
strlcpy(settings->path.libretro, buf, sizeof(settings->path.libretro));
|
||||
runloop_msg_queue_push("Configuration override loaded", 1, 100, true);
|
||||
|
||||
/* Reset save paths */
|
||||
@ -2496,7 +2504,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
config_file_t *conf = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
fill_pathname_join(buf, settings->input.autoconfig_dir,
|
||||
fill_pathname_join(buf, settings->directory.autoconfig,
|
||||
settings->input.joypad_driver, sizeof(buf));
|
||||
|
||||
if(path_is_directory(buf))
|
||||
@ -2507,7 +2515,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(buf, settings->input.autoconfig_dir,
|
||||
fill_pathname_join(buf, settings->directory.autoconfig,
|
||||
path, sizeof(buf));
|
||||
fill_pathname_noext(autoconf_file, buf, ".cfg", sizeof(autoconf_file));
|
||||
}
|
||||
@ -2594,20 +2602,33 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "fps_show", settings->fps_show);
|
||||
config_set_bool(conf, "ui_menubar_enable", settings->ui.menubar_enable);
|
||||
|
||||
config_set_path(conf, "core_options_path", settings->path.core_options);
|
||||
config_set_path(conf, "libretro_info_path", settings->path.libretro_info);
|
||||
config_set_path(conf, "video_shader", settings->path.shader);
|
||||
config_set_string(conf, "bundle_assets_src_path", settings->path.bundle_assets_src);
|
||||
config_set_string(conf, "bundle_assets_dst_path", settings->path.bundle_assets_dst);
|
||||
config_set_string(conf, "bundle_assets_dst_path_subdir", settings->path.bundle_assets_dst_subdir);
|
||||
|
||||
config_set_path(conf, "recording_output_directory", global->record.output_dir);
|
||||
config_set_path(conf, "recording_config_directory", global->record.config_dir);
|
||||
|
||||
config_set_bool(conf, "suspend_screensaver_enable", settings->ui.suspend_screensaver_enable);
|
||||
config_set_path(conf, "libretro_directory", settings->directory.libretro);
|
||||
config_set_path(conf, "content_database_path", settings->content_database);
|
||||
config_set_path(conf, "cheat_database_path", settings->cheat_database);
|
||||
|
||||
config_set_path(conf, "core_options_path", settings->path.core_options);
|
||||
config_set_path(conf, "libretro_info_path", settings->path.libretro_info);
|
||||
config_set_path(conf, "video_shader", settings->path.shader);
|
||||
config_set_string(conf, "bundle_assets_src_path", settings->path.bundle_assets_src);
|
||||
config_set_string(conf, "bundle_assets_dst_path", settings->path.bundle_assets_dst);
|
||||
config_set_string(conf, "bundle_assets_dst_path_subdir", settings->path.bundle_assets_dst_subdir);
|
||||
config_set_path(conf, "content_database_path", settings->path.content_database);
|
||||
config_set_path(conf, "cheat_database_path", settings->path.cheat_database);
|
||||
#ifdef HAVE_MENU
|
||||
config_set_path(conf, "menu_wallpaper", settings->path.menu_wallpaper);
|
||||
#endif
|
||||
config_set_string(conf, "video_filter", settings->path.softfilter_plugin);
|
||||
config_set_string(conf, "audio_dsp_plugin", settings->path.audio_dsp_plugin);
|
||||
config_set_path(conf, "content_history_path", settings->path.content_history);
|
||||
#ifdef HAVE_OVERLAY
|
||||
config_set_path(conf, "input_overlay", settings->path.overlay);
|
||||
config_set_path(conf, "input_osk_overlay", settings->path.osk_overlay);
|
||||
#endif
|
||||
config_set_path(conf, "video_font_path", settings->path.font);
|
||||
|
||||
config_set_path(conf, "cursor_directory", settings->directory.cursor);
|
||||
config_set_path(conf, "content_history_dir", settings->directory.content_history);
|
||||
config_set_bool(conf, "rewind_enable", settings->rewind_enable);
|
||||
@ -2669,8 +2690,9 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf,"menu_dynamic_wallpaper_enable",
|
||||
settings->menu.dynamic_wallpaper_enable);
|
||||
config_set_int(conf,"menu_thumbnails", settings->menu.thumbnails);
|
||||
config_set_path(conf, "menu_wallpaper", settings->menu.wallpaper);
|
||||
#endif
|
||||
|
||||
|
||||
config_set_bool(conf, "video_vsync", settings->video.vsync);
|
||||
config_set_bool(conf, "video_hard_sync", settings->video.hard_sync);
|
||||
config_set_int(conf, "video_hard_sync_frames",
|
||||
@ -2691,8 +2713,6 @@ bool config_save_file(const char *path)
|
||||
settings->auto_screenshot_filename);
|
||||
config_set_int(conf, "aspect_ratio_index", settings->video.aspect_ratio_idx);
|
||||
config_set_string(conf, "audio_device", settings->audio.device);
|
||||
config_set_string(conf, "video_filter", settings->video.softfilter_plugin);
|
||||
config_set_string(conf, "audio_dsp_plugin", settings->audio.dsp_plugin);
|
||||
config_set_string(conf, "core_updater_buildbot_url",
|
||||
settings->network.buildbot_url);
|
||||
config_set_string(conf, "core_updater_buildbot_assets_url",
|
||||
@ -2748,21 +2768,12 @@ bool config_save_file(const char *path)
|
||||
settings->directory.input_remapping);
|
||||
config_set_path(conf, "resampler_directory",
|
||||
settings->directory.resampler);
|
||||
config_set_string(conf, "audio_resampler", settings->audio.resampler);
|
||||
config_set_path(conf, "savefile_directory",
|
||||
*global->dir.savefile ? global->dir.savefile : "default");
|
||||
config_set_path(conf, "savestate_directory",
|
||||
*global->dir.savestate ? global->dir.savestate : "default");
|
||||
config_set_path(conf, "video_shader_dir",
|
||||
*settings->video.shader_dir ?
|
||||
settings->video.shader_dir : "default");
|
||||
*settings->directory.video_shader ?
|
||||
settings->directory.video_shader : "default");
|
||||
config_set_path(conf, "video_filter_dir",
|
||||
*settings->video.filter_dir ?
|
||||
settings->video.filter_dir : "default");
|
||||
config_set_path(conf, "audio_filter_dir",
|
||||
*settings->audio.filter_dir ?
|
||||
settings->audio.filter_dir : "default");
|
||||
|
||||
*settings->directory.video_filter ?
|
||||
settings->directory.video_filter : "default");
|
||||
config_set_path(conf, "core_assets_directory",
|
||||
*settings->directory.core_assets ?
|
||||
settings->directory.core_assets : "default");
|
||||
@ -2778,6 +2789,30 @@ bool config_save_file(const char *path)
|
||||
config_set_path(conf, "playlist_directory",
|
||||
*settings->directory.playlist ?
|
||||
settings->directory.playlist : "default");
|
||||
#ifdef HAVE_MENU
|
||||
config_set_path(conf, "rgui_browser_directory",
|
||||
*settings->directory.menu_content ?
|
||||
settings->directory.menu_content : "default");
|
||||
config_set_path(conf, "rgui_config_directory",
|
||||
*settings->directory.menu_config ?
|
||||
settings->directory.menu_config : "default");
|
||||
#endif
|
||||
config_set_path(conf, "joypad_autoconfig_dir",
|
||||
settings->directory.autoconfig);
|
||||
#ifdef HAVE_OVERLAY
|
||||
config_set_path(conf, "overlay_directory",
|
||||
*settings->directory.overlay ? settings->directory.overlay : "default");
|
||||
#endif
|
||||
config_set_path(conf, "audio_filter_dir",
|
||||
*settings->directory.audio_filter ?
|
||||
settings->directory.audio_filter : "default");
|
||||
|
||||
config_set_string(conf, "audio_resampler", settings->audio.resampler);
|
||||
config_set_path(conf, "savefile_directory",
|
||||
*global->dir.savefile ? global->dir.savefile : "default");
|
||||
config_set_path(conf, "savestate_directory",
|
||||
*global->dir.savestate ? global->dir.savestate : "default");
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
config_set_int(conf, "xmb_scale_factor", settings->menu.xmb_scale_factor);
|
||||
config_set_int(conf, "xmb_alpha_factor", settings->menu.xmb_alpha_factor);
|
||||
@ -2787,12 +2822,6 @@ bool config_save_file(const char *path)
|
||||
config_set_int(conf, "xmb_ribbon_enable", settings->menu.xmb_ribbon_enable);
|
||||
config_set_path(conf, "xmb_font",
|
||||
!string_is_empty(settings->menu.xmb_font) ? settings->menu.xmb_font : "");
|
||||
config_set_path(conf, "rgui_browser_directory",
|
||||
*settings->directory.menu_content ?
|
||||
settings->directory.menu_content : "default");
|
||||
config_set_path(conf, "rgui_config_directory",
|
||||
*settings->directory.menu_config ?
|
||||
settings->directory.menu_config : "default");
|
||||
config_set_bool(conf, "rgui_show_start_screen",
|
||||
settings->menu_show_start_screen);
|
||||
config_set_bool(conf, "menu_navigation_wraparound_enable",
|
||||
@ -2810,17 +2839,11 @@ bool config_save_file(const char *path)
|
||||
settings->menu.title_color);
|
||||
#endif
|
||||
|
||||
config_set_path(conf, "content_history_path", settings->path.content_history);
|
||||
config_set_int(conf, "content_history_size", settings->content_history_size);
|
||||
config_set_path(conf, "joypad_autoconfig_dir",
|
||||
settings->input.autoconfig_dir);
|
||||
config_set_bool(conf, "input_autodetect_enable",
|
||||
settings->input.autodetect_enable);
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
config_set_path(conf, "overlay_directory",
|
||||
*settings->directory.overlay ? settings->directory.overlay : "default");
|
||||
config_set_path(conf, "input_overlay", settings->input.overlay);
|
||||
config_set_bool(conf, "input_overlay_enable", settings->input.overlay_enable);
|
||||
config_set_bool(conf, "input_overlay_enable_autopreferred", settings->input.overlay_enable_autopreferred);
|
||||
config_set_bool(conf, "input_overlay_hide_in_menu", settings->input.overlay_hide_in_menu);
|
||||
@ -2831,11 +2854,10 @@ bool config_save_file(const char *path)
|
||||
|
||||
config_set_path(conf, "osk_overlay_directory",
|
||||
*global->dir.osk_overlay ? global->dir.osk_overlay : "default");
|
||||
config_set_path(conf, "input_osk_overlay", settings->osk.overlay);
|
||||
config_set_bool(conf, "input_osk_overlay_enable", settings->osk.enable);
|
||||
#endif
|
||||
|
||||
config_set_path(conf, "video_font_path", settings->path.font);
|
||||
|
||||
config_set_float(conf, "video_message_pos_x", settings->video.msg_pos_x);
|
||||
config_set_float(conf, "video_message_pos_y", settings->video.msg_pos_y);
|
||||
|
||||
|
@ -74,12 +74,9 @@ typedef struct settings
|
||||
|
||||
bool shader_enable;
|
||||
|
||||
char softfilter_plugin[PATH_MAX_LENGTH];
|
||||
float refresh_rate;
|
||||
bool threaded;
|
||||
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
char shader_dir[PATH_MAX_LENGTH];
|
||||
|
||||
float font_size;
|
||||
bool font_enable;
|
||||
@ -123,7 +120,6 @@ typedef struct settings
|
||||
bool dynamic_wallpaper_enable;
|
||||
unsigned thumbnails;
|
||||
bool throttle;
|
||||
char wallpaper[PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
{
|
||||
@ -198,22 +194,20 @@ typedef struct settings
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char resampler[32];
|
||||
char device[PATH_MAX_LENGTH];
|
||||
bool enable;
|
||||
bool mute_enable;
|
||||
unsigned out_rate;
|
||||
unsigned block_frames;
|
||||
char device[PATH_MAX_LENGTH];
|
||||
unsigned latency;
|
||||
bool sync;
|
||||
|
||||
char dsp_plugin[PATH_MAX_LENGTH];
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
|
||||
bool rate_control;
|
||||
float rate_control_delta;
|
||||
float max_timing_skew;
|
||||
float volume; /* dB scale. */
|
||||
char resampler[32];
|
||||
} audio;
|
||||
|
||||
struct
|
||||
@ -221,6 +215,7 @@ typedef struct settings
|
||||
char driver[32];
|
||||
char joypad_driver[32];
|
||||
char keyboard_layout[64];
|
||||
char device_names[MAX_USERS][64];
|
||||
|
||||
unsigned remap_ids[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
@ -241,7 +236,6 @@ typedef struct settings
|
||||
float axis_threshold;
|
||||
unsigned joypad_map[MAX_USERS];
|
||||
unsigned device[MAX_USERS];
|
||||
char device_names[MAX_USERS][64];
|
||||
unsigned device_name_index[MAX_USERS];
|
||||
bool autodetect_enable;
|
||||
bool netplay_client_swap_input;
|
||||
@ -252,11 +246,9 @@ typedef struct settings
|
||||
bool overlay_enable;
|
||||
bool overlay_enable_autopreferred;
|
||||
bool overlay_hide_in_menu;
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
float overlay_opacity;
|
||||
float overlay_scale;
|
||||
|
||||
char autoconfig_dir[PATH_MAX_LENGTH];
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
|
||||
@ -274,7 +266,6 @@ typedef struct settings
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
float opacity;
|
||||
float scale;
|
||||
} osk;
|
||||
@ -318,6 +309,14 @@ typedef struct settings
|
||||
|
||||
struct
|
||||
{
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
char osk_overlay[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 libretro_info[PATH_MAX_LENGTH];
|
||||
@ -331,6 +330,10 @@ typedef struct settings
|
||||
|
||||
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];
|
||||
@ -351,10 +354,7 @@ typedef struct settings
|
||||
|
||||
unsigned content_history_size;
|
||||
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
unsigned libretro_log_level;
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
|
||||
bool auto_screenshot_filename;
|
||||
|
||||
|
@ -755,7 +755,7 @@ void content_push_to_history_playlist(bool do_push,
|
||||
content_playlist_push(g_defaults.history,
|
||||
path,
|
||||
NULL,
|
||||
settings->libretro,
|
||||
settings->path.libretro,
|
||||
info->library_name,
|
||||
NULL,
|
||||
NULL);
|
||||
|
12
dynamic.c
12
dynamic.c
@ -309,7 +309,7 @@ static void load_dynamic_core(void)
|
||||
retro_fail(1, "init_libretro_sym()");
|
||||
}
|
||||
|
||||
if (!*settings->libretro)
|
||||
if (!*settings->path.libretro)
|
||||
{
|
||||
RARCH_ERR("RetroArch is built for dynamic libretro cores, but "
|
||||
"libretro_path is not set. Cannot continue.\n");
|
||||
@ -319,15 +319,15 @@ static void load_dynamic_core(void)
|
||||
/* Need to use absolute path for this setting. It can be
|
||||
* saved to content history, and a relative path would
|
||||
* break in that scenario. */
|
||||
path_resolve_realpath(settings->libretro, sizeof(settings->libretro));
|
||||
path_resolve_realpath(settings->path.libretro, sizeof(settings->path.libretro));
|
||||
|
||||
RARCH_LOG("Loading dynamic libretro core from: \"%s\"\n",
|
||||
settings->libretro);
|
||||
lib_handle = dylib_load(settings->libretro);
|
||||
settings->path.libretro);
|
||||
lib_handle = dylib_load(settings->path.libretro);
|
||||
if (!lib_handle)
|
||||
{
|
||||
RARCH_ERR("Failed to open libretro core: \"%s\"\n",
|
||||
settings->libretro);
|
||||
settings->path.libretro);
|
||||
RARCH_ERR("Error(s): %s\n", dylib_error());
|
||||
retro_fail(1, "load_dynamic()");
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
const char **path = (const char**)data;
|
||||
*path = NULL;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
*path = settings->libretro;
|
||||
*path = settings->path.libretro;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -74,8 +74,8 @@ void main_exit(void *args)
|
||||
#endif
|
||||
|
||||
frontend_driver_deinit(args);
|
||||
frontend_driver_exitspawn(settings->libretro,
|
||||
sizeof(settings->libretro));
|
||||
frontend_driver_exitspawn(settings->path.libretro,
|
||||
sizeof(settings->path.libretro));
|
||||
|
||||
rarch_ctl(RARCH_CTL_DESTROY, NULL);
|
||||
|
||||
|
@ -356,7 +356,7 @@ static void init_video_filter(enum retro_pixel_format colfmt)
|
||||
|
||||
deinit_video_filter();
|
||||
|
||||
if (!*settings->video.softfilter_plugin)
|
||||
if (!*settings->path.softfilter_plugin)
|
||||
return;
|
||||
|
||||
/* Deprecated format. Gets pre-converted. */
|
||||
@ -379,7 +379,7 @@ static void init_video_filter(enum retro_pixel_format colfmt)
|
||||
height = geom->max_height;
|
||||
|
||||
video_driver_state.filter.filter = rarch_softfilter_new(
|
||||
settings->video.softfilter_plugin,
|
||||
settings->path.softfilter_plugin,
|
||||
RARCH_SOFTFILTER_THREADS_AUTO, colfmt, width, height);
|
||||
|
||||
if (!video_driver_state.filter.filter)
|
||||
|
@ -213,13 +213,13 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
return false;
|
||||
|
||||
fill_pathname_join(path,
|
||||
settings->input.autoconfig_dir,
|
||||
settings->directory.autoconfig,
|
||||
settings->input.joypad_driver,
|
||||
sizeof(path));
|
||||
list = dir_list_new(path, "cfg", false, false);
|
||||
|
||||
if (!list || !list->size)
|
||||
list = dir_list_new(settings->input.autoconfig_dir,
|
||||
list = dir_list_new(settings->directory.autoconfig,
|
||||
"cfg", false, false);
|
||||
|
||||
if(!list)
|
||||
|
@ -80,7 +80,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
}
|
||||
break;
|
||||
case DIR_LIST_SHADERS:
|
||||
dir = settings->video.shader_dir;
|
||||
dir = settings->directory.video_shader;
|
||||
#ifdef HAVE_CG
|
||||
strlcat(ext_shaders, "cg|cgp", sizeof(ext_shaders));
|
||||
#endif
|
||||
@ -97,7 +97,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
exts = "lpl";
|
||||
break;
|
||||
case DIR_LIST_DATABASES:
|
||||
dir = settings->content_database;
|
||||
dir = settings->path.content_database;
|
||||
exts = "rdb";
|
||||
break;
|
||||
case DIR_LIST_PLAIN:
|
||||
|
@ -168,7 +168,7 @@ static int deferred_push_cursor_manager_list_deferred(
|
||||
if (!config_get_string(conf, "rdb", &rdb))
|
||||
goto end;
|
||||
|
||||
fill_pathname_join(rdb_path, settings->content_database,
|
||||
fill_pathname_join(rdb_path, settings->path.content_database,
|
||||
rdb, sizeof(rdb_path));
|
||||
|
||||
strlcpy(info->path_b, info->path, sizeof(info->path_b));
|
||||
|
@ -161,9 +161,9 @@ static void menu_action_setting_disp_set_label_filter(
|
||||
strlcpy(s2, path, len2);
|
||||
strlcpy(s, menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), len);
|
||||
|
||||
if (settings && *settings->video.softfilter_plugin)
|
||||
if (settings && *settings->path.softfilter_plugin)
|
||||
fill_short_pathname_representation(s,
|
||||
settings->video.softfilter_plugin, len);
|
||||
settings->path.softfilter_plugin, len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_pipeline(
|
||||
|
@ -186,13 +186,13 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
break;
|
||||
case ACTION_OK_DL_AUDIO_DSP_PLUGIN:
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->audio.filter_dir;
|
||||
info_path = settings->directory.audio_filter;
|
||||
info_label = menu_hash_to_str(MENU_LABEL_AUDIO_DSP_PLUGIN);
|
||||
break;
|
||||
case ACTION_OK_DL_SHADER_PASS:
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->video.shader_dir;
|
||||
info_path = settings->directory.video_shader;
|
||||
info_label = label;
|
||||
break;
|
||||
case ACTION_OK_DL_SHADER_PARAMETERS:
|
||||
@ -218,7 +218,7 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
case ACTION_OK_DL_SHADER_PRESET:
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->video.shader_dir;
|
||||
info_path = settings->directory.video_shader;
|
||||
info_label = label;
|
||||
break;
|
||||
case ACTION_OK_DL_DOWNLOADS_DIR:
|
||||
@ -260,7 +260,7 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
case ACTION_OK_DL_CHEAT_FILE:
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->cheat_database;
|
||||
info_path = settings->path.cheat_database;
|
||||
info_label = label;
|
||||
break;
|
||||
case ACTION_OK_DL_CORE_LIST:
|
||||
@ -340,7 +340,8 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
info_label = menu_label;
|
||||
break;
|
||||
case ACTION_OK_DL_DATABASE_MANAGER_LIST:
|
||||
fill_pathname_join(tmp, settings->content_database,
|
||||
fill_pathname_join(tmp,
|
||||
settings->path.content_database,
|
||||
path, sizeof(tmp));
|
||||
|
||||
info.directory_ptr = idx;
|
||||
@ -747,8 +748,8 @@ static int generic_action_ok(const char *path,
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
strlcpy(settings->menu.wallpaper,
|
||||
action_path, sizeof(settings->menu.wallpaper));
|
||||
strlcpy(settings->path.menu_wallpaper,
|
||||
action_path, sizeof(settings->path.menu_wallpaper));
|
||||
rarch_task_push_image_load(action_path, "cb_menu_wallpaper",
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
@ -1326,16 +1327,16 @@ static void cb_generic_download(void *task_data,
|
||||
dir_path = settings->directory.assets;
|
||||
break;
|
||||
case CB_UPDATE_AUTOCONFIG_PROFILES:
|
||||
dir_path = settings->input.autoconfig_dir;
|
||||
dir_path = settings->directory.autoconfig;
|
||||
break;
|
||||
case CB_UPDATE_DATABASES:
|
||||
dir_path = settings->content_database;
|
||||
dir_path = settings->path.content_database;
|
||||
break;
|
||||
case CB_UPDATE_OVERLAYS:
|
||||
dir_path = settings->directory.overlay;
|
||||
break;
|
||||
case CB_UPDATE_CHEATS:
|
||||
dir_path = settings->cheat_database;
|
||||
dir_path = settings->path.cheat_database;
|
||||
break;
|
||||
case CB_UPDATE_SHADERS_CG:
|
||||
case CB_UPDATE_SHADERS_GLSL:
|
||||
@ -1343,7 +1344,9 @@ static void cb_generic_download(void *task_data,
|
||||
const char *dirname = transf->type_hash == CB_UPDATE_SHADERS_CG ?
|
||||
"shaders_cg" : "shaders_glsl";
|
||||
|
||||
fill_pathname_join(shaderdir, settings->video.shader_dir, dirname,
|
||||
fill_pathname_join(shaderdir,
|
||||
settings->directory.video_shader,
|
||||
dirname,
|
||||
sizeof(shaderdir));
|
||||
if (!path_file_exists(shaderdir))
|
||||
if (!path_mkdir(shaderdir))
|
||||
|
@ -61,7 +61,7 @@ static int action_start_video_filter_file_load(unsigned type, const char *label)
|
||||
if (!settings)
|
||||
return -1;
|
||||
|
||||
settings->video.softfilter_plugin[0] = '\0';
|
||||
settings->path.softfilter_plugin[0] = '\0';
|
||||
event_cmd_ctl(EVENT_CMD_REINIT, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1255,7 +1255,7 @@ static void mui_context_reset(void *data)
|
||||
menu_display_allocate_white_texture();
|
||||
mui_context_reset_textures(mui, iconpath);
|
||||
|
||||
rarch_task_push_image_load(settings->menu.wallpaper, "cb_menu_wallpaper",
|
||||
rarch_task_push_image_load(settings->path.menu_wallpaper, "cb_menu_wallpaper",
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
|
||||
|
@ -373,8 +373,8 @@ static void xmb_fill_default_background_path(xmb_handle_t *xmb,
|
||||
|
||||
fill_pathname_join(path, iconpath, "bg.png", size);
|
||||
|
||||
if (*settings->menu.wallpaper)
|
||||
strlcpy(path, settings->menu.wallpaper, size);
|
||||
if (*settings->path.menu_wallpaper)
|
||||
strlcpy(path, settings->path.menu_wallpaper, size);
|
||||
}
|
||||
|
||||
static size_t xmb_list_get_selection(void *data)
|
||||
@ -2692,8 +2692,8 @@ static void xmb_context_reset_background(const char *iconpath)
|
||||
|
||||
fill_pathname_join(path, iconpath, "bg.png", sizeof(path));
|
||||
|
||||
if (*settings->menu.wallpaper)
|
||||
strlcpy(path, settings->menu.wallpaper, sizeof(path));
|
||||
if (*settings->path.menu_wallpaper)
|
||||
strlcpy(path, settings->path.menu_wallpaper, sizeof(path));
|
||||
|
||||
if (path_file_exists(path))
|
||||
rarch_task_push_image_load(path, "cb_menu_wallpaper",
|
||||
|
@ -1029,8 +1029,8 @@ static void *zarch_init(void **userdata)
|
||||
zui->header_height = 1000; /* dpi / 3; */
|
||||
zui->font_size = 28;
|
||||
|
||||
if (!string_is_empty(settings->menu.wallpaper))
|
||||
rarch_task_push_image_load(settings->menu.wallpaper,
|
||||
if (!string_is_empty(settings->path.menu_wallpaper))
|
||||
rarch_task_push_image_load(settings->path.menu_wallpaper,
|
||||
"cb_menu_wallpaper",
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
|
||||
@ -1115,7 +1115,7 @@ static void zarch_context_reset(void *data)
|
||||
|
||||
zarch_context_bg_destroy(zui);
|
||||
|
||||
rarch_task_push_image_load(settings->menu.wallpaper,
|
||||
rarch_task_push_image_load(settings->path.menu_wallpaper,
|
||||
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload, NULL);
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
|
@ -69,8 +69,8 @@ static void menu_content_environment_get(int *argc, char *argv[],
|
||||
if (*fullpath)
|
||||
wrap_args->content_path = fullpath;
|
||||
if (!global->has_set.libretro)
|
||||
wrap_args->libretro_path = *settings->libretro
|
||||
? settings->libretro : NULL;
|
||||
wrap_args->libretro_path = *settings->path.libretro
|
||||
? settings->path.libretro : NULL;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2274,7 +2274,7 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||
{
|
||||
char db_path[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
fill_pathname_join(db_path, settings->content_database,
|
||||
fill_pathname_join(db_path, settings->path.content_database,
|
||||
db_name, sizeof(db_path));
|
||||
path_remove_extension(db_path);
|
||||
strlcat(db_path, ".rdb", sizeof(db_path));
|
||||
@ -3928,7 +3928,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_DATABASES:
|
||||
info->type_default = MENU_FILE_RDB;
|
||||
strlcpy(info->exts, "rdb", sizeof(info->exts));
|
||||
strlcpy(info->path, settings->content_database, sizeof(info->path));
|
||||
strlcpy(info->path, settings->path.content_database, sizeof(info->path));
|
||||
break;
|
||||
case DISPLAYLIST_ARCHIVE_ACTION:
|
||||
#ifdef HAVE_COMPRESSION
|
||||
|
@ -3513,8 +3513,8 @@ static bool setting_append_list(
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
(*list)[list_info->index - 1].size = sizeof(settings->libretro);
|
||||
(*list)[list_info->index - 1].value.target.string = settings->libretro;
|
||||
(*list)[list_info->index - 1].size = sizeof(settings->path.libretro);
|
||||
(*list)[list_info->index - 1].value.target.string = settings->path.libretro;
|
||||
(*list)[list_info->index - 1].values = ext_name;
|
||||
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_LOAD_CORE);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION);
|
||||
@ -4748,11 +4748,11 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->video.softfilter_plugin,
|
||||
sizeof(settings->video.softfilter_plugin),
|
||||
settings->path.softfilter_plugin,
|
||||
sizeof(settings->path.softfilter_plugin),
|
||||
menu_hash_to_str(MENU_LABEL_VIDEO_FILTER),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FILTER),
|
||||
settings->video.filter_dir,
|
||||
settings->directory.video_filter,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -4972,11 +4972,11 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->audio.dsp_plugin,
|
||||
sizeof(settings->audio.dsp_plugin),
|
||||
settings->path.audio_dsp_plugin,
|
||||
sizeof(settings->path.audio_dsp_plugin),
|
||||
menu_hash_to_str(MENU_LABEL_AUDIO_DSP_PLUGIN),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_DSP_PLUGIN),
|
||||
settings->audio.filter_dir,
|
||||
settings->directory.audio_filter,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -5594,8 +5594,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->input.overlay,
|
||||
sizeof(settings->input.overlay),
|
||||
settings->path.overlay,
|
||||
sizeof(settings->path.overlay),
|
||||
menu_hash_to_str(MENU_LABEL_OVERLAY_PRESET),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_PRESET),
|
||||
settings->directory.overlay,
|
||||
@ -5646,8 +5646,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->osk.overlay,
|
||||
sizeof(settings->osk.overlay),
|
||||
settings->path.osk_overlay,
|
||||
sizeof(settings->path.osk_overlay),
|
||||
menu_hash_to_str(MENU_LABEL_KEYBOARD_OVERLAY_PRESET),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_KEYBOARD_OVERLAY_PRESET),
|
||||
global->dir.osk_overlay,
|
||||
@ -5674,8 +5674,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->menu.wallpaper,
|
||||
sizeof(settings->menu.wallpaper),
|
||||
settings->path.menu_wallpaper,
|
||||
sizeof(settings->path.menu_wallpaper),
|
||||
menu_hash_to_str(MENU_LABEL_MENU_WALLPAPER),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_MENU_WALLPAPER),
|
||||
"",
|
||||
@ -6950,8 +6950,8 @@ static bool setting_append_list(
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->content_database,
|
||||
sizeof(settings->content_database),
|
||||
settings->path.content_database,
|
||||
sizeof(settings->path.content_database),
|
||||
menu_hash_to_str(MENU_LABEL_CONTENT_DATABASE_DIRECTORY),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY),
|
||||
"",
|
||||
@ -6987,8 +6987,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->cheat_database,
|
||||
sizeof(settings->cheat_database),
|
||||
settings->path.cheat_database,
|
||||
sizeof(settings->path.cheat_database),
|
||||
menu_hash_to_str(MENU_LABEL_CHEAT_DATABASE_PATH),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_CHEAT_DATABASE_PATH),
|
||||
"",
|
||||
@ -7005,8 +7005,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->video.filter_dir,
|
||||
sizeof(settings->video.filter_dir),
|
||||
settings->directory.video_filter,
|
||||
sizeof(settings->directory.video_filter),
|
||||
menu_hash_to_str(MENU_LABEL_VIDEO_FILTER_DIR),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FILTER_DIR),
|
||||
"",
|
||||
@ -7023,8 +7023,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->audio.filter_dir,
|
||||
sizeof(settings->audio.filter_dir),
|
||||
settings->directory.audio_filter,
|
||||
sizeof(settings->directory.audio_filter),
|
||||
menu_hash_to_str(MENU_LABEL_AUDIO_FILTER_DIR),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_FILTER_DIR),
|
||||
"",
|
||||
@ -7041,8 +7041,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->video.shader_dir,
|
||||
sizeof(settings->video.shader_dir),
|
||||
settings->directory.video_shader,
|
||||
sizeof(settings->directory.video_shader),
|
||||
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_DIR),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_DIR),
|
||||
g_defaults.dir.shader,
|
||||
@ -7153,8 +7153,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->input.autoconfig_dir,
|
||||
sizeof(settings->input.autoconfig_dir),
|
||||
settings->directory.autoconfig,
|
||||
sizeof(settings->directory.autoconfig),
|
||||
menu_hash_to_str(MENU_LABEL_JOYPAD_AUTOCONFIG_DIR),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR),
|
||||
"",
|
||||
|
@ -114,8 +114,8 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||
default:
|
||||
{
|
||||
char preset_path[PATH_MAX_LENGTH];
|
||||
const char *shader_dir = *settings->video.shader_dir ?
|
||||
settings->video.shader_dir : settings->directory.system;
|
||||
const char *shader_dir = *settings->directory.video_shader ?
|
||||
settings->directory.video_shader : settings->directory.system;
|
||||
|
||||
fill_pathname_join(preset_path, shader_dir,
|
||||
"menu.glslp", sizeof(preset_path));
|
||||
@ -296,7 +296,7 @@ void menu_shader_manager_save_preset(
|
||||
global->path.config,
|
||||
sizeof(config_directory));
|
||||
|
||||
dirs[0] = settings->video.shader_dir;
|
||||
dirs[0] = settings->directory.video_shader;
|
||||
dirs[1] = settings->directory.menu_config;
|
||||
dirs[2] = config_directory;
|
||||
|
||||
|
@ -821,7 +821,7 @@ static void parse_input(int argc, char *argv[])
|
||||
case 'L':
|
||||
if (path_is_directory(optarg))
|
||||
{
|
||||
*settings->libretro = '\0';
|
||||
*settings->path.libretro = '\0';
|
||||
strlcpy(settings->directory.libretro, optarg,
|
||||
sizeof(settings->directory.libretro));
|
||||
global->has_set.libretro = true;
|
||||
@ -1503,7 +1503,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
|
||||
*settings->libretro = '\0'; /* Load core in new config. */
|
||||
*settings->path.libretro = '\0'; /* Load core in new config. */
|
||||
}
|
||||
runloop_ctl(RUNLOOP_CTL_PREPARE_DUMMY, NULL);
|
||||
break;
|
||||
|
@ -286,7 +286,7 @@ static bool shader_dir_init(rarch_dir_list_t *dir_list)
|
||||
unsigned i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!*settings->video.shader_dir)
|
||||
if (!*settings->directory.video_shader)
|
||||
return false;
|
||||
|
||||
dir_list->list = dir_list_new_special(NULL, DIR_LIST_SHADERS, NULL);
|
||||
@ -748,7 +748,10 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
const char *fullpath = (const char*)data;
|
||||
if (!fullpath)
|
||||
return false;
|
||||
strlcpy(settings->libretro, fullpath, sizeof(settings->libretro));
|
||||
strlcpy(
|
||||
settings->path.libretro,
|
||||
fullpath,
|
||||
sizeof(settings->path.libretro));
|
||||
}
|
||||
break;
|
||||
case RUNLOOP_CTL_CLEAR_CONTENT_PATH:
|
||||
|
@ -760,16 +760,16 @@ bool rarch_task_push_overlay_load_default(
|
||||
|
||||
if (osk_enable)
|
||||
{
|
||||
if (!*settings->osk.overlay)
|
||||
if (!*settings->path.osk_overlay)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!*settings->input.overlay)
|
||||
if (!*settings->path.overlay)
|
||||
return false;
|
||||
}
|
||||
|
||||
return rarch_task_push_overlay_load(
|
||||
osk_enable ? settings->osk.overlay : settings->input.overlay,
|
||||
osk_enable ? settings->path.osk_overlay : settings->path.overlay,
|
||||
cb, user_data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user