mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- bugfix mp: ALT + TAB is working again in full screen mode. But if you like to play multiplayer you should use windowed mode or you should never do ATL + TAB, because this pauses the game in full screen mode!
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2164 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -386,25 +386,29 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
|
||||
}
|
||||
break;
|
||||
case FALSE: // We are suspending direct draw
|
||||
//#ifdef JA2
|
||||
// // pause the JA2 Global clock
|
||||
// PauseTime( TRUE );
|
||||
// SuspendVideoManager();
|
||||
//#else
|
||||
//#ifndef UTIL
|
||||
// if(!VideoInspectorIsEnabled())
|
||||
// SuspendVideoManager();
|
||||
//#endif
|
||||
//#endif
|
||||
// // suspend movement timer, to prevent timer crash if delay becomes long
|
||||
// // * it doesn't matter whether the 3-D engine is actually running or not, or if it's even been initialized
|
||||
// // * restore is automatic, no need to do anything on reactivation
|
||||
//#if !defined( JA2 ) && !defined( UTIL )
|
||||
// MoveTimer(TIMER_SUSPEND);
|
||||
//#endif
|
||||
//
|
||||
// gfApplicationActive = FALSE;
|
||||
// fRestore = TRUE;
|
||||
|
||||
if (iScreenMode == 0)
|
||||
{
|
||||
#ifdef JA2
|
||||
// pause the JA2 Global clock
|
||||
PauseTime( TRUE );
|
||||
SuspendVideoManager();
|
||||
#else
|
||||
#ifndef UTIL
|
||||
if(!VideoInspectorIsEnabled())
|
||||
SuspendVideoManager();
|
||||
#endif
|
||||
#endif
|
||||
// suspend movement timer, to prevent timer crash if delay becomes long
|
||||
// * it doesn't matter whether the 3-D engine is actually running or not, or if it's even been initialized
|
||||
// * restore is automatic, no need to do anything on reactivation
|
||||
#if !defined( JA2 ) && !defined( UTIL )
|
||||
MoveTimer(TIMER_SUSPEND);
|
||||
#endif
|
||||
|
||||
gfApplicationActive = FALSE;
|
||||
fRestore = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -419,27 +423,32 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
|
||||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
//#if !defined( JA2 ) && !defined( UTIL )
|
||||
// if(!VideoInspectorIsEnabled())
|
||||
// RestoreVideoManager();
|
||||
// gfApplicationActive=TRUE;
|
||||
//// RestrictMouseToXYXY(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
//#else
|
||||
// RestoreCursorClipRect( );
|
||||
//#endif
|
||||
|
||||
if (iScreenMode == 0)
|
||||
{
|
||||
#if !defined( JA2 ) && !defined( UTIL )
|
||||
if(!VideoInspectorIsEnabled())
|
||||
RestoreVideoManager();
|
||||
gfApplicationActive=TRUE;
|
||||
// RestrictMouseToXYXY(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
#else
|
||||
RestoreCursorClipRect( );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
//#if !defined( JA2 ) && !defined( UTIL )
|
||||
// if(!VideoInspectorIsEnabled())
|
||||
// SuspendVideoManager();
|
||||
//
|
||||
// gfApplicationActive=FALSE;
|
||||
// FreeMouseCursor();
|
||||
//#endif
|
||||
// // Set a flag to restore surfaces once a WM_ACTIVEATEAPP is received
|
||||
// fRestore = TRUE;
|
||||
if (iScreenMode == 0)
|
||||
{
|
||||
#if !defined( JA2 ) && !defined( UTIL )
|
||||
if(!VideoInspectorIsEnabled())
|
||||
SuspendVideoManager();
|
||||
|
||||
gfApplicationActive=FALSE;
|
||||
FreeMouseCursor();
|
||||
#endif
|
||||
// Set a flag to restore surfaces once a WM_ACTIVEATEAPP is received
|
||||
fRestore = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user