Commit 4d9efcb55cf18201fe89367fc9d5d9dada00b22f

Sam Lantinga 2021-08-13T11:52:25

Fixed flag test for boolean correctness

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 426024a..bf3d75b 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -664,7 +664,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                     lParam != data->last_pointer_update) {
                     SDL_SendMouseMotion(data->window, 0, 0, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
                     if (isWin10FCUorNewer && mouse->relative_mode_warp &&
-                        (data->window->flags & SDL_WINDOW_INPUT_FOCUS)) {
+                        (data->window->flags & SDL_WINDOW_INPUT_FOCUS) != 0) {
                         /* To work around #3931, Win10 bug introduced in Fall Creators Update, where
                            SetCursorPos() (SDL_WarpMouseInWindow()) doesn't reliably generate mouse events anymore,
                            after each windows mouse event generate a fake event for the middle of the window