Skip to content

Commit

Permalink
print syncwindow timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Feb 9, 2025
1 parent f5631fd commit 6ef0497
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/modules/window/sdl/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,8 @@ bool Window::setWindow(int width, int height, WindowSettings *settings)
love::android::setImmersive(fullscreen);
#endif

SDL_SyncWindow(window);
if (!SDL_SyncWindow(window))
::printf("SDL_SyncWindow timed out in setWindow\n");

return true;
}
Expand Down Expand Up @@ -715,7 +716,8 @@ bool Window::onSizeChanged(int width, int height)

void Window::updateSettings(const WindowSettings &newsettings, bool updateGraphicsViewport)
{
SDL_SyncWindow(window);
if (!SDL_SyncWindow(window))
::printf("SDL_SyncWindow timed out in updateSettings\n");

Uint32 wflags = SDL_GetWindowFlags(window);

Expand Down Expand Up @@ -973,7 +975,8 @@ void Window::setPosition(int x, int y, int displayindex)
y += displaybounds.y;

SDL_SetWindowPosition(window, x, y);
SDL_SyncWindow(window);
if (!SDL_SyncWindow(window))
::printf("SDL_SyncWindow timed out in setPosition\n");

settings.useposition = true;
}
Expand Down

0 comments on commit 6ef0497

Please sign in to comment.