diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 07:39:13 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 07:39:13 -0500 |
| commit | c68f494160c8e79c76bfa109b2e99571a5c11358 (patch) | |
| tree | dd03d57136b41a752dfcf4a7a2f0befc670bfbe3 /docs/linux_proton.md | |
| parent | 0d80bc5df7c873f40965f34f185cb96913786765 (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 'docs/linux_proton.md')
| -rw-r--r-- | docs/linux_proton.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/linux_proton.md b/docs/linux_proton.md index f98aacf14..03f663eca 100644 --- a/docs/linux_proton.md +++ b/docs/linux_proton.md | |||
| @@ -53,12 +53,15 @@ the layout the comments at their top describe (`/opt/leonida` for traces, overla | |||
| 53 | `__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1`. | 53 | `__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1`. |
| 54 | - **Input:** a pad through GameInput/SDL3, or the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), or a script: | 54 | - **Input:** a pad through GameInput/SDL3, or the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), or a script: |
| 55 | `LEONIDA_INPUT_SCRIPT=a@210,a@240` presses A at those seconds (any length since this branch; it was cut at 63 | 55 | `LEONIDA_INPUT_SCRIPT=a@210,a@240` presses A at those seconds (any length since this branch; it was cut at 63 |
| 56 | characters before). | 56 | characters before). The script also works in a build without SDL3, where it drives one scripted pad |
| 57 | ([docs/gameinput.md](gameinput.md#scripted-input-without-sdl3)); pads and the keyboard pad need SDL3. | ||
| 57 | - **Window:** frames are presented in the title's own window; `LEONIDA_PRESENT_WINDOW=own|hidden` chooses otherwise. | 58 | - **Window:** frames are presented in the title's own window; `LEONIDA_PRESENT_WINDOW=own|hidden` chooses otherwise. |
| 58 | 59 | ||
| 59 | Three setup mistakes each give a blank or empty picture without an error: the executable's embedded shaders missing | 60 | Three setup mistakes each give a blank or empty picture without an error: the executable's embedded shaders missing |
| 60 | from the library (`exe/index.json`), a build without SDL3 (no pad), and a BCPack predictor file that was never | 61 | from the library (`exe/index.json`), a build without SDL3 and without `LEONIDA_INPUT_SCRIPT` (no pad, so nothing |
| 61 | generated (`tools/build_dstorage_history.py`; without it the loading art and most BC7 textures stay empty). | 62 | gets past the first prompt; set a script, or build with SDL3 for a pad or the keyboard pad), and a BCPack predictor |
| 63 | file that was never generated (`tools/build_dstorage_history.py`; without it the loading art and most BC7 textures | ||
| 64 | stay empty). | ||
| 62 | 65 | ||
| 63 | ## What a healthy boot looks like (Linux machine) | 66 | ## What a healthy boot looks like (Linux machine) |
| 64 | 67 | ||