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
This commit is contained in:
Zachary McAlpin 2020-03-15 10:47:55 -05:00
parent 2052ee1144
commit 569034d3a9
1 changed files with 5 additions and 0 deletions

View File

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