Added SDL_EventState activate for SDL_SYSWMEVENT

This commit is contained in:
Nikolai Sinyov 2021-09-08 16:01:34 +03:00
parent 42aeaf682b
commit ae4d14c833
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,10 @@ static int f_poll_event(lua_State *L) {
char buf[16]; char buf[16];
int mx, my, wx, wy; int mx, my, wx, wy;
SDL_Event e; SDL_Event e;
#ifdef _WIN32
if (SDL_GetEventState(SDL_SYSWMEVENT) == SDL_DISABLE)
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
#endif
top: top:
if ( !SDL_PollEvent(&e) ) { if ( !SDL_PollEvent(&e) ) {