diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2017-09-12 11:57:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-12 11:57:49 +0200 |
| commit | cf941fdc357791a93bd9ab9eaf16898e0c218ff3 (patch) | |
| tree | 546d046bffd826359c85240ae4562ef5df734e86 /platform/windows/os_windows.cpp | |
| parent | 84ccda4e1d6f9a63b689167887f7d329cdc5dffa (diff) | |
| parent | 8230bf0a2f39f0849b670d26067207c45edcca1a (diff) | |
Merge pull request #11026 from hpvb/fix-assign-in-if
Remove assignment and declarations in if statements
Diffstat (limited to 'platform/windows/os_windows.cpp')
| -rw-r--r-- | platform/windows/os_windows.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index deb9c25576..5814d883cd 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -996,7 +996,16 @@ void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int video_mode.fullscreen = false; } else { - if (!(hWnd = CreateWindowExW(dwExStyle, L"Engine", L"", dwStyle | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, (GetSystemMetrics(SM_CXSCREEN) - WindowRect.right) / 2, (GetSystemMetrics(SM_CYSCREEN) - WindowRect.bottom) / 2, WindowRect.right - WindowRect.left, WindowRect.bottom - WindowRect.top, NULL, NULL, hInstance, NULL))) { + hWnd = CreateWindowExW( + dwExStyle, + L"Engine", L"", + dwStyle | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, + (GetSystemMetrics(SM_CXSCREEN) - WindowRect.right) / 2, + (GetSystemMetrics(SM_CYSCREEN) - WindowRect.bottom) / 2, + WindowRect.right - WindowRect.left, + WindowRect.bottom - WindowRect.top, + NULL, NULL, hInstance, NULL); + if (!hWnd) { MessageBoxW(NULL, L"Window Creation Error.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); return; // Return FALSE } |