diff --git a/driver.c b/driver.c index 757c816864..7eb5f3710e 100644 --- a/driver.c +++ b/driver.c @@ -36,20 +36,6 @@ #include "config.h" #endif -void driver_free(void) -{ - video_driver_ctl(RARCH_DISPLAY_CTL_DESTROY, NULL); - audio_driver_ctl(RARCH_AUDIO_CTL_DESTROY, NULL); - input_driver_ctl(RARCH_INPUT_CTL_DESTROY, NULL); - retro_uninit_libretro_cbs(); -} - -void driver_clear_state(void) -{ - driver_free(); -} - - #define HASH_LOCATION_DRIVER 0x09189689U #define HASH_CAMERA_DRIVER 0xf25db959U #define HASH_MENU_DRIVER 0xd607fb05U @@ -59,6 +45,14 @@ void driver_clear_state(void) #define HASH_AUDIO_DRIVER 0x26594002U #define HASH_AUDIO_RESAMPLER_DRIVER 0xedcba9ecU #define HASH_RECORD_DRIVER 0x144cd2cfU + +void driver_free(void) +{ + video_driver_ctl(RARCH_DISPLAY_CTL_DESTROY, NULL); + audio_driver_ctl(RARCH_AUDIO_CTL_DESTROY, NULL); + input_driver_ctl(RARCH_INPUT_CTL_DESTROY, NULL); + retro_uninit_libretro_cbs(); +} /** * find_driver_nonempty: * @label : string of driver type to be found. diff --git a/driver.h b/driver.h index e7ca2830e9..cb1d918b38 100644 --- a/driver.h +++ b/driver.h @@ -289,8 +289,6 @@ int find_driver_index(const char * label, const char *drv); void driver_free(void); -void driver_clear_state(void); - #ifdef __cplusplus } #endif diff --git a/runloop.c b/runloop.c index c510b558b7..06fc7a1838 100644 --- a/runloop.c +++ b/runloop.c @@ -707,7 +707,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) } break; case RUNLOOP_CTL_CLEAR_STATE: - driver_clear_state(); + driver_free(); runloop_ctl(RUNLOOP_CTL_STATE_FREE, NULL); runloop_ctl(RUNLOOP_CTL_GLOBAL_FREE, NULL); break;