mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
commit
6a418d4d7f
1 changed files with 8 additions and 5 deletions
|
|
@ -149,7 +149,6 @@ const GFXVideoMode & Win32Window::getVideoMode()
|
||||||
void Win32Window::setVideoMode( const GFXVideoMode &mode )
|
void Win32Window::setVideoMode( const GFXVideoMode &mode )
|
||||||
{
|
{
|
||||||
bool needCurtain = (mVideoMode.fullScreen != mode.fullScreen);
|
bool needCurtain = (mVideoMode.fullScreen != mode.fullScreen);
|
||||||
static bool first_load = true;
|
|
||||||
|
|
||||||
if(needCurtain)
|
if(needCurtain)
|
||||||
{
|
{
|
||||||
|
|
@ -219,12 +218,16 @@ void Win32Window::setVideoMode( const GFXVideoMode &mode )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!first_load)
|
DISPLAY_DEVICE dd = GetPrimaryDevice();
|
||||||
ChangeDisplaySettings(NULL, 0);
|
DEVMODE dv;
|
||||||
|
ZeroMemory(&dv, sizeof(dv));
|
||||||
|
dv.dmSize = sizeof(DEVMODE);
|
||||||
|
EnumDisplaySettings(dd.DeviceName, ENUM_CURRENT_SETTINGS, &dv);
|
||||||
|
|
||||||
first_load = false;
|
if ((mode.resolution.x != dv.dmPelsWidth) || (mode.resolution.y != dv.dmPelsHeight))
|
||||||
|
ChangeDisplaySettings(NULL, 0);
|
||||||
|
|
||||||
// Reset device *first*, so that when we call setSize() and let it
|
// Reset device *first*, so that when we call setSize() and let it
|
||||||
// access the monitor settings, it won't end up with our fullscreen
|
// access the monitor settings, it won't end up with our fullscreen
|
||||||
// geometry that is just about to change.
|
// geometry that is just about to change.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue