Bug 3475 - Aspect ratio menu entry
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: PC Linux
: P3 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2007-12-16 04:36 EST by Jay Weisskopf
Modified: 2009-10-08 18:40:23 EDT
1 user (show)

See Also:


Attachments
Aspect ratio menu item patch (7.95 KB, patch)
2007-12-16 04:41 EST, Jay Weisskopf

Description Jay Weisskopf 2007-12-16 04:36:16 EST
Now that all detected, possible resolutions are presented to the user as a choice, the resolution list has grown quite a bit larger (I have 20+ options). To aid in selection, I think it would be beneficial to include a menu item for easier selection of ratio groupings. I think it is worth pointing out that this option is becoming a common addition to video menus in newer games (Source, UT3, so forth) due to the increasing number of oddly-shaped monitors.
Comment 1 Jay Weisskopf 2007-12-16 04:41:03 EST
Created attachment 1621 [details]
Aspect ratio menu item patch

This patch:
1) Adds a menu item for aspect ratio.
2) Converts existing instances of strcmp() to Q_stricmp().
3) Renames "Video Modes" to "Resolutions" (which is more intuitive and common).

I am willing to make adjustments if requested (discarding that 3rd part, for example)

I hope that the code is straight forward, but in a nutshell, here's what it does:
1) A list of possible aspect ratios is built by parsing the resolution list.
2) Each aspect ratio has a corresponding resolution index (the smallest resolution for that aspect ratio, due to how the resolution sorting was already setup). When the aspect ratio menu item is changed, the resolution menu item will change to the beginning of that aspect ratio grouping.
3) Each resolution has a corresponding ratio index. When the resolution menu item is changed by the user, the aspect ratio menu item will update accordingly.
4) By default, aspect ratios will be presented in the form "X.YYY:1", but common ratios can be specified in a string array so they are renamed and look a bit more friendly. For instance, "1.333:1" becomes "4:3".
Comment 2 Thilo Schulz 2009-10-08 18:40:23 EDT
Cool patch. Thank you!