From 72b9fc014b44ea222039a58700333723aa30eab1 Mon Sep 17 00:00:00 2001 From: Zachary McAlpin Date: Sun, 15 Mar 2020 10:47:55 -0500 Subject: [PATCH] Call LUAh_GameQuit in I_GetEvent in if the event is SDL_Quit and if you are in a playing session Time for the ultimate testing to see if I get any undefined reference compiling errors --- src/sdl/i_video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index c2f492000..21fd29bb5 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -73,6 +73,7 @@ #include "../console.h" #include "../command.h" #include "../r_main.h" +#include "../lua_hook.h" #include "sdlmain.h" #ifdef HWRENDER #include "../hardware/hw_main.h" @@ -1059,6 +1060,10 @@ void I_GetEvent(void) M_SetupJoystickMenu(0); break; case SDL_QUIT: +#ifdef HAVE_BLUA + if (Playing()) + LUAh_GameQuit(); +#endif I_Quit(); M_QuitResponse('y'); break;