Skip to content

Commit

Permalink
Attempt to rectify Ubuntu fullscreen issue introduced in 19d1a00
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Aug 3, 2024
1 parent 7e87fc1 commit d1abbf5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rts/Rendering/GlobalRendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,11 +1174,12 @@ void CGlobalRendering::SetWindowAttributes(SDL_Window* window)
SDL_RestoreWindow(window);
SDL_SetWindowMinimumSize(window, minRes.x, minRes.y);

SDL_SetWindowPosition(window, winPosX, winPosY);
SDL_SetWindowSize(window, newRes.x, newRes.y);

if (SDL_SetWindowFullscreen(window, (borderless ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN) * fullScreen) != 0)
LOG("[GR::%s][4][SDL_SetWindowFullscreen] err=\"%s\"", __func__, SDL_GetError());

SDL_SetWindowPosition(window, winPosX, winPosY);
SDL_SetWindowSize(window, newRes.x, newRes.y);
SDL_SetWindowBordered(window, borderless ? SDL_FALSE : SDL_TRUE);

if (newRes == maxRes)
Expand Down

0 comments on commit d1abbf5

Please sign in to comment.