mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-31 14:04:21 +00:00
Add settings->overlay_directory
This commit is contained in:
parent
50468a72ee
commit
cdf597aa89
@ -786,12 +786,12 @@ static void config_set_defaults(void)
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (*g_defaults.dir.overlay)
|
||||
{
|
||||
fill_pathname_expand_special(global->dir.overlay,
|
||||
g_defaults.dir.overlay, sizeof(global->dir.overlay));
|
||||
fill_pathname_expand_special(settings->overlay_directory,
|
||||
g_defaults.dir.overlay, sizeof(settings->overlay_directory));
|
||||
#ifdef RARCH_MOBILE
|
||||
if (!*settings->input.overlay)
|
||||
fill_pathname_join(settings->input.overlay,
|
||||
global->dir.overlay,
|
||||
settings->overlay_directory,
|
||||
"gamepads/retropad/retropad.cfg",
|
||||
sizeof(settings->input.overlay));
|
||||
#endif
|
||||
@ -811,7 +811,7 @@ static void config_set_defaults(void)
|
||||
}
|
||||
else
|
||||
strlcpy(global->dir.osk_overlay,
|
||||
global->dir.overlay, sizeof(global->dir.osk_overlay));
|
||||
settings->overlay_directory, sizeof(global->dir.osk_overlay));
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
if (*g_defaults.dir.menu_config)
|
||||
@ -1575,9 +1575,9 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
sizeof(global->record.config_dir));
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
config_get_path(conf, "overlay_directory", global->dir.overlay, sizeof(global->dir.overlay));
|
||||
if (!strcmp(global->dir.overlay, "default"))
|
||||
*global->dir.overlay = '\0';
|
||||
config_get_path(conf, "overlay_directory", settings->overlay_directory, sizeof(settings->overlay_directory));
|
||||
if (!strcmp(settings->overlay_directory, "default"))
|
||||
*settings->overlay_directory = '\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");
|
||||
@ -2658,7 +2658,7 @@ bool config_save_file(const char *path)
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
config_set_path(conf, "overlay_directory",
|
||||
*global->dir.overlay ? global->dir.overlay : "default");
|
||||
*settings->overlay_directory ? settings->overlay_directory : "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);
|
||||
|
@ -300,6 +300,7 @@ typedef struct settings
|
||||
char cheat_settings_path[PATH_MAX_LENGTH];
|
||||
char input_remapping_directory[PATH_MAX_LENGTH];
|
||||
|
||||
char overlay_directory[PATH_MAX_LENGTH];
|
||||
char resampler_directory[PATH_MAX_LENGTH];
|
||||
char screenshot_directory[PATH_MAX_LENGTH];
|
||||
char system_directory[PATH_MAX_LENGTH];
|
||||
|
@ -4456,7 +4456,7 @@ static bool setting_append_list_overlay_options(
|
||||
settings->input.overlay,
|
||||
menu_hash_to_str(MENU_LABEL_OVERLAY_PRESET),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_PRESET),
|
||||
global->dir.overlay,
|
||||
settings->overlay_directory,
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
parent_group,
|
||||
@ -5678,7 +5678,7 @@ static bool setting_append_list_directory_options(
|
||||
}
|
||||
#ifdef HAVE_OVERLAY
|
||||
CONFIG_DIR(
|
||||
global->dir.overlay,
|
||||
settings->overlay_directory,
|
||||
menu_hash_to_str(MENU_LABEL_OVERLAY_DIRECTORY),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_DIRECTORY),
|
||||
g_defaults.dir.overlay,
|
||||
|
@ -148,7 +148,6 @@ typedef struct global
|
||||
char savestate[PATH_MAX_LENGTH];
|
||||
char systemdir[PATH_MAX_LENGTH];
|
||||
#ifdef HAVE_OVERLAY
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
char osk_overlay[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
} dir;
|
||||
|
@ -217,8 +217,8 @@ static int cb_update_databases(void *data, size_t len)
|
||||
|
||||
static int cb_update_overlays(void *data, size_t len)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
return cb_generic_download(data, len, global->dir.overlay);
|
||||
settings_t *settings = config_get_ptr();
|
||||
return cb_generic_download(data, len, settings->overlay_directory);
|
||||
}
|
||||
|
||||
static int cb_update_cheats(void *data, size_t len)
|
||||
|
Loading…
x
Reference in New Issue
Block a user