Add g_defaults.core_assets_dir

This commit is contained in:
twinaphex 2015-07-04 04:47:14 +02:00
parent 18ee147d19
commit 362d8025d8
6 changed files with 13 additions and 0 deletions

View File

@ -740,6 +740,9 @@ static void config_set_defaults(void)
if (*g_defaults.assets_dir)
strlcpy(settings->assets_directory,
g_defaults.assets_dir, sizeof(settings->assets_directory));
if (*g_defaults.core_assets_dir)
strlcpy(settings->core_assets_directory,
g_defaults.core_assets_dir, sizeof(settings->core_assets_directory));
if (*g_defaults.playlist_dir)
strlcpy(settings->playlist_directory,
g_defaults.playlist_dir, sizeof(settings->playlist_directory));

View File

@ -627,6 +627,8 @@ static void frontend_android_get_environment_settings(int *argc,
path, "remaps", sizeof(g_defaults.remap_dir));
fill_pathname_join(g_defaults.wallpapers_dir,
path, "wallpapers", sizeof(g_defaults.wallpapers_dir));
fill_pathname_join(g_defaults.core_assets_dir,
path, "core_assets", sizeof(g_defaults.wallpapers_dir));
}
}
}

View File

@ -59,6 +59,8 @@ static void frontend_ctr_get_environment_settings(int *argc, char *argv[],
fill_pathname_basedir(g_defaults.port_dir, elf_path_cst, sizeof(g_defaults.port_dir));
RARCH_LOG("port dir: [%s]\n", g_defaults.port_dir);
fill_pathname_join(g_defaults.core_assets_dir, g_defaults.port_dir,
"core_assets", sizeof(g_defaults.core_assets_dir));
fill_pathname_join(g_defaults.assets_dir, g_defaults.port_dir,
"media", sizeof(g_defaults.assets_dir));
fill_pathname_join(g_defaults.core_dir, g_defaults.port_dir,

View File

@ -337,6 +337,7 @@ static void frontend_darwin_get_environment_settings(int *argc, char *argv[],
fill_pathname_join(g_defaults.core_info_dir, home_dir_buf, "info", sizeof(g_defaults.core_info_dir));
fill_pathname_join(g_defaults.overlay_dir, home_dir_buf, "overlays", sizeof(g_defaults.overlay_dir));
fill_pathname_join(g_defaults.autoconfig_dir, home_dir_buf, "autoconfig/hid", sizeof(g_defaults.autoconfig_dir));
fill_pathname_join(g_defaults.core_assets_dir, home_dir_buf, "core_assets", sizeof(g_defaults.core_assets_dir));
fill_pathname_join(g_defaults.assets_dir, home_dir_buf, "assets", sizeof(g_defaults.assets_dir));
fill_pathname_join(g_defaults.system_dir, home_dir_buf, ".RetroArch", sizeof(g_defaults.system_dir));
strlcpy(g_defaults.menu_config_dir, g_defaults.system_dir, sizeof(g_defaults.menu_config_dir));

View File

@ -124,6 +124,10 @@ void main_exit(void *args)
static void check_defaults_dirs(void)
{
if (*g_defaults.core_assets_dir)
path_mkdir(g_defaults.core_assets_dir);
if (*g_defaults.remap_dir)
path_mkdir(g_defaults.remap_dir);
if (*g_defaults.autoconfig_dir)
path_mkdir(g_defaults.autoconfig_dir);
if (*g_defaults.audio_filter_dir)

View File

@ -71,6 +71,7 @@ enum sound_mode_enums
struct defaults
{
char core_assets_dir[PATH_MAX_LENGTH];
char menu_config_dir[PATH_MAX_LENGTH];
char config_path[PATH_MAX_LENGTH];
char core_path[PATH_MAX_LENGTH];