upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/gameinput.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gameinput.md')
-rw-r--r--docs/gameinput.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/gameinput.md b/docs/gameinput.md
index 39a4fd2cc..28115d103 100644
--- a/docs/gameinput.md
+++ b/docs/gameinput.md
@@ -125,9 +125,9 @@ owns the game's window, which is the title's, not the shim's.
125 125
126Keys are read with `GetAsyncKeyState`, which needs no window or message loop (SDL's keyboard is part of its video 126Keys are read with `GetAsyncKeyState`, which needs no window or message loop (SDL's keyboard is part of its video
127subsystem, which this build leaves out) and works under Wine. With `LEONIDA_KEYBOARD_PAD=1` keys count only while a 127subsystem, which this build leaves out) and works under Wine. With `LEONIDA_KEYBOARD_PAD=1` keys count only while a
128window of this process is in the foreground, so typing in another application presses nothing, and every button, 128window of this process is in the foreground. Losing focus releases keyboard and mouse input. The cursor is read
129stick and trigger is released when focus moves away (the cursor is read afresh when focus returns, so the right 129afresh on return so the right stick does not jump. Scripted presses run with or without focus for unattended runs.
130stick does not jump). `LEONIDA_KEYBOARD_PAD=always` reads them whatever has focus; a console tool such as 130`LEONIDA_KEYBOARD_PAD=always` reads physical input whatever has focus; a console tool such as
131 `gameinput_probe` needs it, because its console window belongs to the terminal, not to the tool. 131 `gameinput_probe` needs it, because its console window belongs to the terminal, not to the tool.
132- Force feedback and haptics run through a fake haptic backend (`rt::gameinput::set_haptic_source`), because SDL's 132- Force feedback and haptics run through a fake haptic backend (`rt::gameinput::set_haptic_source`), because SDL's
133 virtual joysticks report no haptics: the motor count, axes and effect flags a wheel reports, and a pad without SDL 133 virtual joysticks report no haptics: the motor count, axes and effect flags a wheel reports, and a pad without SDL
@@ -302,6 +302,7 @@ line is logged when it takes effect); tracking goes on underneath, so clearing i
302| `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms | 302| `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms |
303| `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) | 303| `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) |
304| `LEONIDA_KEYBOARD_PAD` | `off` | `1` adds the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus | 304| `LEONIDA_KEYBOARD_PAD` | `off` | `1` adds the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus |
305| `LEONIDA_INPUT_SCRIPT` | unset | With the keyboard pad enabled, set comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. The first pad update 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. |
305| `LEONIDA_MOUSE_SENSITIVITY` | `1` | scales how far the mouse moves the keyboard pad's right stick, 0.1..10 | 306| `LEONIDA_MOUSE_SENSITIVITY` | `1` | scales how far the mouse moves the keyboard pad's right stick, 0.1..10 |
306 307
307SDL's own hints (`SDL_JOYSTICK_*`, see SDL's `SDL_hints.h`) also apply, for example `SDL_JOYSTICK_HIDAPI_PS5=0` to 308SDL's own hints (`SDL_JOYSTICK_*`, see SDL's `SDL_hints.h`) also apply, for example `SDL_JOYSTICK_HIDAPI_PS5=0` to