mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 14:59:37 +00:00
Call rarch_main_data_deinit from outside
This commit is contained in:
parent
58cf81d1d8
commit
f6a791a3e0
@ -866,6 +866,7 @@ static int rarch_main_iterate_quit(void)
|
||||
if (g_extern.core_shutdown_initiated
|
||||
&& g_settings.load_dummy_on_core_shutdown)
|
||||
{
|
||||
rarch_main_data_deinit();
|
||||
if (!rarch_main_command(RARCH_CMD_PREPARE_DUMMY))
|
||||
return -1;
|
||||
|
||||
|
@ -141,6 +141,8 @@ void rarch_main_data_clear_state(void);
|
||||
|
||||
void rarch_main_data_iterate(void);
|
||||
|
||||
void rarch_main_data_deinit(void);
|
||||
|
||||
void rarch_main_data_init_queues(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -75,6 +75,7 @@ typedef struct nbio_handle
|
||||
enum
|
||||
{
|
||||
THREAD_CODE_INIT = 0,
|
||||
THREAD_CODE_DEINIT,
|
||||
THREAD_CODE_ALIVE,
|
||||
} thread_code_enum;
|
||||
|
||||
@ -772,7 +773,7 @@ static void data_runloop_thread_deinit(data_runloop_t *runloop)
|
||||
runloop->thread_inited = false;
|
||||
}
|
||||
|
||||
static void rarch_main_data_deinit(void)
|
||||
void rarch_main_data_deinit(void)
|
||||
{
|
||||
data_runloop_t *runloop = &g_data_runloop;
|
||||
|
||||
@ -781,7 +782,10 @@ static void rarch_main_data_deinit(void)
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (runloop->thread_inited)
|
||||
{
|
||||
data_runloop_thread_deinit(runloop);
|
||||
g_data_runloop.thread_code = THREAD_CODE_DEINIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
runloop->inited = false;
|
||||
@ -867,6 +871,8 @@ void rarch_main_data_iterate(void)
|
||||
case THREAD_CODE_INIT:
|
||||
rarch_main_data_thread_init();
|
||||
break;
|
||||
case THREAD_CODE_DEINIT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user