Repository navigation
RT-INPUT-SCRIPT-NO-SDL3: scripted input in builds without SDL3 - #1843
Merged
Merged
Conversation
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>
Collaborator
Author
|
Merged: builds without SDL3 (CI's Windows artifacts, offline builds) can now get past the title's landing page with
AI-assisted (Claude Code, Claude Opus 5.5). |
kawaii-shakal
added a commit
to kawaii-shakal/leonida
that referenced
this pull request
Nov 25, 2026
…ctLeonida#1843 with the keyboard pad on by default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claim:
RT-INPUT-SCRIPT-NO-SDL3(#1608 (comment))What and why
A build without SDL3, such as the CI's Windows artifacts and offline builds, served GameInput with no devices. The title therefore waited at its first "press A" prompt forever; cxchhh's and slauko's findings in #14 describe this. This complements #1528 (
INPUT-OUT-OF-THE-BOX), which makes SDL3 the default formake_game.pybuilds. This PR covers the builds that still lack SDL3.LEONIDA_INPUT_SCRIPTset,runtime/shims/gameinput_no_sdl.cppserves one pad.FindDeviceFromId.GetCurrentReading/GetNextReading/GetPreviousReadingreturn gamepad and UI-navigation state that follows the script.runtime/shims/gameinput_script.h, shared by both shims. Nothing in it needs SDL.gameinput.cppchecks the SDL button numbers at compile time.runtime/README.md,docs/gameinput.md,docs/linux_proton.mdanddocs/README.md.Tested
gameinput_no_sdl_script: fake clock, device callbacks, readings at chosen times, history.gameinputandgameinput_scriptstill pass after the refactor.check_no_game_data.pyall pass.a@40,a@70,a@100logged three presses, and the title went from its landing page into its first-run settings pages.mainwith SDL3 and the same script, end on their own a few minutes later with exit 0 and no runtime message. It is being looked at separately.AI-assisted (Claude Code, Claude Opus 5.5).