Make HOOK_ON_EXIT also call on lobby exit

This commit is contained in:
Agent X 2024-04-09 18:11:52 -04:00
parent b8c42f308f
commit afb2a09db5
2 changed files with 3 additions and 4 deletions

View file

@ -621,6 +621,8 @@ void network_update(void) {
} }
void network_shutdown(bool sendLeaving, bool exiting, bool popup, bool reconnecting) { void network_shutdown(bool sendLeaving, bool exiting, bool popup, bool reconnecting) {
smlua_call_event_hooks(HOOK_ON_EXIT);
if (gDjuiChatBox != NULL) { if (gDjuiChatBox != NULL) {
djui_base_destroy(&gDjuiChatBox->base); djui_base_destroy(&gDjuiChatBox->base);
gDjuiChatBox = NULL; gDjuiChatBox = NULL;

View file

@ -284,10 +284,7 @@ void audio_shutdown(void) {
} }
void game_deinit(void) { void game_deinit(void) {
if (gGameInited) { if (gGameInited) { configfile_save(configfile_name()); }
smlua_call_event_hooks(HOOK_ON_EXIT);
configfile_save(configfile_name());
}
controller_shutdown(); controller_shutdown();
audio_custom_shutdown(); audio_custom_shutdown();
audio_shutdown(); audio_shutdown();