mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +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;
|
||||
}
|
||||
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)
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue