[skip ci] Disable WebHID HIDAPI by default

This commit is contained in:
Nintorch 2026-05-21 22:30:55 +05:00
parent 9ae773bcbc
commit 85fc76b089

View file

@ -63,8 +63,12 @@
#if defined(SDL_PLATFORM_ANDROID) || \
defined(SDL_PLATFORM_IOS) || \
defined(SDL_PLATFORM_TVOS) || \
defined(SDL_PLATFORM_VISIONOS)
// On Android, HIDAPI prompts for permissions and acquires exclusive access to the device, and on Apple mobile platforms it doesn't do anything except for handling Bluetooth Steam Controllers, so we'll leave it off by default.
defined(SDL_PLATFORM_VISIONOS) || \
defined(SDL_PLATFORM_EMSCRIPTEN)
// On Android, HIDAPI prompts for permissions and acquires exclusive access to the device,
// on Emscripten, it also prompts for permissions and it's not available in some browsers,
// and on Apple mobile platforms it doesn't do anything except for handling Bluetooth Steam Controllers,
// so we'll leave it off by default.
#define SDL_HIDAPI_DEFAULT false
#else
#define SDL_HIDAPI_DEFAULT true