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;