mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
query_pad() answered from the buttons held, so a connected pad at rest read as absent: keyboard-to-port assignment counted its port as having no controller and the port notification left out its name. It now answers from the pad's connection: - PS2: the last read succeeded, or the pad is changing mode. - PS3: the pad is connected, bounded by the pads the driver tracks (it was bounded by MAX_USERS and read past the array for ports 7-15). - PS4: the last report came from a connected pad. - Switch (libnx): padIsConnected(). The ps2_joypad, ps3_joypad, ps4_joypad and switch_joypad lanes check a pad at rest is there, and gone once disconnected or not reporting.