Skip to content

Commit

Permalink
SDL3: use synchronous window operations (for now).
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Mar 26, 2024
1 parent 42e653b commit 6dc2fdb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/modules/window/sdl/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,10 @@ bool Window::setWindow(int width, int height, WindowSettings *settings)
love::android::setImmersive(fullscreen);
#endif

#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_SyncWindow(window);
#endif

return true;
}

Expand Down Expand Up @@ -804,6 +808,10 @@ bool Window::onSizeChanged(int width, int height)

void Window::updateSettings(const WindowSettings &newsettings, bool updateGraphicsViewport)
{
#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_SyncWindow(window);
#endif

Uint32 wflags = SDL_GetWindowFlags(window);

// Set the new display mode as the current display mode.
Expand Down Expand Up @@ -1147,6 +1155,10 @@ void Window::setPosition(int x, int y, int displayindex)

SDL_SetWindowPosition(window, x, y);

#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_SyncWindow(window);
#endif

settings.useposition = true;
}

Expand Down

0 comments on commit 6dc2fdb

Please sign in to comment.