Status bar bad scaling between 16:9 and 16:10 aspect ratios

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
Rachael
Posts: 13557
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Status bar bad scaling between 16:9 and 16:10 aspect ratios

Post by Rachael »



This bug has been bothering me ever since my last monitor crapped out and I was stuck with a smaller screen.

When maximized (with titlebar and taskbar) GZDoom ends up at the resolution 1440x847 on my screen, which is between 16:9 and 16:10. In fact, the resulting resolution is almost perfectly 17:10.

Anyway, I've been trying to fix this bug for a long time now, but to no avail. I can't seem to find the code where it actually draws the status bar. I'd be willing to implement a fix - if only I knew where the code was that calculated the actual status bar drawing.

(Oddly enough, at this resolution, executing "vid_aspect 5" produces no noticable change to the game view, but oddly fixes this...)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Status bar bad scaling between 16:9 and 16:10 aspect rat

Post by Graf Zahl »

This gets done in DBaseStatusBar::RefreshBackground () and the logic is not really clear to me either. My guess is that ST_X is not set correctly in this case.
I never noticed this because I normally do not use the statusbar.
User avatar
Rachael
Posts: 13557
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Status bar bad scaling between 16:9 and 16:10 aspect rat

Post by Rachael »

ST_X is set in DBaseStatusBar::SetScale () but the value here is not used whatsoever in calculating the actual bar, itself. I hacked in some really bogus and nonsensical values and the only thing I managed to do was change how the background was drawn. The first conditional path in that function for my configuration is that st_scale is usually set to -1 on my system, so the first block gets executed.

I should note that it is the bar that is in error, not the background; setting vid_aspect to correct the issue makes the bar look correct proportionally (it gets wider). This is comparing it against running "vid_scalemode 2" (320x200) as well.
User avatar
Rachael
Posts: 13557
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Status bar bad scaling between 16:9 and 16:10 aspect rat

Post by Rachael »

Only took 21 months. This is finally fixed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Status bar bad scaling between 16:9 and 16:10 aspect rat

Post by Graf Zahl »

That doesn't look like a fix. (4/3) is always 1!
User avatar
Rachael
Posts: 13557
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Status bar bad scaling between 16:9 and 16:10 aspect rat

Post by Rachael »

You're right. _mental_ pointed that out to me. I reverted the "fix".
Post Reply

Return to “Bugs [GZDoom]”