Fullscreen Aspect Ratio

Hi, I know this has been addressed before, but not satisfactorily ‘solved’.

So on my MacBook Pro 13", when my game goes into fullscreen mode 640x480, it i stretched across the full widescreen display. If I use system preferences to set the screen to 640x480 mode (non-stretched), the desktop has the the vertical black bars and the aspect ration is 4:3. Then when I boot my game up and it goes fullscreen, it once again messes up the aspect ratio, taking the full widescreen display. This indicates to me, that SDL is somewhere changing the display settings, because the desktop was already in the correct mode before SDL_SetWindowFullscreen was called. I was previously under the impression that it is a graphics driver issue.

I want to maintain aspect ratio, I want the black bars on the side, do I have to go the software route and do it myself? Or has there been any progress on this in the past few months.

Thanks for your consideration.

I’m under the impression that other software that does some sort of aspect
ratio does that through software rather than some sort of instinctive
graphics behaviour.
I’d make a list of resolutions per aspect ratio, figure out the highest
supported resolution (sound be the native resolution), use that, and scale
your images on top of that according to the aspect ratio the user selects.

Take care,
-OzOn Mon, May 23, 2011 at 6:50 AM, eclectocrat wrote:

Hi, I know this has been addressed before, but not satisfactorily
’solved’.

So on my MacBook Pro 13", when my game goes into fullscreen mode 640x480,
it i stretched across the full widescreen display. If I use system
preferences to set the screen to 640x480 mode (non-stretched), the desktop
has the the vertical black bars and the aspect ration is 4:3. Then when I
boot my game up and it goes fullscreen, it once again messes up the aspect
ratio, taking the full widescreen display. This indicates to me, that SDL is
somewhere changing the display settings, because the desktop was already in
the correct mode before SDL_SetWindowFullscreen was called. I was previously
under the impression that it is a graphics driver issue.

I want to maintain aspect ratio, I want the black bars on the side, do I
have to go the software route and do it myself? Or has there been any
progress on this in the past few months.

Thanks for your consideration.


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

I’m under the impression that other software that does some sort of
aspect ratio does that through software rather than some sort of
instinctive graphics behaviour.

There are actually two cases:

With xrandr, aspect scaling is a property of the “output” when the display hardware is scaled to a fixed output configuration such as an LCD panel connected through LVDS.? Otherwise the display aspect ratio (DAR) is determined by the display dimensions in coordination with the output resolution, this information is utilised by X toolkits to render the UX with the correct DAR possibly producing a non square pixel aspect ratio (PAR).

With this in mind, SDL doesn’t have to do anything other than maintain the xrandr output property for the LVDS case, but should have a way of specifying a fixed PAR or otherwise perhaps falling back to scaling to maintain DAR.

I’d make a list of resolutions per aspect ratio, figure out the highest
supported resolution (sound be the native resolution), use that, and
scale your images on top of that according to the aspect ratio the user
selects.

Really, the user shouldn’t have to specify in the general case, the information is intrinsic to the output device, whether the SDL application developer has to handle this themselves or whether it should be an SDL function is pertinent.----- Original message -----

Take care,
-Oz

On Mon, May 23, 2011 at 6:50 AM, eclectocrat wrote:

Hi, I know this has been addressed before, but not satisfactorily
’solved’.

So on my MacBook Pro 13", when my game goes into fullscreen mode
640x480, it i stretched across the full widescreen display. If I use
system preferences to set the screen to 640x480 mode (non-stretched),
the desktop has the the vertical black bars and the aspect ration is
4:3. Then when I boot my game up and it goes fullscreen, it once again
messes up the aspect ratio, taking the full widescreen display. This
indicates to me, that SDL is somewhere changing the display settings,
because the desktop was already in the correct mode before
SDL_SetWindowFullscreen was called. I was previously under the
impression that it is a graphics driver issue.

I want to maintain aspect ratio, I want the black bars on the side, do
I have to go the software route and do it myself? Or has there been any
progress on this in the past few months.

Thanks for your consideration.


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