Option to change aspect ratio of menu background images
Moderator: GZDoom Developers
Option to change aspect ratio of menu background images
Despite 16:9 aspect ratio monitors dominating current market share, why does GZDOOM still force 4:3 menu images on the start screen/intermissions, etc?
Even when the game aspect ratio is forced to 16:9 in the video settings this still remains.
Even if you manually insert a 16:9 image into a WAD GZDOOM still scales it down to 4:3.
Why not give the option to the user to set it how they want?
Seems rather ridiculous/outdated and I'm not the only one looking for this feature after searching to find a solution to the problem.
Even when the game aspect ratio is forced to 16:9 in the video settings this still remains.
Even if you manually insert a 16:9 image into a WAD GZDOOM still scales it down to 4:3.
Why not give the option to the user to set it how they want?
Seems rather ridiculous/outdated and I'm not the only one looking for this feature after searching to find a solution to the problem.
Re: Option to change aspect ratio of menu background images
I'm betting the reason this hasn't been done already might be because there's some really old code holding it back.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Option to change aspect ratio of menu background images
More like some really old assumptions about it is supposed to behave.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Option to change aspect ratio of menu background images
Now what are these assumptions you're talking about? How much of this is hardcoded to 4:3?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Option to change aspect ratio of menu background images
The assumption is that every image being passed to the fullscreen drawer is 4:3 and needs to be fit into a 4:3 area. And this assumption is extremely old, it was one of those early sloppy things that has been haunting ZDoom for 20 years.
The fact that the original screen size was 320x200 stretched to 4:3 doesn't make this any easier because there's images in 640x400 that are 4:3 and also images in 640x480 that are 4:3 and who knows what else.
The fact that the original screen size was 320x200 stretched to 4:3 doesn't make this any easier because there's images in 640x400 that are 4:3 and also images in 640x480 that are 4:3 and who knows what else.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Option to change aspect ratio of menu background images
Oh this is the worst...
Edit: I'm thinking I could add some gameinfo setting to make titlepic/interpic/etc. draw scaled to fit or fill.
Edit 2: So far my initial work is having some desirable results. A gameinfo setting named pageScale is introduced with 4 options: "vanilla", "stretch", "fit" and "fill". Vanilla is obviously the default and it has the old behaviour. Currently it's all done for the title screen, although I have to do some polishing and put most of its bulk into a separate function so it can also be called from intermissions without duplicating code.
Edit: I'm thinking I could add some gameinfo setting to make titlepic/interpic/etc. draw scaled to fit or fill.
Edit 2: So far my initial work is having some desirable results. A gameinfo setting named pageScale is introduced with 4 options: "vanilla", "stretch", "fit" and "fill". Vanilla is obviously the default and it has the old behaviour. Currently it's all done for the title screen, although I have to do some polishing and put most of its bulk into a separate function so it can also be called from intermissions without duplicating code.
Re: Option to change aspect ratio of menu background images
Care to post images of what stretch, fit and fill look like?Marisa Kirisame wrote:Oh this is the worst...
Edit: I'm thinking I could add some gameinfo setting to make titlepic/interpic/etc. draw scaled to fit or fill.
Edit 2: So far my initial work is having some desirable results. A gameinfo setting named pageScale is introduced with 4 options: "vanilla", "stretch", "fit" and "fill". Vanilla is obviously the default and it has the old behaviour. Currently it's all done for the title screen, although I have to do some polishing and put most of its bulk into a separate function so it can also be called from intermissions without duplicating code.
Re: Option to change aspect ratio of menu background images
Fit shrinks the image, without distortion, until it entirely fits inside the window, creating black bars.
Stretch takes the image, no matter its aspect ratio, and makes it fill every corner of the screen, causing distortion, but you can still see every corner of it.
Fill just enlarges the image until it fills the screen, causing you to lose the corners, but does not distort the image.
Stretch takes the image, no matter its aspect ratio, and makes it fill every corner of the screen, causing distortion, but you can still see every corner of it.
Fill just enlarges the image until it fills the screen, causing you to lose the corners, but does not distort the image.
Last edited by Rachael on Wed Jul 10, 2019 12:23 pm, edited 1 time in total.
Reason: clarified
Reason: clarified
Re: Option to change aspect ratio of menu background images
Ohhh, I'm looking forward to see what will come of this.
I assume that it will cope with 5:4 and other weird ratios too? (In fact, my own set up is 16:10 which, IMO, is a much better ratio than the far more common 16:9.)
I assume that it will cope with 5:4 and other weird ratios too? (In fact, my own set up is 16:10 which, IMO, is a much better ratio than the far more common 16:9.)
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Option to change aspect ratio of menu background images
Looks good, very good.
So, just to make sure that I understand the terms "fill" and "fit"...
Fit takes the largest dimension of the image and fits that to the screen (I assume width or height), adding black bars, if necessary, to the other dimension.
Fill makes the image fill the screen by adjusting proportionally it until the dimension that would have black bars with "fit" matches the screen size and if the other dimension is now bigger than the screen dimensions, the extra bits just "fall off" the screen and are unseen. Is that correct?
So, just to make sure that I understand the terms "fill" and "fit"...
Fit takes the largest dimension of the image and fits that to the screen (I assume width or height), adding black bars, if necessary, to the other dimension.
Fill makes the image fill the screen by adjusting proportionally it until the dimension that would have black bars with "fit" matches the screen size and if the other dimension is now bigger than the screen dimensions, the extra bits just "fall off" the screen and are unseen. Is that correct?
Re: Option to change aspect ratio of menu background images
Enjay wrote:Looks good, very good.
So, just to make sure that I understand the terms "fill" and "fit"...
Fit takes the largest dimension of the image and fits that to the screen (I assume width or height), adding black bars, if necessary, to the other dimension.
Fill makes the image fill the screen by adjusting proportionally it until the dimension that would have black bars with "fit" matches the screen size and if the other dimension is now bigger than the screen dimensions, the extra bits just "fall off" the screen and are unseen. Is that correct?
Very nice. Yeah, this is long overdue.
What happens when a 4:3 user loads a mod that has a widescreen image? Do the extra pixels at the side get cut off (so the image is basically centered)?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Option to change aspect ratio of menu background images
No, they'll get black bars at the top and bottom.
Re: Option to change aspect ratio of menu background images
Sounds good enough to me! That's how it works too in other software, as I recall seeing in the past.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Option to change aspect ratio of menu background images
Yes, that's exactly it.