Keep polling for events until there isn't any

This commit is contained in:
Cacodemon345
2021-08-29 00:34:03 +06:00
parent 1b122ae789
commit 2256a41704

View File

@@ -990,7 +990,8 @@ int main(int argc, char** argv)
while (!is_quit)
{
static int onesec_tic = 0;
if (SDL_PollEvent(&event))
while (SDL_PollEvent(&event))
{
switch(event.type)
{
case SDL_QUIT:
@@ -1084,6 +1085,7 @@ int main(int argc, char** argv)
keyboard_input(event.key.state == SDL_PRESSED, xtkey);
}
}
}
if (mouse_capture && keyboard_ismsexit())
{
plat_mouse_capture(0);