startup: input script holds, stick and trigger values, a process-start time base #1955
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1962"
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 R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-24T22:11:32Z.
The GameInput stand-in's
X2W_INPUT_SCRIPTplays fixed 0.3 s presses timed from the first input poll.#1859 already reads up to 4,095 characters, keeps up to 256 entries and logs ignored or malformed values.
This keeps those limits and log lines unchanged, and adds what scripted runs still lack:
<mask>@<s>+<d>holds the buttons for<d>seconds (default stays 0.3 s). Overlapping entries OR their masks.lx|ly|rx|ry|lt|rt=<value>@<s>[+<d>]sets a stick axis (-1 to 1) or trigger (0 to 1) for a duration, in thefloat units of the stand-in's gamepad state. Among active entries on one axis the later item wins; the axis
returns to 0 when the entry ends.
base=start(first item) times the script from process start;base=poll, the default, keeps the currentfirst-poll base.
(
x2w-input script item <i> rejected (<reason>): "<item>"). A creation line gives the accepted and rejectedcounts and the time base, and the first poll logs the resolved base and the first entry's time.
Every script that is valid today keeps its meaning: the check replays legacy scripts against a copy of the
former parser at every millisecond. The parser and playback are in
src/startup_stubs/input_script.h.X2W_INPUT_CLOCK_MSis a test seam that replaces the script clock.Test:
Result in dev and release: 6/6 passed, 0 skipped. #1859's
startup_gameinput_script_longandstartup_gameinput_script_entriesare unchanged.startup_gameinput_script_syntaxcovers 200 entriesdelivered, legacy equivalence, holds, overlapping masks, stick and trigger values returning to neutral, both
time bases, malformed items, 257 entries (the last reported over the limit) and a value over 4,095 characters
(ignored as a whole). Negative control, applied locally: reinstating a 32-entry cap fails the 200-entry case.
🤖 Generated with Claude Code