I’m asking this because I saw someone say on another forum that it wasn’t good but I personally don’t see how to handle window closing with ‘SDL_PumpEvents’.
I don’t know the context of that post in the other forum, but if it said that using SDL_PollEvent() is bad, that’s nonsense.
Using SDL_PollEvent() to handle events (including SDL_QUIT, but also keyboard, mouse or joystick input and window events like size changed) is the standard way to handle input in SDL.
forgive my absence I had some problems, I may have expressed myself badly, what was said in this other forum is that the use of SDL_PollEvent + SDL_PumpEvents (the two together) was “bad” but I understand why thanks to @sjr’s answer.