Fixes the focus bug of the main window minimized with clicks on Windows Taskbar.

This commit is contained in:
aquanull 2018-04-05 18:46:19 +08:00
parent 2d81852e81
commit 7f8e2dd7e8
1 changed files with 4 additions and 1 deletions

View File

@ -1443,7 +1443,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
goto proco; goto proco;
case WM_SIZE: case WM_SIZE:
if (!fullscreen && !changerecursive && !windowedfailed) if (wParam == SIZE_MINIMIZED)
nofocus = 1;
else if (!fullscreen && !changerecursive && !windowedfailed)
{ {
switch(wParam) switch(wParam)
{ {
@ -2420,6 +2422,7 @@ adelikat: Outsourced this to a remappable hotkey
DoFCEUExit(); DoFCEUExit();
break; break;
case WM_SETFOCUS: case WM_SETFOCUS:
nofocus = 0;
if (wasPausedByCheats) if (wasPausedByCheats)
{ {
EmulationPaused = 0; EmulationPaused = 0;