mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Limit fullscreen resolution to options that match the monitor aspect ratio.
This commit is contained in:
parent
6fe51cd9c3
commit
a5c809a738
1 changed files with 6 additions and 0 deletions
|
|
@ -184,6 +184,12 @@ function GuiCanvas::checkCanvasRes(%this, %mode, %deviceId, %deviceMode, %startu
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (%deviceMode == $Video::ModeFullscreen)
|
||||||
|
{ // Fullscreen must match the aspect ratio of the monitor
|
||||||
|
%deviceRes = getWords(%this.getMonitorRect(%deviceId), 2);
|
||||||
|
if (mRoundColour(%resX / %resY, 2) != mRoundColour(%deviceRes.x / %deviceRes.y, 2))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!%startup)
|
if (!%startup)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue