Commit ae3df819 authored by Stephen Anthony's avatar Stephen Anthony
Browse files

Use 'SDL_GetDisplayUsableBounds' if available (gives dimensions with...

Use 'SDL_GetDisplayUsableBounds' if available (gives dimensions with dock/taskbar taken into account)
- This still needs some testing on Windows/OSX, so docs aren't updated yet
- If it ends up not working, I will '#if 0' it for the 6.0 release.
parent a92cf466
......@@ -89,12 +89,12 @@ void FrameBufferSDL2::queryHardware(vector<GUI::Size>& displays,
// First get the maximum windowed desktop resolution
int maxDisplays = SDL_GetNumVideoDisplays();
#if 0 //def BSPF_MAC_OSX
#if SDL_VERSION_ATLEAST(2,0,5)
SDL_Rect r;
for(int i = 0; i < maxDisplays; ++i)
{
// Display bounds minus dock
SDL_GetDisplayUsableBounds(i, &r); // Requires SDL-2.0.5 or higher
SDL_GetDisplayUsableBounds(i, &r); // Requires SDL-2.0.5 or higher
displays.emplace_back(r.w, r.h);
}
#else
......@@ -105,7 +105,7 @@ void FrameBufferSDL2::queryHardware(vector<GUI::Size>& displays,
displays.emplace_back(display.w, display.h);
}
#endif
struct RenderName
{
string sdlName;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment