Game Development Community

Switching Resolution shows desktop (when in fullscreen mode)

by Jendrik Posche · in Torque Game Engine · 03/25/2009 (6:08 am) · 2 replies

Hi all,

When I switch resolutions when in fullscreen mode, I see the desktop and be able to click it/interact with it for a couple of seconds.

How can i disbale this, by either showing a black screen or never show the desktop in the first place.

I'm using tge 1.5.2

Regards,

#1
05/11/2009 (11:01 pm)
Bump. Seems to be a window creation function called 'CreateCurtain' in the setScreenMode resolution changer in C++. However it does nothing.

I'm trying to resolve the same issue.
#2
05/12/2009 (1:08 am)
A few changes got the curtain to work correctly. This is a fix tested on windows vista only.

---------------------------------------------------------------------
1) Specify the blank color that appears when the resolution is changing:
In WinWindow.cc search for "// Curtain window class:" and update the "wc.hbrBackground = (HBRUSH) GetStockObject(GRAY_BRUSH);" to a color of your choice

2) Find the function "CreateCurtain" and update its style parameters to WS_EX_TOPMOST | WS_POPUP | WS_VISIBLE

3) Search for the lines within setScreenMode that say:

// Doesn't hurt to do this even it isn't necessary:
ShowWindow( winState.appWindow, SW_SHOW );
SetForegroundWindow( winState.appWindow );
SetFocus( winState.appWindow );

And move the curtain destroy code BELOW the above lines:
if ( curtain )
DestroyWindow( curtain );

--------------------------------------------------------------------