mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-10 16:00:46 +00:00
black screen bug fix
This commit is contained in:
parent
7a8719dfbc
commit
72c06401c0
1 changed files with 7 additions and 3 deletions
|
|
@ -138,9 +138,10 @@ const GFXVideoMode & Win32Window::getVideoMode()
|
|||
|
||||
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)
|
||||
{
|
||||
Con::errorf("Win32Window::setVideoMode - invoking curtain");
|
||||
mOwningManager->lowerCurtain();
|
||||
|
|
@ -208,7 +209,10 @@ void Win32Window::setVideoMode( const GFXVideoMode &mode )
|
|||
}
|
||||
else
|
||||
{
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
if (!first_load)
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
|
||||
first_load = false;
|
||||
|
||||
// Reset device *first*, so that when we call setSize() and let it
|
||||
// access the monitor settings, it won't end up with our fullscreen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue