mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-04 14:35:10 +00:00
deal with old sdl that doesn't have SDL_GetDisplayUsableBounds(0, &initialWindowBounds);
This commit is contained in:
@ -41,7 +41,12 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// default window size to usable bounds (e.g. minus menubar and dock)
|
||||
SDL_Rect initialWindowBounds;
|
||||
#ifdef SDL_GetDisplayUsableBounds
|
||||
// new and better
|
||||
SDL_GetDisplayUsableBounds(0, &initialWindowBounds);
|
||||
#else
|
||||
SDL_GetDisplayBounds(0, &initialWindowBounds);
|
||||
#endif
|
||||
int width = initialWindowBounds.w;
|
||||
int height = initialWindowBounds.h;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user