SDL_windowsevents.c: remove isVistaOrNewer (not used since 8254c364ec4a)
authorOzkan Sezer <sezeroz@gmail.com>
Thu, 05 Sep 2019 20:47:20 +0300
changeset 1306138e874cfc3d5
parent 13060 7379f8ffce9d
child 13062 211e1b06ec47
SDL_windowsevents.c: remove isVistaOrNewer (not used since 8254c364ec4a)
src/video/windows/SDL_windowsevents.c
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Thu Sep 05 13:21:02 2019 +0300
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Thu Sep 05 20:47:20 2019 +0300
     1.3 @@ -259,7 +259,6 @@
     1.4      }
     1.5  }
     1.6  
     1.7 -
     1.8  static void
     1.9  WIN_CheckRawMouseButtons(ULONG rawButtons, SDL_WindowData *data)
    1.10  {
    1.11 @@ -356,7 +355,6 @@
    1.12      return !SDL_GetHintBoolean(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, SDL_FALSE);
    1.13  }
    1.14  
    1.15 -static SDL_bool isVistaOrNewer = SDL_FALSE;
    1.16  /* Win10 "Fall Creators Update" introduced the bug that SetCursorPos() (as used by SDL_WarpMouseInWindow())
    1.17     doesn't reliably generate WM_MOUSEMOVE events anymore (see #3931) which breaks relative mouse mode via warping.
    1.18     This is used to implement a workaround.. */
    1.19 @@ -480,7 +478,7 @@
    1.20                          data->focus_click_pending |= SDL_BUTTON_X2MASK;
    1.21                      }
    1.22                  }
    1.23 -                
    1.24 +
    1.25                  SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0);
    1.26                  if (SDL_GetKeyboardFocus() != data->window) {
    1.27                      SDL_SetKeyboardFocus(data->window);
    1.28 @@ -767,8 +765,9 @@
    1.29              int max_w, max_h;
    1.30              BOOL constrain_max_size;
    1.31  
    1.32 -            if (SDL_IsShapedWindow(data->window))
    1.33 +            if (SDL_IsShapedWindow(data->window)) {
    1.34                  Win32_ResizeWindowShape(data->window);
    1.35 +            }
    1.36  
    1.37              /* If this is an expected size change, allow it */
    1.38              if (data->expected_resize) {
    1.39 @@ -870,8 +869,7 @@
    1.40  
    1.41              w = rect.right - rect.left;
    1.42              h = rect.bottom - rect.top;
    1.43 -            SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, w,
    1.44 -                                h);
    1.45 +            SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, w, h);
    1.46  
    1.47              /* Forces a WM_PAINT event */
    1.48              InvalidateRect(hwnd, NULL, FALSE);
    1.49 @@ -920,8 +918,7 @@
    1.50              RECT rect;
    1.51              if (GetUpdateRect(hwnd, &rect, FALSE)) {
    1.52                  ValidateRect(hwnd, NULL);
    1.53 -                SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED,
    1.54 -                                    0, 0);
    1.55 +                SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED, 0, 0);
    1.56              }
    1.57          }
    1.58          returnCode = 0;
    1.59 @@ -1270,7 +1267,6 @@
    1.60          return SDL_SetError("Couldn't register application class");
    1.61      }
    1.62  
    1.63 -    isVistaOrNewer = WIN_IsWindowsVistaOrGreater();
    1.64      isWin10FCUorNewer = IsWin10FCUorNewer();
    1.65  
    1.66      app_registered = 1;