mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 21:35:25 +00:00
Create RARCH_CTL_DESTROY
This commit is contained in:
parent
cad237231e
commit
8ab15e7ef8
@ -83,7 +83,7 @@ void main_exit(void *args)
|
||||
frontend_driver_exitspawn(settings->libretro,
|
||||
sizeof(settings->libretro));
|
||||
|
||||
rarch_main_free();
|
||||
rarch_ctl(RARCH_CTL_DESTROY, NULL);
|
||||
|
||||
ui_companion_driver_deinit();
|
||||
|
||||
|
26
retroarch.c
26
retroarch.c
@ -1067,18 +1067,6 @@ static bool init_state(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void rarch_main_free(void)
|
||||
{
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_DEINIT, NULL);
|
||||
event_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
event_command(EVENT_CMD_LOG_FILE_DEINIT);
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_STATE_FREE, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_GLOBAL_FREE, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
|
||||
config_free();
|
||||
}
|
||||
|
||||
/**
|
||||
* rarch_init_system_av_info:
|
||||
*
|
||||
@ -1292,6 +1280,20 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
|
||||
switch(state)
|
||||
{
|
||||
case RARCH_CTL_DESTROY:
|
||||
rarch_error_on_init = false;
|
||||
rarch_block_config_read = false;
|
||||
rarch_force_fullscreen = false;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_DEINIT, NULL);
|
||||
event_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
event_command(EVENT_CMD_LOG_FILE_DEINIT);
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_STATE_FREE, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_GLOBAL_FREE, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
|
||||
config_free();
|
||||
return true;
|
||||
case RARCH_CTL_DEINIT:
|
||||
{
|
||||
bool inited = false;
|
||||
|
@ -63,6 +63,8 @@ enum rarch_ctl_state
|
||||
|
||||
RARCH_CTL_PREINIT,
|
||||
|
||||
RARCH_CTL_DESTROY,
|
||||
|
||||
RARCH_CTL_LOAD_CONTENT,
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
@ -150,8 +152,6 @@ struct rarch_main_wrap
|
||||
bool touched;
|
||||
};
|
||||
|
||||
void rarch_main_free(void);
|
||||
|
||||
bool rarch_ctl(enum rarch_ctl_state state, void *data);
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user