Inconsistency between render and sound playback upon dragging a window
Hello there, I noticed something odd about how window dragging was handled. You see, when you drag a window (at least in Windows), the graphics render stops, but not the sound playback as it's played in background threads. Is there a way to fix this? (this can happen in any project containing both GFX and sounds, even if I personally use Pygame which wraps around this library)
This is not trivially fixable. What's happening is related to this issue: https://github.com/libsdl-org/SDL/issues/1059
Are you using delta-time calculations in your project? It will tell you how long things took when the window was dragged, at least (which can inform where graphics should be to stay in sync with audio, or vice versa).
This is not trivially fixable. What's happening is related to this issue: #1059
True, except I actually mean to freeze the game whenever the window is dragged, rather than let it run anyway
We don't stop all threads while the window is being dragged. You can use SDL_SetWindowsMessageHook() to set a function to detect when this is happening if you'd like to pause your threads yourself.