mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +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)
|
||||
{
|
||||
ChangeDisplaySettings(&ddraw->render.mode, CDS_FULLSCREEN);
|
||||
|
||||
D3dpp.Windowed = FALSE;
|
||||
InterlockedExchange(&ddraw->resetDirect3D9, TRUE);
|
||||
|
||||
if (wParam == WA_ACTIVE)
|
||||
@ -632,6 +634,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ShowWindow(ddraw->hWnd, SW_MINIMIZE);
|
||||
ChangeDisplaySettings(&ddraw->mode, 0);
|
||||
|
||||
D3dpp.Windowed = TRUE;
|
||||
InterlockedExchange(&ddraw->resetDirect3D9, TRUE);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user