mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-12 18:45:33 -10:00
The frontend passes a core's sensor calls for a sub-device (RETRO_SENSOR_SUBDEVICE) on to the drivers with the index kept. It remembers which sub-device sensors the core enabled, as it does the controller's own, so one not enabled, or whose enable no driver took, reads 0 without asking a driver. The controller's own sensors are handled as before, and sensitivity and orientation apply to both; the profile's axis remap stays the controller's. The SDL2 (2.26 and up) and SDL3 joypad drivers answer sub-device 1 from SDL's _L sensors: a Wii Remote's Nunchuk accelerometer, the left Joy-Con of a pair. SDL3 restores it on a reconnect as it does the others. Every other driver already refuses an index it does not know. samples/input/sensor_subdevice runs the wrappers as they ship.