mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +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()
|
void handle_quit_event()
|
||||||
{
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
if (menu_popup_is_active())
|
if (settings && settings->confirm_on_exit &&
|
||||||
|
menu_popup_is_active())
|
||||||
return;
|
return;
|
||||||
#endif
|
#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_DISABLE_OVERRIDES, NULL);
|
||||||
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
|
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
|
||||||
|
|
||||||
if (content_is_inited())
|
if (content_is_inited())
|
||||||
if (!task_push_content_load_default(
|
if (!task_push_content_load_default(
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
&content_info,
|
&content_info,
|
||||||
CORE_TYPE_DUMMY,
|
CORE_TYPE_DUMMY,
|
||||||
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
||||||
NULL, NULL))
|
NULL, NULL))
|
||||||
return false;
|
return false;
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
core_unload_game();
|
core_unload_game();
|
||||||
core_unload();
|
core_unload();
|
||||||
|
#else
|
||||||
|
command_event(CMD_EVENT_LOAD_CORE_DEINIT, NULL);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case CMD_EVENT_QUIT_CONFIRM:
|
case CMD_EVENT_QUIT_CONFIRM:
|
||||||
handle_quit_event();
|
handle_quit_event();
|
||||||
break;
|
break;
|
||||||
|
@ -1355,12 +1355,12 @@ static INLINE int runloop_iterate_time_to_exit(bool quit_key_pressed)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
if (!runloop_quit_confirm && menu_popup_is_active())
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (settings && settings->confirm_on_exit &&
|
if (settings && settings->confirm_on_exit &&
|
||||||
!runloop_quit_confirm)
|
!runloop_quit_confirm)
|
||||||
{
|
{
|
||||||
|
if (menu_popup_is_active())
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (content_is_inited())
|
if (content_is_inited())
|
||||||
{
|
{
|
||||||
if(menu_display_toggle_get_reason() != MENU_TOGGLE_REASON_USER)
|
if(menu_display_toggle_get_reason() != MENU_TOGGLE_REASON_USER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user