Go to file
Holden Ramsey 2919e1899f Android: decouple JNI setup from unused subsystems
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.
2026-07-02 11:30:47 -07:00
2026-07-01 22:03:03 +00:00
2025-01-13 16:42:50 -08:00
2025-01-13 16:42:50 -08:00
2025-03-06 16:25:17 -08:00
2026-01-01 09:40:08 -08:00
2025-11-16 01:15:10 +03:00

Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multi-media software, such as games and emulators.

You can find the latest release and additional information at: https://www.libsdl.org/

Installation instructions and a quick introduction is available in INSTALL.md

This library is distributed under the terms of the zlib license, available in LICENSE.txt.

Enjoy!

Sam Lantinga (slouken@libsdl.org)

Description
Simple Directmedia Layer
Readme 196 MiB
Languages
C 87.9%
C++ 4%
Objective-C 3.4%
CMake 1.7%
Java 0.8%
Other 1.9%