RT-INPUT-SCRIPT-NO-SDL3: scripted input in builds without SDL3 #1843
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1843"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T12:59:26Z.
Claim:
RT-INPUT-SCRIPT-NO-SDL3(https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162247285)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).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T13:15:52Z.
Merged: builds without SDL3 (CI's Windows artifacts, offline builds) can now get past the title's landing page with
LEONIDA_INPUT_SCRIPT.FindDeviceFromId, readings that follow the script); unset, nothing changes. Controllers and the keyboard pad still need SDL3, which #1528 makes the default formake_game.pybuilds.runtime/shims/gameinput_script.h.gameinput_no_sdl_scriptCTest; the full Windows suite under Wine without SDL3 with no test going from pass to fail;gameinputandgameinput_scripton an SDL3 build; on the retail game without SDL3, three scripted presses reached the title and moved it past the landing page.main98c2f7777+c68f49416: it merges cleanly; the semantic suite passes (489 files, 6,288 tests, 0 files failed); the 14 docs and writer tests pass;check_no_game_data.pyis clean on the 10 changed files.AI-assisted (Claude Code, Claude Opus 5.5).