diff --git a/runtime/README.md b/runtime/README.md index ab8451e6ff..0feedceeda 100644 --- a/runtime/README.md +++ b/runtime/README.md @@ -355,7 +355,7 @@ ones marked *diagnostic* only add log lines or exist to compare a run with and w | `LEONIDA_POOL_DIAG_AT` | unset | *Diagnostic.* `+0x` of the title's transient-pool assert, as the trace prints it (measured locally): the trace dumps the pool's resource list when that int3 is hit (`shims/startup_trace.h`). | | `LEONIDA_PEEK` | unset | *Diagnostic.* `[:n],,...` (hex): a thread prints the 8-byte values at these RVAs of the title's image (`:n` = n consecutive values) every `LEONIDA_PEEK_SECONDS` (`src/main.cpp`). The RVAs are measured locally and not kept in the repository. `scripts/windows-boot/boot.ps1` no longer sets the game-state and session-state RVAs by default: it sets `LEONIDA_PEEK` only from `LEONIDA_GAME_STATE_RVA` and `LEONIDA_SESSION_STATE_RVA`, and without them its RESULT states read `?` ([scripts/windows-boot/README.md](../scripts/windows-boot/README.md)). | | `LEONIDA_PEEK_SECONDS` | `10` | *Diagnostic.* The period of the `LEONIDA_PEEK` thread (`src/main.cpp`), which prints 8-byte values of the title's image. | -| `LEONIDA_INPUT_SCRIPT` | unset | Timed pad presses, `button@seconds` separated by commas (`a@70,a@85,start@120`), each held 300 ms or its own `button@seconds:hold`; the clock starts with the shim. Works with and without SDL3: with SDL3 it drives the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), without SDL3 one scripted pad that is the only device. Controllers and the keyboard pad still need SDL3. Format and buttons in [docs/gameinput.md](../docs/gameinput.md#environment-variables). | +| `LEONIDA_INPUT_SCRIPT` | unset | Timed pad presses, `button@seconds` separated by commas (`a@70,a@85,start@120`), each held 300 ms or its own `button@seconds:hold`; the clock starts with the shim. Works with and without SDL3: with SDL3 it drives the keyboard pad (`LEONIDA_KEYBOARD_PAD=1` or `always`: its presses arrive unfocused with either), without SDL3 one scripted pad that is the only device. Controllers and the keyboard pad still need SDL3. Format and buttons in [docs/gameinput.md](../docs/gameinput.md#environment-variables). | | `LEONIDA_INPUT_LOG` | on | The GameInput shim logs every press in `LEONIDA_INPUT_SCRIPT`'s form (`name@seconds`), so a session played by hand can be replayed. `0` turns the lines off. | | `LEONIDA_INPUT_TRACE` | unset | `1` (diagnostic, the GameInput shim built without SDL3) logs the title's reading calls on the scripted pad: the first 128, then each one with a button down and every 1000th. Details in [docs/gameinput.md](../docs/gameinput.md#scripted-input-without-sdl3). | | `LEONIDA_LOG_ALLOCINFO` | unset | *Diagnostic.* `1` logs every device slot 25 call (`GetResourceAllocationInfo`) with its thread, description and sizes (`shims/d3d12_xs_device.cpp`). | diff --git a/runtime/shims/gameinput.cpp b/runtime/shims/gameinput.cpp index c989daff4d..6c3bfd031e 100644 --- a/runtime/shims/gameinput.cpp +++ b/runtime/shims/gameinput.cpp @@ -1886,7 +1886,7 @@ void update_keyboard_pad() { } clip_cursor(active && g_raw_ready && g_cursor_pos.load() == system_cursor_pos && foreground_is_ours()); for (const auto& b : kKeyBindings) SDL_SetJoystickVirtualButton(g_keyboard.js, b.sdl_button, down[b.sdl_button]); - // LEONIDA_INPUT_SCRIPT="a@70,a@85,start@120" (with LEONIDA_KEYBOARD_PAD=always): timed presses on the keyboard + // LEONIDA_INPUT_SCRIPT="a@70,a@85,start@120" (with the keyboard pad on, 1 or always): timed presses on the keyboard // pad, in seconds since the pad's first update, each held 300 ms or its own button@seconds:hold, and then until the // title has read the pads kReads times since it began (never past kMaxHold seconds, or the hold if it is longer, so // a title that stops reading does not keep the button). For unattended boots: the title's first prompt diff --git a/scripts/windows-boot/README.md b/scripts/windows-boot/README.md index 92121a2110..7eb9ae597c 100644 --- a/scripts/windows-boot/README.md +++ b/scripts/windows-boot/README.md @@ -40,7 +40,7 @@ Only when your shell has not set them already (`-DryRun` prints the final list): | `LEONIDA_PIPELINE_CACHE_DIR` | `\pipeline-cache` | one warmed cache shared by every build you boot | | `LEONIDA_PEEK` / `_SECONDS` | the game-state and session-state RVAs from `LEONIDA_GAME_STATE_RVA` and `LEONIDA_SESSION_STATE_RVA` (measured locally, not kept here; unset: no peek) / `5` | game state and session state (low dword), the two numbers every RESULT reports | | `LEONIDA_DEVICE_FAULT` | `1` | on device loss: `VK_EXT_device_fault` info, checkpoints, last replay steps | -| `LEONIDA_KEYBOARD_PAD` | `always` (with an input script) | keyboard as a pad even unfocused, so the script's presses arrive | +| `LEONIDA_KEYBOARD_PAD` | `1` (with an input script) | the keyboard pad: the script's presses arrive unfocused, the machine's own keyboard and mouse only through the focused game window | | `LEONIDA_CAPTURE_EVERY` / `_LIMIT` | `60` / `40` | a swapchain read-back every 60 presents, at most 40 | | `DISABLE_RTSS_LAYER`, `DISABLE_VULKAN_OBS_CAPTURE` | `1` | keep third-party Vulkan overlay layers out of the process | diff --git a/scripts/windows-boot/boot.ps1 b/scripts/windows-boot/boot.ps1 index db11e4e76a..7ef53b948e 100644 --- a/scripts/windows-boot/boot.ps1 +++ b/scripts/windows-boot/boot.ps1 @@ -51,7 +51,10 @@ .PARAMETER InputScript LEONIDA_INPUT_SCRIPT: timed pad presses, seconds since the pad's first poll (button@seconds, comma-separated; buttons a b x y start back lb rb up down left right). Each press is held 300 ms; button@seconds:hold holds it - longer, e.g. b@1100:3 for a title that reads its pad only every few seconds. Sets LEONIDA_KEYBOARD_PAD=always. Builds older than + longer, e.g. b@1100:3 for a title that reads its pad only every few seconds. Sets LEONIDA_KEYBOARD_PAD=1: + scripted presses run with or without focus (docs/gameinput.md), while the keyboard and mouse of whoever uses + the machine reach the title only through its focused window (with `always` they reached an unattended boot from + any window). Builds older than main @ 8146ef690 ignore a script longer than 63 characters. Default 'a@45,a@60,a@75,a@90'. .PARAMETER NoInput @@ -248,7 +251,7 @@ $defaults = [ordered]@{ DISABLE_RTSS_LAYER = "1" # third-party Vulkan overlay layers off DISABLE_VULKAN_OBS_CAPTURE = "1" } -if ($InputScript) { $defaults["LEONIDA_KEYBOARD_PAD"] = "always" } +if ($InputScript) { $defaults["LEONIDA_KEYBOARD_PAD"] = "1" } $gameStateRva = "$env:LEONIDA_GAME_STATE_RVA".ToLowerInvariant() -replace '^0x', '' $sessionStateRva = "$env:LEONIDA_SESSION_STATE_RVA".ToLowerInvariant() -replace '^0x', '' if ($gameStateRva -and $sessionStateRva) { $defaults["LEONIDA_PEEK"] = "0x$gameStateRva,0x$sessionStateRva" }