Fix -Wundef warnings due to use of unguarded SDL_HIDAPI_DISABLED

This commit is contained in:
Anonymous Maarten committed 2023-03-28 19:29:43 +02:00
1 parent 992a9537d9
commit a64b01c995
3 files changed
+7 -7

No files matched your search

+5 -5
View File
@@ -31,7 +31,7 @@
#include "SDL_hidapi_c.h" #include "SDL_hidapi_c.h"
#if !SDL_HIDAPI_DISABLED #ifndef SDL_HIDAPI_DISABLED
#if defined(__WIN32__) || defined(__WINGDK__) #if defined(__WIN32__) || defined(__WINGDK__)
#include "../core/windows/SDL_windows.h" #include "../core/windows/SDL_windows.h"
@@ -985,7 +985,7 @@ DeleteHIDDeviceWrapper(SDL_hid_device *device)
return retval; \ return retval; \
} }
#if !SDL_HIDAPI_DISABLED #ifndef SDL_HIDAPI_DISABLED
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || defined(HAVE_LIBUSB) #if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || defined(HAVE_LIBUSB)
#define COPY_IF_EXISTS(var) \ #define COPY_IF_EXISTS(var) \
@@ -1165,7 +1165,7 @@ int SDL_hid_exit(void)
} }
SDL_hidapi_refcount = 0; SDL_hidapi_refcount = 0;
#if !SDL_HIDAPI_DISABLED #ifndef SDL_HIDAPI_DISABLED
HIDAPI_ShutdownDiscovery(); HIDAPI_ShutdownDiscovery();
#endif #endif
@@ -1195,7 +1195,7 @@ Uint32 SDL_hid_device_change_count(void)
{ {
Uint32 counter = 0; Uint32 counter = 0;
#if !SDL_HIDAPI_DISABLED #ifndef SDL_HIDAPI_DISABLED
if (SDL_hidapi_refcount == 0 && SDL_hid_init() != 0) { if (SDL_hidapi_refcount == 0 && SDL_hid_init() != 0) {
return 0; return 0;
} }
@@ -1585,7 +1585,7 @@ int SDL_hid_get_indexed_string(SDL_hid_device *device, int string_index, wchar_t
void SDL_hid_ble_scan(SDL_bool active) void SDL_hid_ble_scan(SDL_bool active)
{ {
#if !SDL_HIDAPI_DISABLED && (defined(__IOS__) || __TVOS__) #if !defined(SDL_HIDAPI_DISABLED) && (defined(__IOS__) || __TVOS__)
hid_ble_scan(active); hid_ble_scan(active);
#endif #endif
} }
+1 -1
View File
@@ -49,7 +49,7 @@
#define HID_DEVICE_MANAGER_JAVA_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, HIDDeviceManager, function) #define HID_DEVICE_MANAGER_JAVA_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, HIDDeviceManager, function)
#if !SDL_HIDAPI_DISABLED #ifndef SDL_HIDAPI_DISABLED
#include "../../core/android/SDL_android.h" #include "../../core/android/SDL_android.h"
+1 -1
View File
@@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if !SDL_HIDAPI_DISABLED #ifndef SDL_HIDAPI_DISABLED
#define hid_init PLATFORM_hid_init #define hid_init PLATFORM_hid_init