mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32:45 +03:00
chore(console): improve comment clarity in ConsoleDetectGetResolutions
This commit is contained in:
parent
a8a1309af1
commit
a6317ead69
@ -7,7 +7,11 @@ void AddResolution(TSGrowableArray<C2iVector>& resolutions, const C2iVector& res
|
|||||||
|
|
||||||
// TODO sometimes 640x480 is included, sometimes its ignored -- more than one function?
|
// TODO sometimes 640x480 is included, sometimes its ignored -- more than one function?
|
||||||
void ConsoleDetectGetResolutions(TSGrowableArray<C2iVector>& resolutions, int32_t widescreen) {
|
void ConsoleDetectGetResolutions(TSGrowableArray<C2iVector>& resolutions, int32_t widescreen) {
|
||||||
// Widescreen resolutions
|
// "Widescreen" resolutions
|
||||||
|
//
|
||||||
|
// This branch is just dynamically enumerating resolutions above a minimum size and aspect
|
||||||
|
// ratio as opposed to using a fixed list of common 1.33:1 resolutions. The name widescreen
|
||||||
|
// comes from the CVar that feeds the argument (see: SetupResolutions).
|
||||||
|
|
||||||
if (widescreen) {
|
if (widescreen) {
|
||||||
TSGrowableArray<CGxMonitorMode> monitorModes;
|
TSGrowableArray<CGxMonitorMode> monitorModes;
|
||||||
@ -19,12 +23,12 @@ void ConsoleDetectGetResolutions(TSGrowableArray<C2iVector>& resolutions, int32_
|
|||||||
auto& monitorMode = monitorModes[i];
|
auto& monitorMode = monitorModes[i];
|
||||||
auto& resolution = monitorMode.size;
|
auto& resolution = monitorMode.size;
|
||||||
|
|
||||||
// "Widescreen" aspect ratio
|
// Minimum aspect ratio
|
||||||
if (static_cast<float>(resolution.x) / static_cast<float>(resolution.y) < 1.248f) {
|
if (static_cast<float>(resolution.x) / static_cast<float>(resolution.y) < 1.248f) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// At least 640x480
|
// Minimum resolution
|
||||||
if (resolution.x < 640 || resolution.y < 480) {
|
if (resolution.x < 640 || resolution.y < 480) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user