Commit ed5a343d25fd12c199a1e0479e65d93cd60ccf3d

Pierre Wendling 2023-03-27T11:51:19

SDL_hidapi_steam.c: Fix compilation under c2x. When N2935 is implemented, the enum breaks compilation. Use a #define of the SDL booleans instead. (cherry picked from commit 975039ce0d3587c42e11f2922240957fc8f74166)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/joystick/hidapi/SDL_hidapi_steam.c b/src/joystick/hidapi/SDL_hidapi_steam.c
index bb27edf..046c0ce 100644
--- a/src/joystick/hidapi/SDL_hidapi_steam.c
+++ b/src/joystick/hidapi/SDL_hidapi_steam.c
@@ -35,11 +35,9 @@
 
 #include <stdint.h>
 
-typedef enum
-{
-    false,
-    true
-} bool;
+#define bool SDL_bool
+#define true SDL_TRUE
+#define false SDL_FALSE
 
 typedef uint32_t uint32;
 typedef uint64_t uint64;