Fix compilation when SDL < 2.0.5 is used

This commit is contained in:
Alex Szpakowski
2020-11-02 18:20:58 -04:00
parent 5031cb5f56
commit 3d2614ff2e
+5
View File
@@ -506,8 +506,13 @@ bool Window::setWindow(int width, int height, WindowSettings *settings)
if (!f.fullscreen)
SDL_SetWindowSize(window, width, height);
// On linux systems 2.0.5+ might not be available...
// TODO: require at least 2.0.5?
#if SDL_VERSION_ATLEAST(2, 0, 5)
if (this->settings.resizable != f.resizable)
SDL_SetWindowResizable(window, f.resizable ? SDL_TRUE : SDL_FALSE);
#endif
if (this->settings.borderless != f.borderless)
SDL_SetWindowBordered(window, f.borderless ? SDL_FALSE : SDL_TRUE);
}