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.
This commit is contained in:
David G. F 2023-12-28 20:10:22 +01:00 committed by GitHub
parent 99309a4d79
commit b30aa330aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}