From 9539a4a0555a3ae24d64cd2af9e5130d2dd7d00f Mon Sep 17 00:00:00 2001 From: OTHGMars Date: Fri, 14 May 2021 17:30:23 -0400 Subject: [PATCH] Adds comment explaining window position change in GuiCanvas. --- Engine/source/gui/core/guiCanvas.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Engine/source/gui/core/guiCanvas.cpp b/Engine/source/gui/core/guiCanvas.cpp index abbf10561..7cbea6d64 100644 --- a/Engine/source/gui/core/guiCanvas.cpp +++ b/Engine/source/gui/core/guiCanvas.cpp @@ -1762,6 +1762,8 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */) mode.antialiasLevel = 0; Point2I winPos = mPlatformWindow->getPosition(); // Save position so we can put window back. mPlatformWindow->setVideoMode(mode); + // setVideoMode (above) will center the window on the display device. If the window had been positioned + // by the user or from script, put it back where it was before the light manager change. mPlatformWindow->setPosition(winPos); Con::printf( "AntiAliasing has been disabled; it is not compatible with AdvancedLighting." ); @@ -1776,6 +1778,8 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */) mode.parseFromString( pref ); Point2I winPos = mPlatformWindow->getPosition(); // Save position so we can put window back. mPlatformWindow->setVideoMode(mode); + // setVideoMode (above) will center the window on the display device. If the window had been positioned + // by the user or from script, put it back where it was before the light manager change. mPlatformWindow->setPosition(winPos); Con::printf( "AntiAliasing has been enabled while running BasicLighting." );