X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=e0e7985cf34909697919055a7fa76fe93ad1643b;hp=55a28fc40d0cf13ef90ec1df29c3910bb15e5661;hb=71c4b8d626b4a731a72840facb6bd548c7e33da9;hpb=9eb4ba2e639c16c6a5e72ddaeabfb455a85c66bf diff --git a/src/tools.c b/src/tools.c index 55a28fc4..e0e7985c 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3736,6 +3736,9 @@ void WaitForEventToContinue() { boolean still_wait = TRUE; + if (program.headless) + return; + /* simulate releasing mouse button over last gadget, if still pressed */ if (button_status) HandleGadgets(-1, -1, 0); @@ -3883,6 +3886,19 @@ static int RequestHandleEvents(unsigned int req_state) break; } +#if defined(TARGET_SDL2) + case SDL_WINDOWEVENT: + HandleWindowEvent((WindowEvent *) &event); + break; + + case SDL_APP_WILLENTERBACKGROUND: + case SDL_APP_DIDENTERBACKGROUND: + case SDL_APP_WILLENTERFOREGROUND: + case SDL_APP_DIDENTERFOREGROUND: + HandlePauseResumeEvent((PauseResumeEvent *) &event); + break; +#endif + case EVENT_KEYPRESS: { Key key = GetEventKey((KeyEvent *)&event, TRUE);