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!

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

Postby Rachael » Tue Jun 26, 2018 1:29 am



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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Graf Zahl » Tue Jun 26, 2018 1:44 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Rachael » Tue Jun 26, 2018 1:52 am

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
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Rachael » Sun Mar 22, 2020 5:16 am

Only took 21 months. This is finally fixed.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Graf Zahl » Sun Mar 22, 2020 5:23 am

That doesn't look like a fix. (4/3) is always 1!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Rachael » Sun Mar 22, 2020 5:29 am

You're right. _mental_ pointed that out to me. I reverted the "fix".
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest