mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
switch to windowed on minimize and go back to fullscreen exclusive on restore - makes alt+tab failsafe
This commit is contained in:
parent
9cbd2de62f
commit
1a6de69da4
@ -612,6 +612,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
if (!ddraw->windowed)
|
if (!ddraw->windowed)
|
||||||
{
|
{
|
||||||
ChangeDisplaySettings(&ddraw->render.mode, CDS_FULLSCREEN);
|
ChangeDisplaySettings(&ddraw->render.mode, CDS_FULLSCREEN);
|
||||||
|
|
||||||
|
D3dpp.Windowed = FALSE;
|
||||||
InterlockedExchange(&ddraw->resetDirect3D9, TRUE);
|
InterlockedExchange(&ddraw->resetDirect3D9, TRUE);
|
||||||
|
|
||||||
if (wParam == WA_ACTIVE)
|
if (wParam == WA_ACTIVE)
|
||||||
@ -632,6 +634,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
{
|
{
|
||||||
ShowWindow(ddraw->hWnd, SW_MINIMIZE);
|
ShowWindow(ddraw->hWnd, SW_MINIMIZE);
|
||||||
ChangeDisplaySettings(&ddraw->mode, 0);
|
ChangeDisplaySettings(&ddraw->mode, 0);
|
||||||
|
|
||||||
|
D3dpp.Windowed = TRUE;
|
||||||
InterlockedExchange(&ddraw->resetDirect3D9, TRUE);
|
InterlockedExchange(&ddraw->resetDirect3D9, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user