mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Maintains window position when updating video mode for LightManager compatibility.
This commit is contained in:
parent
de1e6df64b
commit
1ba7070bb6
1 changed files with 4 additions and 0 deletions
|
|
@ -1760,7 +1760,9 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
|
||||||
const char *pref = Con::getVariable( "$pref::Video::mode" );
|
const char *pref = Con::getVariable( "$pref::Video::mode" );
|
||||||
mode.parseFromString( pref );
|
mode.parseFromString( pref );
|
||||||
mode.antialiasLevel = 0;
|
mode.antialiasLevel = 0;
|
||||||
|
Point2I winPos = mPlatformWindow->getPosition(); // Save position so we can put window back.
|
||||||
mPlatformWindow->setVideoMode(mode);
|
mPlatformWindow->setVideoMode(mode);
|
||||||
|
mPlatformWindow->setPosition(winPos);
|
||||||
|
|
||||||
Con::printf( "AntiAliasing has been disabled; it is not compatible with AdvancedLighting." );
|
Con::printf( "AntiAliasing has been disabled; it is not compatible with AdvancedLighting." );
|
||||||
}
|
}
|
||||||
|
|
@ -1772,7 +1774,9 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
|
||||||
if ( prefAA != mode.antialiasLevel )
|
if ( prefAA != mode.antialiasLevel )
|
||||||
{
|
{
|
||||||
mode.parseFromString( pref );
|
mode.parseFromString( pref );
|
||||||
|
Point2I winPos = mPlatformWindow->getPosition(); // Save position so we can put window back.
|
||||||
mPlatformWindow->setVideoMode(mode);
|
mPlatformWindow->setVideoMode(mode);
|
||||||
|
mPlatformWindow->setPosition(winPos);
|
||||||
|
|
||||||
Con::printf( "AntiAliasing has been enabled while running BasicLighting." );
|
Con::printf( "AntiAliasing has been enabled while running BasicLighting." );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue