From 392fad75b8de4e09ed05f3e53d3c003e26629ff6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 17 Sep 2016 13:57:38 +0200 Subject: [PATCH] Cleanups --- paths.c | 25 ++++++------------------- runloop.h | 2 -- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/paths.c b/paths.c index 9d3f30306e..761f2f4e7c 100644 --- a/paths.c +++ b/paths.c @@ -45,6 +45,8 @@ static char current_savefile_dir[PATH_MAX_LENGTH] = {0}; static char path_libretro[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) { @@ -456,9 +458,6 @@ bool path_is_config_empty(void) 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)); } @@ -477,9 +476,7 @@ void path_clear_config(void) bool path_is_core_options_empty(void) { - global_t *global = global_get_ptr(); - - if (global && string_is_empty(global->path.core_options_path)) + if (string_is_empty(path_core_options_file)) return true; return false; @@ -487,28 +484,18 @@ bool path_is_core_options_empty(void) void path_clear_core_options(void) { - global_t *global = global_get_ptr(); - if (!global) - return; - *global->path.core_options_path = '\0'; + *path_core_options_file = '\0'; } void path_set_core_options(const char *path) { - global_t *global = global_get_ptr(); - if (!global) - return; - strlcpy(global->path.core_options_path, path, sizeof(global->path.core_options_path)); + strlcpy(path_core_options_file, path, sizeof(path_core_options_file)); } const char *path_get_core_options(void) { if (!path_is_core_options_empty()) - { - global_t *global = global_get_ptr(); - if (global) - return global->path.core_options_path; - } + return path_core_options_file; return NULL; } diff --git a/runloop.h b/runloop.h index 29c273dc50..a8a9aa87f3 100644 --- a/runloop.h +++ b/runloop.h @@ -162,8 +162,6 @@ typedef struct rarch_path #ifdef HAVE_FILE_LOGGER char default_log[PATH_MAX_LENGTH]; #endif - /* Config file associated with per-core configs. */ - char core_options_path[PATH_MAX_LENGTH]; } rarch_path_t; typedef struct rarch_resolution