DescriptionTilman Sauerbeck
2006-01-15 16:46:31 EST
Quake3's main menu is rendered with a horizontal offset of a few hundred pixels when it's run at 1280x1024.
I think the problem also appears when running at 1024x768, but it's not visible as much (ie, the offset is much smaller).
The problem also exists in id's official Q3 binaries.
It's rather annoying cause it prevents me from switching to the next tier in single player mode cause the button is not visible.
Created attachment 833[details]
Patch that fixes the scaling bug
Ludwig Nussel suggested that it doesn't look like an offset, but like a scaling bug. Quake3 uses 640x480 as the base resolution and just applies one scaling factor to both width and height, which doesn't work for resolutions that aren't 4:3 such as 1280x1024.
Attached patch that fixes that bug.
Created attachment 835[details]
restore correct behaviour for wide-screen modes
The applied fix introduced a new bug, i.e. the menu is rendered with a horizontal offset when using wide-screen resolutions. The attached patch fixes this by restoring the original behaviour for wide-screen modes only.
While it would be nice to keep the menu aspect ratio for resolutions with an aspect ratio less than 4:3 (e.g. 5:4 as with 1280x1024) I did not implent this, as it would require greater changes. If adapting the existing code to use a vertical offset, the aerea at the top and bottom of the window are not cleared, since they are outside the menu area.
Keeping the original behaviour where it was correct and introducing a slightly different, but definitely better one for the incorrect case is an acceptable solution.
Erik
Created attachment 837[details]
keep manu aspect ratio of 4:3 in non 4:3 resolutions
The fix for bug #2599 by Tim Angus showed me where the screen is cleared when rendering a menu in wide-screen resolutions. The attached patch extends this to any non 4:3 resolution and enables correct menu scaling for narrow screens.
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.
--ryan.
Created attachment 833 [details] Patch that fixes the scaling bug Ludwig Nussel suggested that it doesn't look like an offset, but like a scaling bug. Quake3 uses 640x480 as the base resolution and just applies one scaling factor to both width and height, which doesn't work for resolutions that aren't 4:3 such as 1280x1024. Attached patch that fixes that bug.
Created attachment 835 [details] restore correct behaviour for wide-screen modes The applied fix introduced a new bug, i.e. the menu is rendered with a horizontal offset when using wide-screen resolutions. The attached patch fixes this by restoring the original behaviour for wide-screen modes only. While it would be nice to keep the menu aspect ratio for resolutions with an aspect ratio less than 4:3 (e.g. 5:4 as with 1280x1024) I did not implent this, as it would require greater changes. If adapting the existing code to use a vertical offset, the aerea at the top and bottom of the window are not cleared, since they are outside the menu area. Keeping the original behaviour where it was correct and introducing a slightly different, but definitely better one for the incorrect case is an acceptable solution. Erik