mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
clean-up System/BIOS in content dir, should now just use the basename instead of actually overwriting the setting
This commit is contained in:
parent
9aff87f4b4
commit
4b234a4ed9
@ -547,10 +547,6 @@ static void event_deinit_core(bool reinit)
|
||||
if(settings->sort_savestates_enable)
|
||||
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
|
||||
|
||||
/* restore system directory if it was set to <content dir> */
|
||||
if(settings->system_in_content_dir && !strcmp(info->info.library_name,"No Core"))
|
||||
settings->system_directory[0] = '\0';
|
||||
|
||||
/* auto overrides: reload the original config */
|
||||
if(global->overrides_active)
|
||||
{
|
||||
|
@ -1712,17 +1712,14 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
if (!config_get_path(conf, "system_directory",
|
||||
settings->system_directory, sizeof(settings->system_directory)))
|
||||
{
|
||||
RARCH_WARN("system_directory is not set in config. Assuming system directory is same folder as game: \"%s\".\n",
|
||||
settings->system_directory);
|
||||
settings->system_in_content_dir = true;
|
||||
RARCH_WARN("SYSTEM DIR is empty, fill assume CONTENT DIR\n");
|
||||
*settings->system_directory = '\0';
|
||||
}
|
||||
|
||||
if (!strcmp(settings->system_directory, "default"))
|
||||
{
|
||||
RARCH_WARN("system_directory is not set in config. Assuming system directory is same folder as game: \"%s\".\n",
|
||||
settings->system_directory);
|
||||
RARCH_WARN("SYSTEM DIR is empty, fill assume CONTENT DIR\n");
|
||||
*settings->system_directory = '\0';
|
||||
settings->system_in_content_dir = true;
|
||||
}
|
||||
|
||||
config_read_keybinds_conf(conf);
|
||||
|
@ -303,7 +303,6 @@ typedef struct settings
|
||||
char resampler_directory[PATH_MAX_LENGTH];
|
||||
char screenshot_directory[PATH_MAX_LENGTH];
|
||||
char system_directory[PATH_MAX_LENGTH];
|
||||
bool system_in_content_dir;
|
||||
|
||||
char extraction_directory[PATH_MAX_LENGTH];
|
||||
char playlist_directory[PATH_MAX_LENGTH];
|
||||
|
@ -652,6 +652,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||
char buf[PATH_MAX_LENGTH];
|
||||
|
||||
if (ignore_environment_cb)
|
||||
return false;
|
||||
@ -754,11 +755,12 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
if (!settings->system_directory || settings->system_directory[0] == '\0')
|
||||
{
|
||||
RARCH_WARN("SYSTEM DIR is empty, fill assume CONTENT DIR %s\n",global->fullpath);
|
||||
fill_pathname_basedir(settings->system_directory, global->fullpath,
|
||||
sizeof(settings->system_directory));
|
||||
fill_pathname_basedir(buf, global->fullpath,
|
||||
sizeof(buf));
|
||||
|
||||
}
|
||||
*(const char**)data = *settings->system_directory ?
|
||||
settings->system_directory : NULL;
|
||||
settings->system_directory : buf;
|
||||
|
||||
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n",
|
||||
settings->system_directory);
|
||||
|
@ -48,10 +48,6 @@ void main_exit_save_config(void)
|
||||
if (settings->sort_savestates_enable && orig_savestate_dir[0] != '\0')
|
||||
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
|
||||
|
||||
/* restore system directory if it was set to <content dir> */
|
||||
if(settings->system_in_content_dir && !strcmp(info->info.library_name,"No Core"))
|
||||
settings->system_directory[0] = '\0';
|
||||
|
||||
/* Save last core-specific config to the default config location,
|
||||
* needed on consoles for core switching and reusing last good
|
||||
* config for new cores.
|
||||
|
18
retroarch.c
18
retroarch.c
@ -316,11 +316,10 @@ static void set_special_paths(char **argv, unsigned num_content)
|
||||
if (!settings->system_directory || settings->system_directory[0] == '\0')
|
||||
{
|
||||
RARCH_WARN("SYSTEM DIR is empty, assume CONTENT DIR %s\n",argv[0]);
|
||||
fill_pathname_basedir(settings->system_directory, argv[0],
|
||||
sizeof(settings->system_directory));
|
||||
/*fill_pathname_basedir(settings->system_directory, argv[0],
|
||||
sizeof(settings->system_directory));*/
|
||||
}
|
||||
else
|
||||
settings->system_in_content_dir = false;
|
||||
|
||||
}
|
||||
|
||||
void set_paths_redirect(const char *path)
|
||||
@ -428,17 +427,6 @@ void rarch_set_paths(const char *path)
|
||||
".cht", sizeof(global->cheatfile_name));
|
||||
|
||||
set_paths_redirect(path);
|
||||
|
||||
/* If this is already set, do not overwrite it
|
||||
* as this was initialized before in a menu or otherwise. */
|
||||
if (!settings->system_directory || settings->system_directory[0] == '\0')
|
||||
{
|
||||
RARCH_WARN("SYSTEM DIR is empty, assume CONTENT DIR %s\n",path);
|
||||
fill_pathname_basedir(settings->system_directory, path,
|
||||
sizeof(settings->system_directory));
|
||||
}
|
||||
else
|
||||
settings->system_in_content_dir = false;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user