Skip to content

Commit

Permalink
Fix compile errors when SDL2 is used
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Oct 6, 2024
1 parent dda7603 commit 20b527f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/modules/window/sdl/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,18 @@ bool Window::setWindow(int width, int height, WindowSettings *settings)
SDL_SetWindowSize(window, width, height);

if (this->settings.resizable != f.resizable)
#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_SetWindowResizable(window, f.resizable);
#else
SDL_SetWindowResizable(window, f.resizable ? SDL_TRUE : SDL_FALSE);
#endif

if (this->settings.borderless != f.borderless)
SDL_SetWindowBordered(window, f.borderless);
#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_SetWindowBordered(window, !f.borderless);
#else
SDL_SetWindowBordered(window, f.borderless ? SDL_FALSE : SDL_TRUE);
#endif
}
else
{
Expand Down

0 comments on commit 20b527f

Please sign in to comment.