SDL_hidapi.c: change 'use_libusb_whitelist_default' into a macro.

Avoids 'initializer element is not constant' error from older compilers.
main
Ozkan Sezer 2023-08-14 17:01:24 +03:00
parent 6607a3cfac
commit f464eb2c54
1 changed files with 2 additions and 2 deletions

View File

@ -902,9 +902,9 @@ IsInWhitelist(Uint16 vendor, Uint16 product)
}
#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
static const SDL_bool use_libusb_whitelist_default = SDL_FALSE;
#define use_libusb_whitelist_default SDL_FALSE
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND */
static SDL_bool use_libusb_whitelist = use_libusb_whitelist_default;