Browse Source

Don't use RAWINPUT joystick driver on Windows XP

Fixes https://github.com/libsdl-org/SDL/issues/6400
Sam Lantinga 2 năm trước cách đây
mục cha
commit
5025f24033
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      src/joystick/windows/SDL_rawinputjoystick.c

+ 5 - 0
src/joystick/windows/SDL_rawinputjoystick.c

@@ -855,6 +855,11 @@ RAWINPUT_JoystickInit(void)
 
     SDL_assert(!SDL_RAWINPUT_inited);
 
+    if (!WIN_IsWindowsVistaOrGreater()) {
+        /* According to bug 6400, this doesn't work on Windows XP */
+        return -1;
+    }
+
     if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_TRUE)) {
         return -1;
     }