Browse Source

[dx] fix switch case var scope

Yuxiao Mao 4 months ago
parent
commit
7348238835
1 changed files with 2 additions and 0 deletions
  1. 2 0
      libs/directx/window.c

+ 2 - 0
libs/directx/window.c

@@ -397,6 +397,7 @@ static LRESULT CALLBACK WndProc( HWND wnd, UINT umsg, WPARAM wparam, LPARAM lpar
 		addState(Blur);
 		break;
 	case WM_WINDOWPOSCHANGED:
+	{
 		HWND wndFg = GetForegroundWindow();
 		if( wndFg != wnd ) {
 			disable_capture |= NotForeground;
@@ -405,6 +406,7 @@ static LRESULT CALLBACK WndProc( HWND wnd, UINT umsg, WPARAM wparam, LPARAM lpar
 		}
 		updateClipCursor(wnd);
 		break;
+	}
 	case WM_GETMINMAXINFO:
 	{
 		dx_events *buf = get_events(wnd);