D3D Fullscreen
by John Carroll · in Torque Game Engine Advanced · 03/06/2007 (11:57 am) · 1 replies
I don't know whether to count this as a bug or not, but when in fullscreen mode on a multi-monitor system, we lose the D3D device when it loses focus, when you click on your debugger for example. The following code located in winWindow.cpp will allow you to click on other apps and not lose the D3D window:
case MM_MCINOTIFY:
handleRedBookCallback(wParam, lParam);
break;
//**************** The following code was added***************************//
// JFC Fixed, this was added so we don't lose the window when it loses focus
// in fullscreen mode.
case WM_NCACTIVATE:
if(Con::getBoolVariable("$pref::Video::fullScreen", 1))
return 0;
else
break;
//******************End of added code**************************//
//case WM_DESTROY:
case WM_CLOSE:
PostQuitMessage(0);
break;
case MM_MCINOTIFY:
handleRedBookCallback(wParam, lParam);
break;
//**************** The following code was added***************************//
// JFC Fixed, this was added so we don't lose the window when it loses focus
// in fullscreen mode.
case WM_NCACTIVATE:
if(Con::getBoolVariable("$pref::Video::fullScreen", 1))
return 0;
else
break;
//******************End of added code**************************//
//case WM_DESTROY:
case WM_CLOSE:
PostQuitMessage(0);
break;
About the author
Working on using Torque as an Image Generator for Tactical Simulations under laser and live fire conditions, for Law Enforcement/Military applications.
Torque Owner Brian Ramage
Black Jacket Games