From df2b4978e89b940d588fe8a85bbac64f168b94fb Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sun, 8 Apr 2018 14:10:04 -0700 Subject: [PATCH] bleh --- src/projectM-sdl/projectM_SDL_main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/projectM-sdl/projectM_SDL_main.cpp b/src/projectM-sdl/projectM_SDL_main.cpp index 7467df438..1ba9e8641 100644 --- a/src/projectM-sdl/projectM_SDL_main.cpp +++ b/src/projectM-sdl/projectM_SDL_main.cpp @@ -21,7 +21,12 @@ int main(int argc, char *argv[]) { // default window size to usable bounds (e.g. minus menubar and dock) SDL_Rect initialWindowBounds; +#if SDL_VERSION_ATLEAST(2, 0, 5) + // new and better SDL_GetDisplayUsableBounds(0, &initialWindowBounds); +#else + SDL_GetDisplayBounds(0, &initialWindowBounds); +#endif int width = initialWindowBounds.w; int height = initialWindowBounds.h; float heightWidthRatio = (float)height / (float)width;