mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-14 07:43:14 +00:00
Allow the application to draw while Windows is in a modal move/resize loop
If you're using the application main callbacks, your SDL_AppIterate() function will be called while Windows is moving and resizing your window. If not, then SDL will send an SDL_EVENT_WINDOW_EXPOSED event for your window and you can use an event watcher to redraw your window directly from the callback. Fixes https://github.com/libsdl-org/SDL/issues/1059 Closes https://github.com/libsdl-org/SDL/pull/4836
This commit is contained in:
@@ -45,7 +45,7 @@ int SDL_EnterAppMainCallbacks(int argc, char* argv[], SDL_AppInit_func appinit,
|
||||
|
||||
Uint64 next_iteration = callback_rate_increment ? (SDL_GetTicksNS() + callback_rate_increment) : 0;
|
||||
|
||||
while ((rc = SDL_IterateMainCallbacks()) == 0) {
|
||||
while ((rc = SDL_IterateMainCallbacks(SDL_TRUE)) == 0) {
|
||||
// !!! FIXME: this can be made more complicated if we decide to
|
||||
// !!! FIXME: optionally hand off callback responsibility to the
|
||||
// !!! FIXME: video subsystem (for example, if Wayland has a
|
||||
|
||||
Reference in New Issue
Block a user