Get the occupiable size

Hi everyone

I wish to get the “occupiable” size of the screen, which means the current resolution - the size of the taskbar (or the dock + top bar on OSX).
Is there a way to do this with SDL ?

Thanks [Wink]

You can use SDL_RenderGetLogicalSizehttp://wiki.libsdl.org/SDL_RenderGetLogicalSizeif
you don’t use
SDL_RenderSetLogicalSize
http://wiki.libsdl.org/SDL_RenderSetLogicalSize(in which case you’ll
get a scaled version).
I’m unsure if it does exactly what you need, but have you looked at
SDL_GetWindowSize http://wiki.libsdl.org/SDL_GetWindowSize?On Fri, Mar 21, 2014 at 8:19 PM, vlag <valentin.soudier at gmail.com> wrote:

Hi everyone

I wish to get the “occupiable” size of the screen, which means the current
resolution - the size of the taskbar (or the dock + top bar on OSX).
Is there a way to do this with SDL ?

Thanks [image: Wink]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

There currently isn’t a way to do this with SDL. I would be happy to add
this to the API, if someone wants to submit implementations for Windows,
Mac OS X, and X11 window managers.On Fri, Mar 21, 2014 at 11:19 AM, vlag <valentin.soudier at gmail.com> wrote:

Hi everyone

I wish to get the “occupiable” size of the screen, which means the current
resolution - the size of the taskbar (or the dock + top bar on OSX).
Is there a way to do this with SDL ?

Thanks [image: Wink]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

On Win32 this should be pretty simple: use the coordinates in the DevMode structure in a call to MonitorFromPoint or MonitorFromRect, then call GetMonitorInfo, and it is the rcWork member of that monitor.------------------------
Nate Fries

SDL?s current window size API doesn?t take into account the window?s borders. How would this suggestion interact with that?On Mar 21, 2014, at 3:19 PM, vlag <valentin.soudier at gmail.com> wrote:

Hi everyone

I wish to get the “occupiable” size of the screen, which means the current resolution - the size of the taskbar (or the dock + top bar on OSX).
Is there a way to do this with SDL ?

Thanks


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org