SDL_hidapi.c: change 'use_libusb_whitelist_default' into a macro.
Avoids 'initializer element is not constant' error from older compilers.
This commit is contained in:
@@ -902,9 +902,9 @@ IsInWhitelist(Uint16 vendor, Uint16 product)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND
|
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND
|
||||||
static const SDL_bool use_libusb_whitelist_default = SDL_TRUE;
|
#define use_libusb_whitelist_default SDL_TRUE
|
||||||
#else
|
#else
|
||||||
static const SDL_bool use_libusb_whitelist_default = SDL_FALSE;
|
#define use_libusb_whitelist_default SDL_FALSE
|
||||||
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND */
|
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND */
|
||||||
static SDL_bool use_libusb_whitelist = use_libusb_whitelist_default;
|
static SDL_bool use_libusb_whitelist = use_libusb_whitelist_default;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user