From b30aa330aa7479782932df9c3f95a50e6e84037f Mon Sep 17 00:00:00 2001 From: "David G. F" Date: Thu, 28 Dec 2023 20:10:22 +0100 Subject: [PATCH] Fix quit on close in CLI mode (#16054) This should fix #16048 It seems that launched_from_cli is overwritten right after the core unload, which makes RA think it was *not* CLI launched. --- menu/cbs/menu_cbs_ok.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d5858a3c81..52978d093b 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -5539,6 +5539,9 @@ int action_ok_close_content(const char *path, const char *label, unsigned type, * menu list) */ menu_st->selection_ptr = 0; + /* Check if we need to quit */ + check_quit_on_close(); + /* Unload core */ ret = generic_action_ok_command(CMD_EVENT_UNLOAD_CORE); @@ -5572,8 +5575,6 @@ int action_ok_close_content(const char *path, const char *label, unsigned type, menu_st->flags &= ~MENU_ST_FLAG_PREVENT_POPULATE; } - check_quit_on_close(); - return ret; }