mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-09 12:30:41 +00:00
Cleanups
This commit is contained in:
parent
f5d0325b2f
commit
392fad75b8
25
paths.c
25
paths.c
@ -45,6 +45,8 @@
|
|||||||
static char current_savefile_dir[PATH_MAX_LENGTH] = {0};
|
static char current_savefile_dir[PATH_MAX_LENGTH] = {0};
|
||||||
static char path_libretro[PATH_MAX_LENGTH] = {0};
|
static char path_libretro[PATH_MAX_LENGTH] = {0};
|
||||||
static char path_config_file[PATH_MAX_LENGTH] = {0};
|
static char path_config_file[PATH_MAX_LENGTH] = {0};
|
||||||
|
/* Config file associated with per-core configs. */
|
||||||
|
static char path_core_options_file[PATH_MAX_LENGTH] = {0};
|
||||||
|
|
||||||
void path_set_redirect(void)
|
void path_set_redirect(void)
|
||||||
{
|
{
|
||||||
@ -456,9 +458,6 @@ bool path_is_config_empty(void)
|
|||||||
|
|
||||||
void path_set_config(const char *path)
|
void path_set_config(const char *path)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
if (!global)
|
|
||||||
return;
|
|
||||||
strlcpy(path_config_file, path, sizeof(path_config_file));
|
strlcpy(path_config_file, path, sizeof(path_config_file));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,9 +476,7 @@ void path_clear_config(void)
|
|||||||
|
|
||||||
bool path_is_core_options_empty(void)
|
bool path_is_core_options_empty(void)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
if (string_is_empty(path_core_options_file))
|
||||||
|
|
||||||
if (global && string_is_empty(global->path.core_options_path))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -487,28 +484,18 @@ bool path_is_core_options_empty(void)
|
|||||||
|
|
||||||
void path_clear_core_options(void)
|
void path_clear_core_options(void)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
*path_core_options_file = '\0';
|
||||||
if (!global)
|
|
||||||
return;
|
|
||||||
*global->path.core_options_path = '\0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void path_set_core_options(const char *path)
|
void path_set_core_options(const char *path)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
strlcpy(path_core_options_file, path, sizeof(path_core_options_file));
|
||||||
if (!global)
|
|
||||||
return;
|
|
||||||
strlcpy(global->path.core_options_path, path, sizeof(global->path.core_options_path));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *path_get_core_options(void)
|
const char *path_get_core_options(void)
|
||||||
{
|
{
|
||||||
if (!path_is_core_options_empty())
|
if (!path_is_core_options_empty())
|
||||||
{
|
return path_core_options_file;
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
if (global)
|
|
||||||
return global->path.core_options_path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -162,8 +162,6 @@ typedef struct rarch_path
|
|||||||
#ifdef HAVE_FILE_LOGGER
|
#ifdef HAVE_FILE_LOGGER
|
||||||
char default_log[PATH_MAX_LENGTH];
|
char default_log[PATH_MAX_LENGTH];
|
||||||
#endif
|
#endif
|
||||||
/* Config file associated with per-core configs. */
|
|
||||||
char core_options_path[PATH_MAX_LENGTH];
|
|
||||||
} rarch_path_t;
|
} rarch_path_t;
|
||||||
|
|
||||||
typedef struct rarch_resolution
|
typedef struct rarch_resolution
|
||||||
|
Loading…
Reference in New Issue
Block a user