Skip to content

Commit

Permalink
Fix OpenGL Win32 window ignoring "hidden" parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mixrigster authored and darksylinc committed Jul 27, 2024
1 parent 68a8cc7 commit aa6117b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions RenderSystems/GL3Plus/src/windowing/win32/OgreWin32Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ namespace Ogre
int left = -1; // Defaults to screen center
int top = -1; // Defaults to screen center
HWND parentHwnd = 0;
bool hidden = false;
String border;
bool outerSize = false;
mHwGamma = false;
Expand Down Expand Up @@ -171,7 +170,7 @@ namespace Ogre
mVSync = StringConverter::parseBool( opt->second );
opt = miscParams->find( "hidden" );
if( opt != end )
hidden = StringConverter::parseBool( opt->second );
mHidden = StringConverter::parseBool( opt->second );
opt = miscParams->find( "vsyncInterval" );
if( opt != end )
mVSyncInterval = StringConverter::parseUnsignedInt( opt->second );
Expand Down Expand Up @@ -320,8 +319,8 @@ namespace Ogre
strcpy( mDeviceName, monitorInfoEx.szDevice );

// Update window style flags.
mFullscreenWinStyle = ( hidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN | WS_POPUP;
mWindowedWinStyle = ( hidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN;
mFullscreenWinStyle = ( mHidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN | WS_POPUP;
mWindowedWinStyle = ( mHidden ? 0 : WS_VISIBLE ) | WS_CLIPCHILDREN;

if( parentHwnd )
{
Expand Down Expand Up @@ -679,8 +678,6 @@ namespace Ogre
mTexture->_transitionTo( GpuResidency::Resident, (uint8 *)0 );
if( mDepthBuffer )
mDepthBuffer->_transitionTo( GpuResidency::Resident, (uint8 *)0 );

setHidden( mHidden );
}
//-----------------------------------------------------------------------------------
void Win32Window::destroy()
Expand Down

0 comments on commit aa6117b

Please sign in to comment.