Commit b559a4acccd7092d25fb7065b2969b0fe01b6ca3

Sam Lantinga 2022-03-19T10:39:22

Fixed Android crash when SDL_HIDAPI_DISABLED set to 1 The Java code needs the native functions to be implemented, even if they're not surfaced via the C API. Fixes https://github.com/libsdl-org/SDL/issues/5326

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/hidapi/android/hid.cpp b/src/hidapi/android/hid.cpp
index faed885..1f43e9e 100644
--- a/src/hidapi/android/hid.cpp
+++ b/src/hidapi/android/hid.cpp
@@ -24,8 +24,6 @@
 //
 //          This layer glues the hidapi API to Android's USB and BLE stack.
 
-#if !SDL_HIDAPI_DISABLED
-
 #include "SDL_hints.h"
 #include "../../core/android/SDL_android.h"
 
@@ -1335,5 +1333,3 @@ int hid_exit(void)
 }
 
 }
-
-#endif /* SDL_HIDAPI_DISABLED */