WIP: [pr-fix][input] Radial wheel held with right mouse in the driver seat (DARNER_WHEEL_HOLD=1, off by default) #6

Closed
Jesper-A wants to merge 0 commits from Jesper-A/Darner:pr4-wheel-hold into main
Contributor

Re-filed from CodeFloe #327 (the CodeFloe repo is gone; nothing was migrated). Same branch and commit.

Base: the branch (3 commits) is on f2bccf656, the main commit it was cut from. main is now dd2f061d5. Not rebased (we rebase only if you ask). A text-only trial merge (git merge-tree --write-tree trustno1/main pr4-wheel-hold) conflicts in docs/findings.md only; gameinput.rs, README.md and lib.rs merge cleanly.

Contributor role (optional)

  • Fluxer ID:

What it changes

With MOUSE AND KEYBOARD and the native mouse on, right mouse in the driver seat is the left shoulder (overlay_mouse_mapping), and that function drops the left shoulder once the radial wheel is active. Holding right mouse therefore opened the wheel, let it go, and opened it again, so the wheel opened and closed in a loop.

Switch: DARNER_WHEEL_HOLD=1. Default: off (not set); behaviour is then exactly as on main. With it on, the left shoulder stays pressed while right mouse is held after the wheel opened, until the button comes up (wheel_hold_step). Driver seat only: other seats, pads and aircraft are unchanged. Read once at the start through asked_for!, so DARNER_AB also reaches it in diagnostics builds.

One side effect to look at: the macros toggled!/asked_for! reach $crate::ab, which was private to darner-gpu, so they did not compile in another crate with the diagnostics or ab feature. ab is now pub with #[doc(hidden)], and ab::bit and ab::on are pub (crates/darner-gpu/src/ab.rs, lib.rs). Nothing else in darner-gpu changes.

Also: a README row and a docs/findings.md entry.

Files: crates/darner-hle/src/modules/gameinput.rs, crates/darner-gpu/src/{ab.rs,lib.rs}, README.md, docs/findings.md.

How it was tested

  • Tested revision: 5cfac73cb (this PR's head, on main f2bccf656). Main is now dd2f061d5; a trial merge of this head into it conflicts only in docs/findings.md (see Base), which I will fix when the PR leaves WIP. The in-game checks below were not on this exact revision (see Gameplay).
  • Commands and results, each -j 4 --locked, in the PR worktree:
    • cargo clippy -j 4 --workspace --all-targets --locked -- -D warnings -A clippy::unnecessary_lazy_evaluations: clean.
    • cargo clippy -j 4 --workspace --all-targets --all-features --locked -- -D warnings -A clippy::unnecessary_lazy_evaluations: clean.
    • Why -A clippy::unnecessary_lazy_evaluations: the plain -D warnings gate fails on main itself on that lint, in code this PR does not touch.
    • cargo test -j 4 --workspace --locked: the test programs that ran before the darner-gpu lib test all passed (104 passed 1 ignored; 2; 2; 3; 30; 86 passed 7 ignored; 44 passed; 0 failed). The darner-gpu lib test program then did not finish: host::refresh_tests::a_title_write_flushes_copies_of_its_pages_at_other_addresses stalls with --test-threads 1 (after host::recycle::tests::sizes_go_to_powers_of_two_from_64_kib), on this head and on main f2bccf656 alike; run alone it passes in 0.29 s. It does not come from this change: the same test also stalls on main f2bccf656 (554 tests ran, 420 s timeout, same --test-threads 1). The runs were stopped at their timeouts (this head: 300 s; main: 420 s); logs not kept. So the workspace test is not green; whether the new gameinput.rs tests ran in that pass was not checked (the per-crate output was filtered).
    • cargo xtask policy: not run. No CI ran (there is no CI upstream).
    • Tests added: wheel_hold_step over a closed, open, held, released sequence, and wheel_hold_is_asked_for_with_exactly_one, both in gameinput.rs.
  • Gameplay, when relevant: the user tested holding right mouse in the driver seat in game, on our play build up-play-next at 960f6a116, which carries e950d163e and d1da57e19 (the code commits of this change, with the README/findings commit 695ff7d49). Their words (2026-12-03): "I also tested hold right click ingame"; they did not describe the result. That build is not this PR's head: 960f6a116 is not 5cfac73cb, it carries many other changes of ours, and the three wheel commits there have other hashes than the PR's (93761841a, 7ec8f4133, 5cfac73cb). The lines changed under crates/ are identical in both sets of commits (compared with git diff); only a blank line in the docs differs. The latest run's log header on that build (2026-12-03 03:57 UTC) lists DARNER_WHEEL_HOLD=1. Earlier, the user also confirmed it on our play build (their words, 2026-12-03: "I confirm it works"): first as 564958b35..9b9fdbd70 on up-play-main (cut from main 8050243e0, launched 2026-12-02 21:46 and 22:39), later as e950d163e..d1da57e19 on up-play-next. Which exe was running at that confirmation is not logged. Details beyond the above were not given or recorded (timings, frame rates, resolution, other seats). The play presets use Series S + DLSS performance with FSR 3 frame generation 2x (presets/play-main-ui.ps1, play-next.ps1).
  • Before and after, when relevant: before, not measured; the loop is from reading overlay_mouse_mapping, not a recording. After, the user's earlier confirmation ("I confirm it works"); for the newer test they said only that they tested it. Nothing else was measured.
  • Shader wave sizes tested, when relevant: no shader change.
  • Coverage gaps: other seats with the switch on, aircraft, a pad, any keyboard layout other than the user's; cargo xtask policy; a green workspace test (see the hang above).

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Spec dependence

Our PC: RTX 2070 SUPER 8 GB (Turing, wave32), Ryzen 7 5800X, 32 GB RAM, Resizable BAR off, Windows 11 Insider build 26320, NVIDIA driver 621.40. Profile of the play presets: Series S, DLSS performance, FSR 3 frame generation 2x.

The change is in the input path (no GPU, no shader), so no card dependence is expected, but it was tested on this one PC only. It needs MOUSE AND KEYBOARD with the native mouse on, and only acts in the driver seat.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none found that cover the wheel. On 2026-12-03 this host had 3 issues and 1 pull request in total; I searched their titles and bodies for "wheel", "right mouse" and WHEEL_HOLD: nothing. The one open pull request (#3, ray tracing mode in F1) changes host/menu.rs, host/panel.rs and hwrt.rs: none of this change's files (gameinput.rs, ab.rs, lib.rs, README.md, docs/findings.md). Earlier CodeFloe searches (not migrated) found no report of this loop; two feature requests there, CodeFloe #133 (rebinding in native mouse mode) and #83 (an action-based keyboard and mouse preset), were about other things. On main since f2bccf656, gameinput.rs changed in e6e3a4cb3 (PlayStation prompts), b08cc0f77 (keyboard layout prompts), c3824b341 (DARNER_BINDINGS_ONLY), d8e42e719 (DARNER_TRAINER) and d77869c52 (look keys in bindings.ini); the trial merge takes gameinput.rs without a conflict. Our other re-filed PR on the same file, from branch up-key-trigger-fix, changes fallback_for_seat, not the wheel.

This change was made with AI assistance (Claude Code).

Re-filed from CodeFloe #327 (the CodeFloe repo is gone; nothing was migrated). Same branch and commit. **Base:** the branch (3 commits) is on `f2bccf656`, the `main` commit it was cut from. `main` is now `dd2f061d5`. Not rebased (we rebase only if you ask). A text-only trial merge (`git merge-tree --write-tree trustno1/main pr4-wheel-hold`) conflicts in `docs/findings.md` only; `gameinput.rs`, `README.md` and `lib.rs` merge cleanly. ## Contributor role (optional) - Fluxer ID: ## What it changes With MOUSE AND KEYBOARD and the native mouse on, right mouse in the driver seat is the left shoulder (`overlay_mouse_mapping`), and that function drops the left shoulder once the radial wheel is active. Holding right mouse therefore opened the wheel, let it go, and opened it again, so the wheel opened and closed in a loop. **Switch: `DARNER_WHEEL_HOLD=1`. Default: off (not set); behaviour is then exactly as on main.** With it on, the left shoulder stays pressed while right mouse is held after the wheel opened, until the button comes up (`wheel_hold_step`). Driver seat only: other seats, pads and aircraft are unchanged. Read once at the start through `asked_for!`, so `DARNER_AB` also reaches it in diagnostics builds. One side effect to look at: the macros `toggled!`/`asked_for!` reach `$crate::ab`, which was private to `darner-gpu`, so they did not compile in another crate with the `diagnostics` or `ab` feature. `ab` is now `pub` with `#[doc(hidden)]`, and `ab::bit` and `ab::on` are `pub` (`crates/darner-gpu/src/ab.rs`, `lib.rs`). Nothing else in `darner-gpu` changes. Also: a README row and a `docs/findings.md` entry. Files: `crates/darner-hle/src/modules/gameinput.rs`, `crates/darner-gpu/src/{ab.rs,lib.rs}`, `README.md`, `docs/findings.md`. ## How it was tested - Tested revision: `5cfac73cb` (this PR's head, on main f2bccf656). Main is now dd2f061d5; a trial merge of this head into it conflicts only in `docs/findings.md` (see Base), which I will fix when the PR leaves WIP. The in-game checks below were not on this exact revision (see Gameplay). - Commands and results, each `-j 4 --locked`, in the PR worktree: - `cargo clippy -j 4 --workspace --all-targets --locked -- -D warnings -A clippy::unnecessary_lazy_evaluations`: clean. - `cargo clippy -j 4 --workspace --all-targets --all-features --locked -- -D warnings -A clippy::unnecessary_lazy_evaluations`: clean. - Why `-A clippy::unnecessary_lazy_evaluations`: the plain `-D warnings` gate fails on main itself on that lint, in code this PR does not touch. - `cargo test -j 4 --workspace --locked`: the test programs that ran before the `darner-gpu` lib test all passed (104 passed 1 ignored; 2; 2; 3; 30; 86 passed 7 ignored; 44 passed; 0 failed). The `darner-gpu` lib test program then did not finish: `host::refresh_tests::a_title_write_flushes_copies_of_its_pages_at_other_addresses` stalls with `--test-threads 1` (after `host::recycle::tests::sizes_go_to_powers_of_two_from_64_kib`), on this head and on main f2bccf656 alike; run alone it passes in 0.29 s. It does not come from this change: the same test also stalls on main f2bccf656 (554 tests ran, 420 s timeout, same `--test-threads 1`). The runs were stopped at their timeouts (this head: 300 s; main: 420 s); logs not kept. So the workspace test is not green; whether the new `gameinput.rs` tests ran in that pass was not checked (the per-crate output was filtered). - `cargo xtask policy`: not run. No CI ran (there is no CI upstream). - Tests added: `wheel_hold_step` over a closed, open, held, released sequence, and `wheel_hold_is_asked_for_with_exactly_one`, both in `gameinput.rs`. - Gameplay, when relevant: the user tested holding right mouse in the driver seat in game, on our play build `up-play-next` at `960f6a116`, which carries `e950d163e` and `d1da57e19` (the code commits of this change, with the README/findings commit `695ff7d49`). Their words (2026-12-03): "I also tested hold right click ingame"; they did not describe the result. That build is not this PR's head: `960f6a116` is not `5cfac73cb`, it carries many other changes of ours, and the three wheel commits there have other hashes than the PR's (`93761841a`, `7ec8f4133`, `5cfac73cb`). The lines changed under `crates/` are identical in both sets of commits (compared with `git diff`); only a blank line in the docs differs. The latest run's log header on that build (2026-12-03 03:57 UTC) lists `DARNER_WHEEL_HOLD=1`. Earlier, the user also confirmed it on our play build (their words, 2026-12-03: "I confirm it works"): first as `564958b35`..`9b9fdbd70` on `up-play-main` (cut from main 8050243e0, launched 2026-12-02 21:46 and 22:39), later as `e950d163e`..`d1da57e19` on `up-play-next`. Which exe was running at that confirmation is not logged. Details beyond the above were not given or recorded (timings, frame rates, resolution, other seats). The play presets use Series S + DLSS performance with FSR 3 frame generation 2x (presets/play-main-ui.ps1, play-next.ps1). - Before and after, when relevant: before, not measured; the loop is from reading `overlay_mouse_mapping`, not a recording. After, the user's earlier confirmation ("I confirm it works"); for the newer test they said only that they tested it. Nothing else was measured. - Shader wave sizes tested, when relevant: no shader change. - Coverage gaps: other seats with the switch on, aircraft, a pad, any keyboard layout other than the user's; `cargo xtask policy`; a green workspace test (see the hang above). ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Spec dependence Our PC: RTX 2070 SUPER 8 GB (Turing, wave32), Ryzen 7 5800X, 32 GB RAM, Resizable BAR off, Windows 11 Insider build 26320, NVIDIA driver 621.40. Profile of the play presets: Series S, DLSS performance, FSR 3 frame generation 2x. The change is in the input path (no GPU, no shader), so no card dependence is expected, but it was tested on this one PC only. It needs MOUSE AND KEYBOARD with the native mouse on, and only acts in the driver seat. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none found that cover the wheel. On 2026-12-03 this host had 3 issues and 1 pull request in total; I searched their titles and bodies for "wheel", "right mouse" and `WHEEL_HOLD`: nothing. The one open pull request (#3, ray tracing mode in F1) changes `host/menu.rs`, `host/panel.rs` and `hwrt.rs`: none of this change's files (`gameinput.rs`, `ab.rs`, `lib.rs`, `README.md`, `docs/findings.md`). Earlier CodeFloe searches (not migrated) found no report of this loop; two feature requests there, CodeFloe #133 (rebinding in native mouse mode) and #83 (an action-based keyboard and mouse preset), were about other things. On `main` since `f2bccf656`, `gameinput.rs` changed in e6e3a4cb3 (PlayStation prompts), b08cc0f77 (keyboard layout prompts), c3824b341 (`DARNER_BINDINGS_ONLY`), d8e42e719 (`DARNER_TRAINER`) and d77869c52 (look keys in `bindings.ini`); the trial merge takes `gameinput.rs` without a conflict. Our other re-filed PR on the same file, from branch `up-key-trigger-fix`, changes `fallback_for_seat`, not the wheel. This change was made with AI assistance (Claude Code).
With the native mouse on, right mouse in the driver seat is the left
shoulder, and overlay_mouse_mapping drops the left shoulder once the radial
wheel is active. Held right mouse then opened the wheel, let it go and
opened it again: the wheel opened and closed in a loop.

DARNER_WHEEL_HOLD=1 keeps the left shoulder pressed while right mouse stays
down after the wheel opened, until the button comes up (wheel_hold_step).
Driver seat only; other seats, pads and the switch off are unchanged. Read
once.

This change was made with AI assistance (Claude Code).
This change was made with AI assistance (Claude Code).
Read the switch with `darner_gpu::asked_for!` as AGENTS.md asks, so it also
follows DARNER_AB in diagnostics builds. The macros reach `$crate::ab`, which
was private to darner-gpu, so they did not compile in another crate with the
diagnostics or ab feature; `ab` is now public (hidden) with `bit` and `on`.

This change was made with AI assistance (Claude Code).
Author
Contributor

Merged into main by 780c9353c (780c9353c, "Merge PR #6"), so this is done; closing.

Merged into `main` by 780c9353c (https://git.gtahub.st/TrustNo1/Darner/commit/780c9353c, "Merge PR #6"), so this is done; closing.
Jesper-A closed this pull request 2026-12-03 20:28:36 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
TrustNo1/Darner!6
No description provided.