Commit b6238c87e4d91ccaa1de186c010ca333516f019d

Sam Lantinga 2020-11-11T14:48:23

Don't try to build the RAWINPUT driver if HIDAPI is disabled

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c
index 2cec877..d4db0b5 100644
--- a/src/joystick/windows/SDL_rawinputjoystick.c
+++ b/src/joystick/windows/SDL_rawinputjoystick.c
@@ -40,7 +40,7 @@
 #include "../../core/windows/SDL_windows.h"
 #include "../hidapi/SDL_hidapijoystick_c.h"
 
-#ifndef SDL_JOYSTICK_HIDAPI_XBOX360
+#if !defined(SDL_JOYSTICK_HIDAPI) || !defined(SDL_JOYSTICK_HIDAPI_XBOX360)
 #error RAWINPUT requires the XBOX360 HIDAPI driver
 #endif