How to get rid of "SDL event queue full, dropping events" messages

Hello,

I am using emscripten and sdl to get the window of our app but I am not using input provided from SDL, instead I use the javascript events on the canvas I have.
Maybe this context is irrelevant but whenever the queue of events is full I have this message popping all the time so my question is: is there some way to have an instance without input or someway to avoid the queue to get full ?

Thank you!

Can you just do this, once per iteration of your mainloop…

SDL_Event e; while (SDL_PollEvent(&e)) {}

…this will just drain SDL’s event queue, otherwise ignoring it.

Thank you that worked perfectly!

1 Like