diff --git a/video/win32_v.c b/video/win32_v.c index 1b2f96e696..2c1702778c 100644 --- a/video/win32_v.c +++ b/video/win32_v.c @@ -619,11 +619,12 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP #if !defined(WINCE) case WM_ACTIVATE: { + bool active = (LOWORD(wParam) != WA_INACTIVE); + bool minimized = (HIWORD(wParam) != 0); + /* Don't do anything if we are closing openttd */ if (_exit_game) break; - bool active = (LOWORD(wParam) != WA_INACTIVE); - bool minimized = (HIWORD(wParam) != 0); if (_wnd.fullscreen) { if (active && minimized) { /* Restore the game window */