upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 07:39:13 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 07:39:13 -0500
commitc68f494160c8e79c76bfa109b2e99571a5c11358 (patch)
treedd03d57136b41a752dfcf4a7a2f0befc670bfbe3 /runtime/src/main.cpp
parent0d80bc5df7c873f40965f34f185cb96913786765 (diff)
RT-INPUT-SCRIPT-NO-SDL3: serve LEONIDA_INPUT_SCRIPT without SDL3
A build without SDL3 answered GameInputCreate with no devices and E_NOTIMPL for every other slot, so the title waited at its first "press A" prompt forever: no CI artifact or offline build could get past it. With LEONIDA_INPUT_SCRIPT set, gameinput_no_sdl.cpp now serves one scripted pad (an Xbox One gamepad) driven by the script alone: device enumeration through RegisterDeviceCallback (blocking, async, dispatcher), FindDeviceFromId, and GetCurrentReading/GetNextReading/GetPreviousReading whose gamepad and UI navigation state follow the script. Readings are taken when the title asks, so no thread polls. Without the variable it behaves as before. The parser, the 300 ms timeline, the button names, the press log lines and the UI navigation mapping move from gameinput.cpp into gameinput_script.h, which both shims use; nothing in it needs SDL. gameinput.cpp checks the shared SDL button numbers against SDL_GamepadButton at compile time. gameinput_no_sdl_test --input-script (CTest gameinput_no_sdl_script) checks the scripted pad on a fake clock. Docs: runtime/README.md, docs/gameinput.md, docs/linux_proton.md, docs/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions