mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 05:16:18 +00:00
fix core unload when closing content
This commit is contained in:
parent
86d2a36407
commit
abd5d81b70
28
command.c
28
command.c
@ -1778,8 +1778,10 @@ static void command_event_main_state(unsigned cmd)
|
||||
|
||||
void handle_quit_event()
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_MENU
|
||||
if (menu_popup_is_active())
|
||||
if (settings && settings->confirm_on_exit &&
|
||||
menu_popup_is_active())
|
||||
return;
|
||||
#endif
|
||||
|
||||
@ -1980,19 +1982,21 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
|
||||
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
|
||||
|
||||
if (content_is_inited())
|
||||
if (!task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_DUMMY,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
||||
NULL, NULL))
|
||||
return false;
|
||||
if (content_is_inited())
|
||||
if (!task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_DUMMY,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
||||
NULL, NULL))
|
||||
return false;
|
||||
#ifndef HAVE_DYNAMIC
|
||||
core_unload_game();
|
||||
core_unload();
|
||||
core_unload_game();
|
||||
core_unload();
|
||||
#else
|
||||
command_event(CMD_EVENT_LOAD_CORE_DEINIT, NULL);
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
case CMD_EVENT_QUIT_CONFIRM:
|
||||
handle_quit_event();
|
||||
break;
|
||||
|
@ -1355,12 +1355,12 @@ static INLINE int runloop_iterate_time_to_exit(bool quit_key_pressed)
|
||||
return 1;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
if (!runloop_quit_confirm && menu_popup_is_active())
|
||||
return 1;
|
||||
|
||||
if (settings && settings->confirm_on_exit &&
|
||||
!runloop_quit_confirm)
|
||||
{
|
||||
if (menu_popup_is_active())
|
||||
return 1;
|
||||
|
||||
if (content_is_inited())
|
||||
{
|
||||
if(menu_display_toggle_get_reason() != MENU_TOGGLE_REASON_USER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user