[Added] Aspect ratio handling

Moderator: GZDoom Developers

Aspect ratio handling

Postby dpJudas » Mon Sep 12, 2016 9:18 am

Pull request: https://github.com/rheit/zdoom/pull/798

This PR adds new functions for dealing with aspect ratio as floats instead of the enum returned by CheckRatio and replaces the BaseRatioSizes table with calculated sizes for any ratio. This allows the software renderer to use any aspect ratio.

Last, but not least, the windowed mode automatically uses the aspect ratio of the window. As illustrated by this 3544x1360 (2.6 ratio) window:
Image
dpJudas
 
 
 
Joined: 28 May 2016

Re: Aspect ratio handling

Postby Graf Zahl » Mon Sep 12, 2016 11:26 am

This PR uses 'abs' with floating point values in the SBARINFO code. Does this work? Or would it be better to use 'fabs' here?


I remember having seen bug reports about this. If I understand this correctly, 'abs' for floats in the global namespace may not exist for all platforms. I believe only 'fabs' and 'std::abs' do.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Aspect ratio handling

Postby dpJudas » Mon Sep 12, 2016 11:45 am

Ah yes, that might be. When I saw intellisense indicate it was a template I thought it was one of zdoom's own. Committed the change to fabs instead.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Aspect ratio handling

Postby Graf Zahl » Mon Sep 12, 2016 1:39 pm

Added, although I only superficially reviewed it. This needs to get some exposure to find problems that might lurk in here somewhere.
Please note that this cannot be merged with GZDoom unless a companion PR is ready.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: MSN [Bot] and 1 guest