Ver Fonte

Limit fullscreen resolution to options that match the monitor aspect ratio.

OTHGMars há 4 anos atrás
pai
commit
a5c809a738

+ 6 - 0
Templates/BaseGame/game/core/gui/scripts/canvas.tscript

@@ -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;