/* * PS5 RetroArch - the console's gamepad, as RetroArch's input driver. * * Copyright (C) 2026 Mihawk * SPDX-License-Identifier: GPL-3.0-or-later * * The joypad interface owns the native pad. RetroArch polls it for binding * discovery, menu stick navigation and mapped core input. The input interface * deliberately reports no additional gamepad state: duplicating raw buttons there * would OR the old hardcoded mapping back into user-configured bindings. * * The ABI is not derivable and is not guessed. `scePadInit`, `scePadOpen`, * `scePadRead` and the 120-byte sample layout below were verified on hardware by * ../ProsperoLight, a native PS5 title whose controls work: its src/radio_input.cpp * and src/moonlight_stream.cpp carry the same calls, the same button bits and the * same offsets, including `connected` at 0x4c and the timestamp at 0x50. The static * assertions are what keeps a wrong layout from compiling quietly. * * A run without a person at the pad can script it: /app0/pad-script.txt, when * present, holds one press a line, `