From ae4d14c8334607d5bf54c5be9f7bf0a1b7534715 Mon Sep 17 00:00:00 2001 From: Nikolai Sinyov Date: Wed, 8 Sep 2021 16:01:34 +0300 Subject: [PATCH] Added SDL_EventState activate for SDL_SYSWMEVENT --- src/api/system.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/system.c b/src/api/system.c index b1c07fb3..5a8d3a7e 100644 --- a/src/api/system.c +++ b/src/api/system.c @@ -99,6 +99,10 @@ static int f_poll_event(lua_State *L) { char buf[16]; int mx, my, wx, wy; SDL_Event e; +#ifdef _WIN32 + if (SDL_GetEventState(SDL_SYSWMEVENT) == SDL_DISABLE) + SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE); +#endif top: if ( !SDL_PollEvent(&e) ) {