From dd030769768d39d50a09054ae61c10e1b8bbbf7e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 27 May 2016 05:05:27 +0200 Subject: [PATCH] Remove config_realloc --- configuration.c | 9 +-------- configuration.h | 2 +- retroarch.c | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/configuration.c b/configuration.c index 58accd78db..85d9c0a106 100644 --- a/configuration.c +++ b/configuration.c @@ -57,7 +57,7 @@ void config_free(void) configuration_settings = NULL; } -static bool config_init(void) +bool config_init(void) { configuration_settings = (settings_t*)calloc(1, sizeof(settings_t)); @@ -66,13 +66,6 @@ static bool config_init(void) return true; } -bool config_realloc(void) -{ - config_free(); - return config_init(); -} - - /** * config_get_default_audio: * diff --git a/configuration.h b/configuration.h index f651384222..80def93888 100644 --- a/configuration.h +++ b/configuration.h @@ -560,7 +560,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user); **/ bool config_save_file(const char *path); -bool config_realloc(void); +bool config_init(void); void config_free(void); diff --git a/retroarch.c b/retroarch.c index 94cf15ce74..08506077fe 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1432,11 +1432,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) driver_ctl(RARCH_DRIVER_CTL_UNINIT_ALL, NULL); break; case RARCH_CTL_PREINIT: - if (!config_realloc()) - return false; command_event(CMD_EVENT_HISTORY_DEINIT, NULL); + config_init(); + runloop_ctl(RUNLOOP_CTL_CLEAR_STATE, NULL); break; case RARCH_CTL_MAIN_DEINIT: