mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:00:52 +01:00
[PR #2152] gameinput: say so when LEONIDA_INPUT_SCRIPT has no keyboard pad to drive (INPUT-SCRIPT-PAD-OFF-NOTE) #2156
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2156
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2152
Author: @quartz-heron-58
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:input-script-pad-note📝 Commits (1)
90f1ba7gameinput: say so when LEONIDA_INPUT_SCRIPT has no keyboard pad to drive (INPUT-SCRIPT-PAD-OFF-NOTE)📊 Changes
4 files changed (+39 additions, -1 deletions)
View changed files
📝
docs/gameinput.md(+1 -1)📝
runtime/shims/gameinput.cpp(+7 -0)📝
runtime/shims/gameinput_script.h(+14 -0)📝
runtime/test/gameinput_test.cpp(+17 -0)📄 Description
Claimed in the coordination issue as: INPUT-SCRIPT-PAD-OFF-NOTE (#1608)
What and why
In a build with SDL3,
LEONIDA_INPUT_SCRIPTdrives the keyboard pad, and the pad's update is also where the script is read. WithLEONIDA_KEYBOARD_PADunset or off the script was never parsed and nothing was logged: an unattended boot sat at the title's first prompt with no hint why. docs/gameinput.md says the pad "has to be enabled", but the run itself was silent. I lost several unattended boots to this before reading that line.This adds one log line at configuration time, printed once a process, when a script is set and the keyboard pad is off:
runtime/shims/gameinput_script.h:pad_off_note(script_text, keyboard_pad_on), a pure helper that returns the text or null. It does not parse the script, so a script whose entries would all be rejected is reported too, and it is outside the parser that #2144 changes.runtime/shims/gameinput.cpp:read_configprints it once.runtime/test/gameinput_test.cpp: six cases for the helper.docs/gameinput.md: one sentence in theLEONIDA_INPUT_SCRIPTrow.No behaviour change: the pad is not switched on for the user, and a build without SDL3 is untouched (its scripted pad needs no keyboard pad).
Tested
Windows 11 (26300), MSVC Build Tools 2022, RelWithDebInfo via
scripts\build_runtime.ps1 -FetchSdl3on main33bd07cf8plus this commit: build exit 0.ctest -R gameinput: 3 of 3 pass (gameinput_host, gameinput, gameinput_script).gameinput_test.exerun directly: 370 checks, 0 failures, the six newpad-off notelines among them.gameinput_probe --seconds 3withLEONIDA_INPUT_SCRIPT=a@1,a@2:LEONIDA_KEYBOARD_PADunset: the line above once, no press lines;LEONIDA_KEYBOARD_PAD=always: no such line, twopress a@lines;scripts/check_no_game_data.pyon the four changed files: clean.Not run: the whole ctest set, a build without SDL3 (the helper is an unused inline there), Linux/Wine.
GPUs tested: n/a (no GPU code; the machine has an RTX 4080, NVIDIA 621.24)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.