Input: with no device, previous and next readings walk every device in time order #361

Manually merged
github merged 1 commit from gh-pr/361/head into gh-pr/361/base 2026-11-26 04:00:52 +00:00
Owner

@⁠booomxd on GitHub · 2026-11-24 02:35 UTC · original
booomxd:input/walk-all-devices → main · +74 −17 · 1 files · 1 commits · merged 2026-11-25 00:19 UTC

Removes the shortcut: in relative (gameinput.rs): with no device given, GetNextReading / GetPreviousReading walked only the reference's own device.

Now, with no device, the walk covers every device's kept readings in time order, as the API documents. Readings from one poll share a timestamp, so ties go by device index, then sequence; on a single device that order is its sequence order, so walks with a device named are unchanged. REFERENCE_TOO_OLD is still decided on the reference's own device.

Test

with_no_device_readings_are_walked_across_devices_in_time_order: stand-in pad and keyboard (same poll), a host pad, a key, the pad again. Checks next/previous across all of them in both directions, the gamepad-only filter skipping keyboard readings, and that naming a device still keeps the walk on it.

cargo test -p victory-hle gameinput: 8 passed. cargo clippy -p victory-hle --all-targets: clean. Not run in-game; Grand Theft Auto VI's own walks (keyboard only, current pad's previous) behave as before.

**@⁠booomxd** on GitHub · 2026-11-24 02:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/361) `booomxd:input/walk-all-devices` → `main` · +74 −17 · 1 files · 1 commits · merged 2026-11-25 00:19 UTC Removes the `shortcut:` in `relative` (`gameinput.rs`): with no device given, `GetNextReading` / `GetPreviousReading` walked only the reference's own device. Now, with no device, the walk covers every device's kept readings in time order, as the API documents. Readings from one poll share a timestamp, so ties go by device index, then sequence; on a single device that order is its sequence order, so walks with a device named are unchanged. `REFERENCE_TOO_OLD` is still decided on the reference's own device. ### Test `with_no_device_readings_are_walked_across_devices_in_time_order`: stand-in pad and keyboard (same poll), a host pad, a key, the pad again. Checks next/previous across all of them in both directions, the gamepad-only filter skipping keyboard readings, and that naming a device still keeps the walk on it. `cargo test -p victory-hle gameinput`: 8 passed. `cargo clippy -p victory-hle --all-targets`: clean. Not run in-game; Grand Theft Auto VI's own walks (keyboard only, current pad's previous) behave as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:00:50 +00:00
github manually merged commit 3f5eff5760 into gh-pr/361/base 2026-11-26 04:00:52 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:27 UTC · original

Tested PR #361 at head 3f5eff57603270823920e15b93479dc168b08eb9 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at 3f5eff57603270823920e15b93479dc168b08eb9.

  • cargo test --locked -p victory-hle with_no_device_readings_are_walked_across_devices_in_time_order — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.01s ); cases: modules::gameinput::tests::with_no_device_readings_are_walked_across_devices_in_time_order.

Behavior covered: Checks controller readings walk all devices in timestamp order when no device is selected.
Code: crates/victory-hle/src/modules/gameinput.rs

**@⁠jeremygold02** on GitHub · 2026-11-24 04:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/361#issuecomment-7122036273) Tested PR #361 at head `3f5eff57603270823920e15b93479dc168b08eb9` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `3f5eff57603270823920e15b93479dc168b08eb9`. - `cargo test --locked -p victory-hle with_no_device_readings_are_walked_across_devices_in_time_order` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.01s ); cases: modules::gameinput::tests::with_no_device_readings_are_walked_across_devices_in_time_order. Behavior covered: Checks controller readings walk all devices in timestamp order when no device is selected. Code: [crates/victory-hle/src/modules/gameinput.rs](https://github.com/Marvisak/VIctory/blob/3f5eff57603270823920e15b93479dc168b08eb9/crates/victory-hle/src/modules/gameinput.rs)
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!361
No description provided.