diff options
| author | Aslan2142 <jan.trencansky@protonmail.com> | 2026-11-26 15:41:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-26 15:41:00 +0100 |
| commit | fbf100b1b10e391625585fe6a8bf4e653662ca9a (patch) | |
| tree | 497fe3bc8ef8b45d1ac8c68fa9f85196d08f11ad /docs/gameinput.md | |
| parent | 73516a2902a9872e4d21d1bdbbde4e26059497c5 (diff) | |
| parent | 484b21262a21f9a99148b89ad2458b389faf7bd1 (diff) | |
Merge pull request #2350 from aslan2142/linux-amd-world
Self-merge by a maintainer, on purpose: current main does not get through the world on Linux/AMD, and this brings the regression fixes (the single-wave round-loop fallback of 9f98dcc61, the wave64 choice driven by llvmpipe) together with eleven PRs the world run needed. Tested on main 73516a290: translator suite 500 files / 6,365 tests, 0 failed; 513 standard-library test files pass; check_no_game_data clean on 80 files; Linux ctest 112/112; Wine suite (clang-cl + xwin, RDNA2 iGPU, RADV) with no test going from pass to fail. Not tested: native Windows, NVIDIA. The included PRs are closed in favour of this one with credit to their authors. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2).
Diffstat (limited to 'docs/gameinput.md')
| -rw-r--r-- | docs/gameinput.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/gameinput.md b/docs/gameinput.md index 1301a4a49..c18d96a05 100644 --- a/docs/gameinput.md +++ b/docs/gameinput.md | |||
| @@ -58,7 +58,8 @@ scripted pad, driven by the script alone: | |||
| 58 | controller axis and controller button state. A reading is taken when the title asks for one and the script's state | 58 | controller axis and controller button state. A reading is taken when the title asks for one and the script's state |
| 59 | has changed since the last, so no thread polls; the history keeps the last 64 readings. | 59 | has changed since the last, so no thread polls; the history keeps the last 64 readings. |
| 60 | - **The timeline:** the same as with SDL3 (`runtime/shims/gameinput_script.h` holds the parser, the timeline and the | 60 | - **The timeline:** the same as with SDL3 (`runtime/shims/gameinput_script.h` holds the parser, the timeline and the |
| 61 | log lines for both): seconds from the first `GameInputCreate`, each press held 300 ms, then released. | 61 | log lines for both): seconds from the first `GameInputCreate`, each press held 300 ms (or its own `:hold`, see |
| 62 | `LEONIDA_INPUT_SCRIPT` below), then released. | ||
| 62 | - **Not served:** reading callbacks, aggregate devices, rumble and every other device. Those slots answer `E_NOTIMPL` | 63 | - **Not served:** reading callbacks, aggregate devices, rumble and every other device. Those slots answer `E_NOTIMPL` |
| 63 | and log the slot once. Controllers and the [keyboard pad](#keyboard-pad) still need SDL3. | 64 | and log the slot once. Controllers and the [keyboard pad](#keyboard-pad) still need SDL3. |
| 64 | 65 | ||
| @@ -74,6 +75,10 @@ A press is logged when the title reads it, so a press the title never reads is n | |||
| 74 | turns the `press` lines off. Without `LEONIDA_INPUT_SCRIPT`, the shim serves no devices and answers `E_NOTIMPL` for | 75 | turns the `press` lines off. Without `LEONIDA_INPUT_SCRIPT`, the shim serves no devices and answers `E_NOTIMPL` for |
| 75 | every slot past `Release`, as before. | 76 | every slot past `Release`, as before. |
| 76 | 77 | ||
| 78 | `LEONIDA_INPUT_FILE=<path>` drives a run whose display takes no keyboard input (a headless session): every line | ||
| 79 | appended to that file names one button of the script's table (`a`, `down`, ...) and becomes a press at once, held | ||
| 80 | like a scripted one. The file is read again at most every 250 ms. It is for local runs only. | ||
| 81 | |||
| 77 | `scripts/build_runtime.ps1` (what `make_game.py` runs) builds the shim only on its CMake path, when Visual Studio's | 82 | `scripts/build_runtime.ps1` (what `make_game.py` runs) builds the shim only on its CMake path, when Visual Studio's |
| 78 | C++ CMake tools are installed. Its direct-`cl.exe` fallback compiles a fixed file list without the shim and warns | 83 | C++ CMake tools are installed. Its direct-`cl.exe` fallback compiles a fixed file list without the shim and warns |
| 79 | about it. | 84 | about it. |
| @@ -335,7 +340,7 @@ line is logged when it takes effect); tracking goes on underneath, so clearing i | |||
| 335 | | `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms | | 340 | | `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms | |
| 336 | | `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) | | 341 | | `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) | |
| 337 | | `LEONIDA_KEYBOARD_PAD` | `off` | `1` adds the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus | | 342 | | `LEONIDA_KEYBOARD_PAD` | `off` | `1` adds the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus | |
| 338 | | `LEONIDA_INPUT_SCRIPT` | unset | Comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. With SDL3 they drive the keyboard pad, which has to be enabled; without SDL3 they drive [one scripted pad](#scripted-input-without-sdl3), the only device. The first pad update (without SDL3, the first `GameInputCreate`) reads the script once at startup and starts the clock. `reload_config()` does not reread it. Each press lasts 300 ms. Buttons are `a b x y start back lb rb up down left right`. Spaces around entries are allowed. Empty entries, unknown buttons and invalid times (including negative or non-finite values) are counted and ignored. | | 343 | | `LEONIDA_INPUT_SCRIPT` | unset | Comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. With SDL3 they drive the keyboard pad, which has to be enabled; without SDL3 they drive [one scripted pad](#scripted-input-without-sdl3), the only device. The first pad update (without SDL3, the first `GameInputCreate`) reads the script once at startup and starts the clock. `reload_config()` does not reread it. Each press lasts 300 ms, or `hold` seconds when the entry is `button@seconds:hold` (more than 0, at most 600). With SDL3 a press then stays down until the title has read the pads six times since it began, but never past 5 s from its start (or its hold, if longer). A title reads its pad once a frame, so at a few seconds a frame a 300 ms press can fall between two reads and never arrive: on the retail title's "Couldn't autosave" prompt, three 300 ms `b` presses did nothing, while 120 presses 0.5 s apart got through; one `b@1100:3` replaces them. Buttons are `a b x y start back lb rb up down left right`. Spaces around entries are allowed. Empty entries, unknown buttons, invalid times (including negative or non-finite values) and invalid holds (0 or less, more than 600, not a number) are counted and ignored. | |
| 339 | | `LEONIDA_MOUSE_SENSITIVITY` | `1` | scales how far the mouse moves the keyboard pad's right stick, 0.1..10 | | 344 | | `LEONIDA_MOUSE_SENSITIVITY` | `1` | scales how far the mouse moves the keyboard pad's right stick, 0.1..10 | |
| 340 | 345 | ||
| 341 | SDL's own hints (`SDL_JOYSTICK_*`, see SDL's `SDL_hints.h`) also apply, for example `SDL_JOYSTICK_HIDAPI_PS5=0` to | 346 | SDL's own hints (`SDL_JOYSTICK_*`, see SDL's `SDL_hints.h`) also apply, for example `SDL_JOYSTICK_HIDAPI_PS5=0` to |