diff options
| author | Maxime Mansiet <AirKyzzZ@users.noreply.github.com> | 2026-11-23 03:02:17 +0100 |
|---|---|---|
| committer | Maxime Mansiet <AirKyzzZ@users.noreply.github.com> | 2026-11-23 03:05:55 +0100 |
| commit | 0519bc2c8108089c65652f550e8b950f9731eb33 (patch) | |
| tree | 88764434b3fff1e09a6305bb4b5c12fb3850a61b /docs/gameinput.md | |
| parent | 03b09a086592a197db64d91655c6e65c30764d96 (diff) | |
gameinput: a reading callback's inputKind filter checks what the device supports
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
Diffstat (limited to 'docs/gameinput.md')
| -rw-r--r-- | docs/gameinput.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/gameinput.md b/docs/gameinput.md index fa216a2ee..7c8cefb74 100644 --- a/docs/gameinput.md +++ b/docs/gameinput.md | |||
| @@ -222,7 +222,9 @@ intensity 0; waveform indices other than 0 are `E_INVALIDARG`. | |||
| 222 | Pads whose SDL gamepad reports both a gyroscope and an accelerometer (a DualSense, a Switch Pro, Steam Input pads) get | 222 | Pads whose SDL gamepad reports both a gyroscope and an accelerometer (a DualSense, a Switch Pro, Steam Input pads) get |
| 223 | `GameInputKindMotion` in `supportedInput` and a `motionInfo` (`GameInputMotionInfo`, Microsoft's v0 layout); `IGameInputReading::GetMotionState` | 223 | `GameInputKindMotion` in `supportedInput` and a `motionInfo` (`GameInputMotionInfo`, Microsoft's v0 layout); `IGameInputReading::GetMotionState` |
| 224 | returns a `GameInputMotionState` on their readings, and `GetCurrentReading`/`GetNextReading` answer a | 224 | returns a `GameInputMotionState` on their readings, and `GetCurrentReading`/`GetNextReading` answer a |
| 225 | `GameInputKindMotion` query for such a pad and return `GAMEINPUT_E_READING_NOT_FOUND` for a pad without sensors. The | 225 | `GameInputKindMotion` query for such a pad and return `GAMEINPUT_E_READING_NOT_FOUND` for a pad without sensors. A |
| 226 | reading callback registered for `GameInputKindMotion` hears only such pads: like a device callback, it is limited to | ||
| 227 | devices that support at least one of the kinds it names (Microsoft's `RegisterReadingCallback` reference). The | ||
| 226 | sensors are enabled when the pad is opened, at SDL's requested rate, and every poll reads the latest sample. | 228 | sensors are enabled when the pad is opened, at SDL's requested rate, and every poll reads the latest sample. |
| 227 | 229 | ||
| 228 | - The state carries **signed fractions of the maxima `motionInfo` reports** (1.0 = full magnitude), which is the | 230 | - The state carries **signed fractions of the maxima `motionInfo` reports** (1.0 = full magnitude), which is the |
| @@ -403,8 +405,8 @@ rests on a transcription rather than on a side-by-side compile. | |||
| 403 | first twin's id equal to the single-pad id). Motion runs on a virtual pad with sensors (`nsensors` in the | 405 | first twin's id equal to the single-pad id). Motion runs on a virtual pad with sensors (`nsensors` in the |
| 404 | virtual-joystick description, fed with `SDL_SendJoystickVirtualSensorData`): the kind and `motionInfo` on a sensor | 406 | virtual-joystick description, fed with `SDL_SendJoystickVirtualSensorData`): the kind and `motionInfo` on a sensor |
| 405 | pad and not on a plain one, no motion before the first sample, normalisation against the `motionInfo` maxima, the | 407 | pad and not on a plain one, no motion before the first sample, normalisation against the `motionInfo` maxima, the |
| 406 | accuracy values, the ±1 clamp, the ~8 ms cadence, and that a motion query on a pad without sensors is | 408 | accuracy values, the ±1 clamp, the ~8 ms cadence, that a motion query on a pad without sensors is |
| 407 | `GAMEINPUT_E_READING_NOT_FOUND`. The keyboard pad is | 409 | `GAMEINPUT_E_READING_NOT_FOUND`, and that a Motion reading callback hears only the sensor pad. The keyboard pad is |
| 408 | driven through `rt::gameinput::set_keyboard_source` and `set_cursor_source` with fake keys, focus and cursor: every | 410 | driven through `rt::gameinput::set_keyboard_source` and `set_cursor_source` with fake keys, focus and cursor: every |
| 409 | binding, two keys at once, each WASD direction, opposite keys cancelling, diagonals, the mouse moving the right | 411 | binding, two keys at once, each WASD direction, opposite keys cancelling, diagonals, the mouse moving the right |
| 410 | stick, clamping and decaying to 0, the mouse-button triggers, no input out of focus, release of buttons, sticks and | 412 | stick, clamping and decaying to 0, the mouse-button triggers, no input out of focus, release of buttons, sticks and |