mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-23 17:22:39 +00:00
Query the natively compiled-in subsystems at runtime so the Java side only registers and initializes the managers that exist, fixing UnsatisfiedLinkError when SDL is built with a subsystem disabled (e.g. -DSDL_AUDIO_DISABLED). - Add SDL.setupJNI(int subsystems) plus SDL_INIT_* Java constants; SDLActivity passes an overridable getInitSubsystems() mask so custom activities can skip Java-side setup for unused subsystems. - Distinguish compiled from requested subsystems: JNI registration follows nativeGetCompiledSubsystems(), while manager initialization and surface/layout creation follow the requested-and-compiled mask. - Gate HIDDeviceManager.acquire() (USB/BLE device scanning) on a new nativeIsHIDAPIEnabled() query so HIDAPI-less builds never touch it. - Gate SDLControllerManager.initializeDeviceListener() and the joystick key-event path on the controller subsystem; gate the clipboard handler on video, mirroring the native guards. - Guard the SDLControllerManager JNI bindings with SDL_ANDROID_NEED_CONTROLLER_MANAGER (joystick or haptic enabled). - Skip layout updates in ShowTextInputTask when no layout exists (video disabled). - Reorganize SDL_android.h/.c into guarded per-subsystem groups with matching ordering.