diff --git a/frontend/frontend_salamander.c b/frontend/frontend_salamander.c index 7ddf61093e..7a34499e95 100644 --- a/frontend/frontend_salamander.c +++ b/frontend/frontend_salamander.c @@ -118,12 +118,9 @@ static void find_and_set_first_file(char *s, size_t len, static void salamander_init(char *s, size_t len) { /* normal executable loading path */ - bool config_file_exists = false; + bool config_exists = config_file_exists(g_defaults.path.config); - if (path_file_exists(g_defaults.path.config)) - config_file_exists = true; - - if (config_file_exists) + if (config_exists) { char tmp_str[PATH_MAX_LENGTH]; config_file_t * conf = (config_file_t*)config_file_new(g_defaults.path.config); @@ -141,12 +138,12 @@ static void salamander_init(char *s, size_t len) * the file is there when it doesn't. */ else { - config_file_exists = false; + config_exists = false; } #endif } - if (!config_file_exists || string_is_equal(s, "")) + if (!config_exists || string_is_equal(s, "")) { char executable_name[PATH_MAX_LENGTH]; @@ -157,7 +154,7 @@ static void salamander_init(char *s, size_t len) else RARCH_LOG("Start [%s] found in retroarch.cfg.\n", s); - if (!config_file_exists) + if (!config_exists) { config_file_t *conf = (config_file_t*)config_file_new(NULL); diff --git a/runloop.c b/runloop.c index 75a0e57c8a..c9e43f8568 100644 --- a/runloop.c +++ b/runloop.c @@ -507,18 +507,14 @@ static void runloop_check_shader_dir( static bool rarch_game_specific_options(char **output) { char game_path[PATH_MAX_LENGTH] = {0}; - config_file_t *option_file = NULL; if (!retroarch_validate_game_options(game_path, sizeof(game_path), false)) return false; - option_file = config_file_new(game_path); - if (!option_file) + if (!config_file_exists(game_path)) return false; - config_file_free(option_file); - RARCH_LOG("%s %s\n", msg_hash_to_str(MSG_GAME_SPECIFIC_CORE_OPTIONS_FOUND_AT), game_path);