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.
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".
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".