fix(input): the item carousel turns with the mouse wheel, and the mouse's motion no longer throws its choice #2964

Merged
HumanBean merged 2 commits from cuecuemoar/Longshot:fix/carousel-wheel into main 2026-12-02 15:10:57 +00:00
Contributor

Summary

Holding Q (L) or R in play opens the item carousel, the row of items to choose from. With the
keyboard and mouse, two things were wrong there (#2672):

  • The wheel did nothing. game/oot_menu.c has code that turns the carousel with the wheel (item_choice_tick), but
    it never ran. The game's menus hand the mouse to the screen that shows a focused button. The carousel shows its
    choice with none of its buttons focused as it opens, so it was never that screen and the notches were dropped.
  • Moving the mouse threw the choice to the row's end. While L or R is held, the captured mouse is a pointing right
    stick (host/nn_hid.c), and the carousel turns with the right stick. A small move holds the stick over, so the
    choice kept running until the row's first or last item.

On main: in play, click into the window, hold Q or R and turn the wheel: the choice stays. Move the mouse a little
left or right: it runs to an end of the row.

Now:

  • The carousel counts as the mouse's screen whenever it runs, as the map screen's pages already do. The wheel turns it a
    notch at a time (down to the right, up to the left), with the existing item_choice_tick.
  • On Windows, each of its frames tells the host (hos_mouse_item_choice_shown, declared in host/game_host.h). For
    100 ms after one, read_input drops the mouse's motion from the stick. The mouse is still taken in, so the pointer
    stays held at the window's centre. This holds with Mouse camera on Native and on As the stick. Off is unchanged (there
    the mouse is never the stick).
  • Linux is unchanged. It has no carousel wheel (item_choice_tick is Windows-only, and SDL hands the wheel to the Insert
    menu alone), so its hos_oot_menu_tick doesn't tell the host, and the mouse steers the carousel as on main.

Read first: game/oot_menu.c (item_choice_seen, inside #if defined(_WIN32), and the front screen's condition in hos_oot_menu_tick), then
host/nn_hid.c (hos_mouse_item_choice, and its use beside the Deck's in read_input). The player guide gets a line on
the carousel.

Fixes #2672. See #822: its opt-in item wheel (Twilight Princess style) frees the mouse to a pointer of its own, so the
stick path changed here doesn't concern it.

Testing

Tested: Windows 10, RTX 4090, NVIDIA 617.42, keyboard and mouse, 1280x720 window, a copy of my own adult save in
Zora's Domain (each run in its own profile). A script sent real input: a click to capture the mouse, then Q held,
3 wheel notches (down, down, up), 300 px of mouse motion right then left; then the same with R. HOS_MENU_TRACE=1, and
the bridge's shot of each step checked by eye. Same steps on both builds:

Step main (018dd2ef; game/oot_menu.c, host/nn_hid.c and host/display.c unchanged since) this PR (4c65c239)
Q held, the carousel opens not the mouse's screen: the mouse is for screen the carousel only once the mouse's motion had moved its choice the mouse is for screen the carousel, at once
wheel down, down, up the choice stays (Empty Bottle); no turn logged Empty Bottle β†’ the last item β†’ stays at the end β†’ Empty Bottle (wheel -1: the item choice turned right ...)
mouse 300 px right, then left the choice runs to the row's end, then back to its first item the choice stays
R held, the same steps the same as Q: no turn; the motion throws the choice the same as Q: each notch a turn; the motion leaves it

Item-choice turns logged: 0 on main, 6 here.

The game runs were on 4c65c239. The review round (now cdea304c, on main 56823e27) moves item_choice_seen inside
#if defined(_WIN32), takes its call out of the Linux tick, and changes comments. The Windows code the game runs is the
same, and the two commits main gained since touch none of these files, so the runs weren't repeated.

Checks:

  • tests/test_oot_menu_mouse.py (Windows only): a carousel with none of its buttons focused still takes the wheel,
    and its frames tell the host. On the test commit alone (6a06e395) 3 checks fail: lines 302, 310 and 314, e.g.
    FAIL line 314: !strcmp(taps, "0.000:RIGHT/60;") && focus_calls == 0 (taps ""). They pass on cdea304c.
  • tests/test_oot_menu_mouse.py, test_the_linux_tick_does_not_tell_the_host (runs everywhere, a source check): the
    Linux hos_oot_menu_tick doesn't call item_choice_seen. It fails against the first version of this fix (4c65c239:
    'item_choice_seen' unexpectedly found in "#else ...") and passes on cdea304c.
  • tests/input_background_test.c, new case item-choice-motion, through the real read_input: with the carousel
    shown, the mouse's motion steers nothing, As the stick and Native with L held, and the pointer is still taken in.
    On the test commit it fails (FAIL:193 ... G32(address + 24) == rx, the stick still 20000) on Windows and Linux;
    here all 29 cases pass on both, with and without HOS_MOUSE_NATIVE=1 in the environment.
    The fixture now removes every HOS_MOUSE_* switch, as it does HOS_INPUT_*. read_input reads HOS_MOUSE_NATIVE
    itself, and with it set menu-side-buttons, deck-motion and item-choice-motion failed.
  • Undone one at a time, each part of the fix fails its own case again: the front screen's condition (line 314), the
    host notice (lines 302, 310), the motion drop (item-choice-motion).
  • Two repairs so these files run at all, in the test commit. test_oot_menu_mouse.py gets the host/game_host.h
    stand-in it has lacked since #2411; this is the same hunk as #2962's. test_input_background.py's option-4 check ended
    its slice of vk_replay.cpp at a }; inside the option lambda, which stopped the file before any of its C cases ran.
    It now ends at the lambda's own close, and links libm on Linux.
  • The checks that read host/nn_hid.c, game/oot_menu.c or host/game_host.h (54 files) pass on 4c65c239, except
    four that fail the same way on main (test_game_boundary, test_keyboard_option, test_menu_keys,
    test_pipeline_tour). On cdea304c the ones that cut the changed code ran again and pass (test_hold_toggle,
    test_walk_key, test_input_movie, test_mouse_stick, test_menu_hooks and others). test_walk_key cuts the
    changed code and gets a stand-in. test_hold_toggle needs none now. The Windows-only ones among them
    pass on Windows, apart from test_sprint and test_oot_fov_rust, which fail the same way on main there: this PC
    lacks the MSVC msvcrt.lib and cargo those two need.
  • Linux (Ubuntu 22.04 under WSL2), cdea304c: scripts/check_host_compile.py compiles the 119 host units, 0 failed and
    0 warnings, the same as main 56823e27. Nothing is linked, and the game isn't run there. The whole suite, strict,
    against main: see the latest comment.

Still to test:

  • Windows, an Xbox or other pad beside the mouse: hold R on the pad and turn its right stick, expecting the carousel to
    turn as on main (only the mouse's motion is dropped, not the pad's stick). (by hand)

Measurements

Verdict: fixed: the wheel turns the carousel (6 turns logged against 0 on main), and the mouse's motion leaves the
choice. There's no speed or memory to measure: per input read it adds one atomic load and a compare, and per carousel
frame one atomic store. No render-path work, nothing allocated.

Setup: Windows 10, RTX 4090, NVIDIA 617.42; the game-free tests with llvm-mingw clang (Windows) and gcc (Linux); the
game in a 1280x720 window, the carousel in Zora's Domain (adult), real input, as Testing says.

Before: main @ 56823e27 (game: 018dd2ef, same code) After: this PR @ cdea304c (game: 4c65c239, same Windows code)
tests/test_oot_menu_mouse.py 3 checks fail (lines 302, 310, 314) OK
tests/test_input_background.py, item-choice-motion fails: the stick still 20000 passes (29 of 29 cases)
Q held, 3 wheel notches choice unchanged, 0 turns logged 3 turns, the choice moves and stops at the end
Q held, mouse 300 px right then left the choice runs to the row's end, then its start the choice stays

Risks

Only while the item carousel is on screen, on Windows: the mouse's motion no longer moves its choice, and the wheel does. A player
who steered the carousel with the mouse now uses the wheel, Q/R with the arrow keys, or a pad. A pad's own right stick is
untouched. Everywhere else the mouse is as before, and on Linux the carousel is as on main. A revert is enough to undo it. Nothing changes in saves,
longshot_options.ini or the caches.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01VxeaZiJchH34JFuUAaobK7

## Summary Holding <kbd>Q</kbd> (L) or <kbd>R</kbd> in play opens the item carousel, the row of items to choose from. With the keyboard and mouse, two things were wrong there (#2672): - **The wheel did nothing.** `game/oot_menu.c` has code that turns the carousel with the wheel (`item_choice_tick`), but it never ran. The game's menus hand the mouse to the screen that shows a focused button. The carousel shows its choice with none of its buttons focused as it opens, so it was never that screen and the notches were dropped. - **Moving the mouse threw the choice to the row's end.** While L or R is held, the captured mouse is a *pointing* right stick (`host/nn_hid.c`), and the carousel turns with the right stick. A small move holds the stick over, so the choice kept running until the row's first or last item. **On `main`:** in play, click into the window, hold Q or R and turn the wheel: the choice stays. Move the mouse a little left or right: it runs to an end of the row. **Now:** - The carousel counts as the mouse's screen whenever it runs, as the map screen's pages already do. The wheel turns it a notch at a time (down to the right, up to the left), with the existing `item_choice_tick`. - On Windows, each of its frames tells the host (`hos_mouse_item_choice_shown`, declared in `host/game_host.h`). For 100 ms after one, `read_input` drops the mouse's motion from the stick. The mouse is still taken in, so the pointer stays held at the window's centre. This holds with Mouse camera on Native and on As the stick. Off is unchanged (there the mouse is never the stick). - Linux is unchanged. It has no carousel wheel (`item_choice_tick` is Windows-only, and SDL hands the wheel to the Insert menu alone), so its `hos_oot_menu_tick` doesn't tell the host, and the mouse steers the carousel as on `main`. Read first: `game/oot_menu.c` (`item_choice_seen`, inside `#if defined(_WIN32)`, and the front screen's condition in `hos_oot_menu_tick`), then `host/nn_hid.c` (`hos_mouse_item_choice`, and its use beside the Deck's in `read_input`). The player guide gets a line on the carousel. Fixes #2672. See #822: its opt-in item wheel (Twilight Princess style) frees the mouse to a pointer of its own, so the stick path changed here doesn't concern it. ## Testing **Tested:** Windows 10, RTX 4090, NVIDIA 617.42, keyboard and mouse, 1280x720 window, a copy of my own adult save in Zora's Domain (each run in its own profile). A script sent real input: a click to capture the mouse, then Q held, 3 wheel notches (down, down, up), 300 px of mouse motion right then left; then the same with R. `HOS_MENU_TRACE=1`, and the bridge's shot of each step checked by eye. Same steps on both builds: | Step | `main` (018dd2ef; `game/oot_menu.c`, `host/nn_hid.c` and `host/display.c` unchanged since) | this PR (4c65c239) | |---|---|---| | Q held, the carousel opens | not the mouse's screen: `the mouse is for screen` the carousel only once the mouse's motion had moved its choice | `the mouse is for screen` the carousel, at once | | wheel down, down, up | the choice stays (Empty Bottle); no turn logged | Empty Bottle β†’ the last item β†’ stays at the end β†’ Empty Bottle (`wheel -1: the item choice turned right` ...) | | mouse 300 px right, then left | the choice runs to the row's end, then back to its first item | the choice stays | | R held, the same steps | the same as Q: no turn; the motion throws the choice | the same as Q: each notch a turn; the motion leaves it | Item-choice turns logged: 0 on `main`, 6 here. The game runs were on 4c65c239. The review round (now cdea304c, on `main` 56823e27) moves `item_choice_seen` inside `#if defined(_WIN32)`, takes its call out of the Linux tick, and changes comments. The Windows code the game runs is the same, and the two commits `main` gained since touch none of these files, so the runs weren't repeated. Checks: - `tests/test_oot_menu_mouse.py` (Windows only): a carousel with none of its buttons focused still takes the wheel, and its frames tell the host. On the test commit alone (6a06e395) 3 checks fail: lines 302, 310 and 314, e.g. `FAIL line 314: !strcmp(taps, "0.000:RIGHT/60;") && focus_calls == 0 (taps "")`. They pass on cdea304c. - `tests/test_oot_menu_mouse.py`, `test_the_linux_tick_does_not_tell_the_host` (runs everywhere, a source check): the Linux `hos_oot_menu_tick` doesn't call `item_choice_seen`. It fails against the first version of this fix (4c65c239: `'item_choice_seen' unexpectedly found in "#else ..."`) and passes on cdea304c. - `tests/input_background_test.c`, new case `item-choice-motion`, through the real `read_input`: with the carousel shown, the mouse's motion steers nothing, As the stick and Native with L held, and the pointer is still taken in. On the test commit it fails (`FAIL:193 ... G32(address + 24) == rx`, the stick still 20000) on Windows and Linux; here all 29 cases pass on both, with and without `HOS_MOUSE_NATIVE=1` in the environment. The fixture now removes every `HOS_MOUSE_*` switch, as it does `HOS_INPUT_*`. `read_input` reads `HOS_MOUSE_NATIVE` itself, and with it set `menu-side-buttons`, `deck-motion` and `item-choice-motion` failed. - Undone one at a time, each part of the fix fails its own case again: the front screen's condition (line 314), the host notice (lines 302, 310), the motion drop (`item-choice-motion`). - Two repairs so these files run at all, in the test commit. `test_oot_menu_mouse.py` gets the `host/game_host.h` stand-in it has lacked since #2411; this is the same hunk as #2962's. `test_input_background.py`'s option-4 check ended its slice of `vk_replay.cpp` at a `};` inside the option lambda, which stopped the file before any of its C cases ran. It now ends at the lambda's own close, and links libm on Linux. - The checks that read `host/nn_hid.c`, `game/oot_menu.c` or `host/game_host.h` (54 files) pass on 4c65c239, except four that fail the same way on `main` (`test_game_boundary`, `test_keyboard_option`, `test_menu_keys`, `test_pipeline_tour`). On cdea304c the ones that cut the changed code ran again and pass (`test_hold_toggle`, `test_walk_key`, `test_input_movie`, `test_mouse_stick`, `test_menu_hooks` and others). `test_walk_key` cuts the changed code and gets a stand-in. `test_hold_toggle` needs none now. The Windows-only ones among them pass on Windows, apart from `test_sprint` and `test_oot_fov_rust`, which fail the same way on `main` there: this PC lacks the MSVC `msvcrt.lib` and `cargo` those two need. - Linux (Ubuntu 22.04 under WSL2), cdea304c: `scripts/check_host_compile.py` compiles the 119 host units, 0 failed and 0 warnings, the same as `main` 56823e27. Nothing is linked, and the game isn't run there. The whole suite, strict, against `main`: see the latest comment. **Still to test:** - Windows, an Xbox or other pad beside the mouse: hold R on the pad and turn its right stick, expecting the carousel to turn as on `main` (only the mouse's motion is dropped, not the pad's stick). (by hand) ## Measurements **Verdict:** fixed: the wheel turns the carousel (6 turns logged against 0 on `main`), and the mouse's motion leaves the choice. There's no speed or memory to measure: per input read it adds one atomic load and a compare, and per carousel frame one atomic store. No render-path work, nothing allocated. Setup: Windows 10, RTX 4090, NVIDIA 617.42; the game-free tests with llvm-mingw clang (Windows) and gcc (Linux); the game in a 1280x720 window, the carousel in Zora's Domain (adult), real input, as Testing says. | | Before: main @ 56823e27 (game: 018dd2ef, same code) | After: this PR @ cdea304c (game: 4c65c239, same Windows code) | |---|---|---| | `tests/test_oot_menu_mouse.py` | 3 checks fail (lines 302, 310, 314) | OK | | `tests/test_input_background.py`, `item-choice-motion` | fails: the stick still 20000 | passes (29 of 29 cases) | | Q held, 3 wheel notches | choice unchanged, 0 turns logged | 3 turns, the choice moves and stops at the end | | Q held, mouse 300 px right then left | the choice runs to the row's end, then its start | the choice stays | ## Risks Only while the item carousel is on screen, on Windows: the mouse's motion no longer moves its choice, and the wheel does. A player who steered the carousel with the mouse now uses the wheel, Q/R with the arrow keys, or a pad. A pad's own right stick is untouched. Everywhere else the mouse is as before, and on Linux the carousel is as on `main`. A revert is enough to undo it. Nothing changes in saves, `longshot_options.ini` or the caches. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxeaZiJchH34JFuUAaobK7
Holding Q (L) or R opens the item carousel. On main the wheel never turns it: the menus' mouse is a screen's only once a
button of it shows focus, and the carousel shows its choice as it opens with none, so its wheel code never runs. The
captured mouse's motion is a pointing right stick while L or R is held, and held over it runs the choice to the row's
end. New cases: a carousel with no focused button still takes the wheel and tells the host each frame it runs
(tests/test_oot_menu_mouse.py), and with the carousel shown the mouse's motion steers nothing, Native or As the stick,
the pointer still taken in (tests/input_background_test.c, through the real read_input). They fail on main.

Two repairs so the files run at all: test_oot_menu_mouse.py gets the host/game_host.h stand-in it has lacked since
#2411 (as in #2962); test_input_background.py's option-4 check ends its slice at the option lambda's own close, not at
a table's inside it, which stopped the file before any of its C cases ran, and links libm on Linux.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZko14Wd421uqCMnFF2
fix(input): the item carousel turns with the mouse wheel, and the mouse's motion no longer throws its choice (#2672)
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
4c65c239c9
Holding Q (L) or R opens the item carousel. Its wheel code (game/oot_menu.c item_choice_tick) never ran: the menus'
mouse goes to a screen with a focused button shown, and the carousel shows its choice as it opens with none. It now
counts whenever it runs, as the map screen's pages do. Each of its frames also tells the host
(hos_mouse_item_choice_shown, host/nn_hid.c), and for 100 ms after one the captured mouse's motion steers nothing:
while L or R is held it is a pointing right stick, and held over that ran the choice to the row's end. The pointer is
still taken in, so it stays held at the window's centre. Native and As the stick alike; Mouse camera Off is unchanged.

tests/test_hold_toggle.py and tests/test_walk_key.py cut the changed code and get a stand-in each. The player guide says
what the wheel and the mouse do in the carousel.

Fixes #2672.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZko14Wd421uqCMnFF2
Author
Contributor

Tested in game: Windows 10, RTX 4090, NVIDIA 617.42, 1280x720 window, a copy of my adult save in Zora's Domain, real input (mouse captured): Q held, then R held. Each wheel notch turned the item carousel (6 turns logged, the choice stopping at the row's end), and 300 px of mouse motion right and left left the choice where it was. Same steps on main (018dd2ef): 0 turns, and the motion threw the choice to the row's end and back to its start. HOS_MENU_TRACE lines and the bridge's shots match.

Tested in game: Windows 10, RTX 4090, NVIDIA 617.42, 1280x720 window, a copy of my adult save in Zora's Domain, real input (mouse captured): Q held, then R held. Each wheel notch turned the item carousel (6 turns logged, the choice stopping at the row's end), and 300 px of mouse motion right and left left the choice where it was. Same steps on main (018dd2ef): 0 turns, and the motion threw the choice to the row's end and back to its start. HOS_MENU_TRACE lines and the bridge's shots match.
Author
Contributor

Linux suite (Ubuntu 22.04 under WSL2, run_all.py --strict), head 4c65c239 against main 495ed9fe: head 828 passed, 88 failed, 10 skipped; main 827 passed, 89 failed, 10 skipped. Nothing fails only on the head; test_input_background fails only on main (the test commit repairs it). The 88 files failing on both: f2i_immediate global_load_16 native_suatom test_blocks_at_start test_bug_report test_cloth_kernels test_cloth_loops test_cloth_sphere test_cloth_step12 test_cloth_step8 test_cloth_step9 test_control_picture test_coop_spirv test_crash_record test_crt_options test_dead_targets_sweep test_default_point_size test_depth_sample_types test_dev_update test_dlss_actor test_dlssg_pace test_draw_parameters test_draw_stream_visibility test_framegen_hdr test_framegen_resources test_fsr3_math test_fsr3_shaders test_fsr3fi_hud_layer test_fsr3fi_hudless_colour test_fsr4_tune test_fsr_uniform_ownership test_game_boundary test_guest_holes test_image_arrays test_image_reaper_threads test_image_view_retry test_keyboard_option test_late_fix_shaders test_lens_eye_pass test_lifter test_linux_pressure test_loaded_modules_drop test_log_levels test_lower_depbar test_lower_lds_after_sts test_lower_register_markers test_menu_keys test_menu_save_atomic test_mesh_fallback_capacity test_mesh_fallback_layout test_mesh_first_types test_mesh_unreachable_outputs test_native_suatom test_nonuniform_image_arrays test_oot_cloth test_oot_occ_raster test_oot_song_inventory test_option_ids test_perf_send test_pipeline_tour test_present_acquire_ahead test_present_image_free test_present_source_crop test_prof_clock test_program_answer_domains test_program_cache_cleanup test_program_cache_one_variant test_reactive_mask test_readback_timeout_reuse test_recording_admission test_reshade_fx test_scene_tonemap_pass test_screensaver test_sim_turf_pools test_spirv_struct_identity test_switch_table test_target_pool_cap test_target_retention test_temporal_present_bandwidth test_tex_desc_memo test_texture_phi_dominance test_thinlto_tls test_unsigned_image_types test_upscaler_round_trip test_vram_compact test_windows_display_startup test_windows_on_linux test_wmma16_spirv_val

Linux suite (Ubuntu 22.04 under WSL2, `run_all.py --strict`), head 4c65c239 against main 495ed9fe: head 828 passed, 88 failed, 10 skipped; main 827 passed, 89 failed, 10 skipped. Nothing fails only on the head; `test_input_background` fails only on main (the test commit repairs it). The 88 files failing on both: f2i_immediate global_load_16 native_suatom test_blocks_at_start test_bug_report test_cloth_kernels test_cloth_loops test_cloth_sphere test_cloth_step12 test_cloth_step8 test_cloth_step9 test_control_picture test_coop_spirv test_crash_record test_crt_options test_dead_targets_sweep test_default_point_size test_depth_sample_types test_dev_update test_dlss_actor test_dlssg_pace test_draw_parameters test_draw_stream_visibility test_framegen_hdr test_framegen_resources test_fsr3_math test_fsr3_shaders test_fsr3fi_hud_layer test_fsr3fi_hudless_colour test_fsr4_tune test_fsr_uniform_ownership test_game_boundary test_guest_holes test_image_arrays test_image_reaper_threads test_image_view_retry test_keyboard_option test_late_fix_shaders test_lens_eye_pass test_lifter test_linux_pressure test_loaded_modules_drop test_log_levels test_lower_depbar test_lower_lds_after_sts test_lower_register_markers test_menu_keys test_menu_save_atomic test_mesh_fallback_capacity test_mesh_fallback_layout test_mesh_first_types test_mesh_unreachable_outputs test_native_suatom test_nonuniform_image_arrays test_oot_cloth test_oot_occ_raster test_oot_song_inventory test_option_ids test_perf_send test_pipeline_tour test_present_acquire_ahead test_present_image_free test_present_source_crop test_prof_clock test_program_answer_domains test_program_cache_cleanup test_program_cache_one_variant test_reactive_mask test_readback_timeout_reuse test_recording_admission test_reshade_fx test_scene_tonemap_pass test_screensaver test_sim_turf_pools test_spirv_struct_identity test_switch_table test_target_pool_cap test_target_retention test_temporal_present_bandwidth test_tex_desc_memo test_texture_phi_dominance test_thinlto_tls test_unsigned_image_types test_upscaler_round_trip test_vram_compact test_windows_display_startup test_windows_on_linux test_wmma16_spirv_val
cuecuemoar changed title from WIP: fix(input): the item carousel turns with the mouse wheel, and the mouse's motion no longer throws its choice to fix(input): the item carousel turns with the mouse wheel, and the mouse's motion no longer throws its choice 2026-12-01 19:01:39 +00:00
Member

Possibly related, for context:

  • PR #616 WIP: feat(input): add mouse item wheels with local icons β€” Open mouse item-wheel work overlaps mouse input handling
Possibly related, for context: - PR #616 WIP: feat(input): add mouse item wheels with local icons β€” Open mouse item-wheel work overlaps mouse input handling
Member
@review
BeanBot left a comment

Recommendation: Request changes. On Linux, the change removes mouse steering of the carousel without providing the wheel control that replaces it on Windows. The new input test also inherits a mouse-mode switch that can make it fail on a developer’s machine.

The change makes the Windows item carousel accept wheel notches without a focused button and suppresses mouse-driven stick movement while the carousel runs. The Windows game run demonstrates the intended fix, but Linux loses an existing way to select items.

Blocking (1): must change before merging.

  1. L1 game/oot_menu.c:874: Linux suppresses mouse steering of the carousel but has no carousel wheel handler. (more on the line) Do: Implement carousel wheel handling on Linux before suppressing its mouse stick, or retain the existing Linux steering until a replacement is available.

Should fix (1): not blocking, but worth doing before merging.

  • L2 tests/test_input_background.py:174: The new case inherits HOS_MOUSE_NATIVE, which overrides the mouse mode set by the fixture. (more on the line) Do: Remove HOS_MOUSE_NATIVE from the case environment, along with any other mouse switches that affect the fixture.

@fix can do L1 and L2.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes on the tested Windows setup: the author reports six wheel turns versus zero on main, and mouse movement no longer changes the selection. Linux gameplay has not been tested, and its wheel handler is absent.

Other systems: The suppression also runs on Linux; Linux does not run the Windows menu wheel handler. Pad stick values are merged before the mouse values are suppressed, so the changed code leaves the pad input intact. Native and As the stick share the suppression when the host routes motion through the stick path.

Switches: None added, changed or removed.

Reviewed: 4c65c239c9 against 495ed9fe2a: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the diff, commit messages and the changed menu and input paths and their surrounding callers. Skimmed the changed tests, player guide and developer standards; the large output for some full-file reads was truncated. docs/review-checklist.md and the adjacent Tooling checkout were absent. No generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • Both commits include AI assistance trailers.
  • The diff adds no game files, generated files, API changes or switches.
  • The pad stick is combined independently of the zeroed mouse contribution.
  • The author reports a Windows game run and before-and-after game-free checks; the reported Linux suite has no head-only failures.

Testing: No code or tests were run during review. The author reports the Windows game run and Linux and Windows game-free checks; CI was still running.

Overlaps and merge order: The pull request identifies #2962 as containing the same test-header repair; its current status and merge order are not available in the supplied evidence.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** On Linux, the change removes mouse steering of the carousel without providing the wheel control that replaces it on Windows. The new input test also inherits a mouse-mode switch that can make it fail on a developer’s machine. The change makes the Windows item carousel accept wheel notches without a focused button and suppresses mouse-driven stick movement while the carousel runs. The Windows game run demonstrates the intended fix, but Linux loses an existing way to select items. **Blocking (1)**: must change before merging. 1. **L1** `game/oot_menu.c:874`: Linux suppresses mouse steering of the carousel but has no carousel wheel handler. (more on the line) **Do:** Implement carousel wheel handling on Linux before suppressing its mouse stick, or retain the existing Linux steering until a replacement is available. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `tests/test_input_background.py:174`: The new case inherits HOS_MOUSE_NATIVE, which overrides the mouse mode set by the fixture. (more on the line) **Do:** Remove HOS_MOUSE_NATIVE from the case environment, along with any other mouse switches that affect the fixture. `@fix` can do L1 and L2. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the tested Windows setup: the author reports six wheel turns versus zero on main, and mouse movement no longer changes the selection. Linux gameplay has not been tested, and its wheel handler is absent. **Other systems:** The suppression also runs on Linux; Linux does not run the Windows menu wheel handler. Pad stick values are merged before the mouse values are suppressed, so the changed code leaves the pad input intact. Native and As the stick share the suppression when the host routes motion through the stick path. **Switches:** None added, changed or removed. **Reviewed:** 4c65c239c95d against 495ed9fe2aaa: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the diff, commit messages and the changed menu and input paths and their surrounding callers. Skimmed the changed tests, player guide and developer standards; the large output for some full-file reads was truncated. docs/review-checklist.md and the adjacent Tooling checkout were absent. No generated files or translations changed.; nothing run (a code review). **Checked and fine:** - Both commits include AI assistance trailers. - The diff adds no game files, generated files, API changes or switches. - The pad stick is combined independently of the zeroed mouse contribution. - The author reports a Windows game run and before-and-after game-free checks; the reported Linux suite has no head-only failures. **Testing:** No code or tests were run during review. The author reports the Windows game run and Linux and Windows game-free checks; CI was still running. **Overlaps and merge order:** The pull request identifies #2962 as containing the same test-header repair; its current status and merge order are not available in the supplied evidence. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
game/oot_menu.c Outdated
@ -861,3 +872,3 @@
hos_input_clear_toggles();
}
void hos_oot_menu_tick(Ctx *c, uint64_t screen) { (void)c; sprint_menu_tick(screen); }
void hos_oot_menu_tick(Ctx *c, uint64_t screen) { (void)c; sprint_menu_tick(screen), item_choice_seen(screen); }
Member

L1 (blocking): Linux suppresses mouse steering of the carousel but has no carousel wheel handler.

When: On Linux, holding L opens the carousel and item_choice_seen notifies the host, so read_input zeros the mouse stick. The Linux menu tick never calls item_choice_tick, and SDL only forwards wheel events to the Insert menu, so turning the wheel cannot select an item either.

Do: Implement carousel wheel handling on Linux before suppressing its mouse stick, or retain the existing Linux steering until a replacement is available.

**L1** (blocking): Linux suppresses mouse steering of the carousel but has no carousel wheel handler. *When:* On Linux, holding L opens the carousel and item_choice_seen notifies the host, so read_input zeros the mouse stick. The Linux menu tick never calls item_choice_tick, and SDL only forwards wheel events to the Insert menu, so turning the wheel cannot select an item either. **Do:** Implement carousel wheel handling on Linux before suppressing its mouse stick, or retain the existing Linux steering until a replacement is available.
@ -171,2 +172,3 @@
"-I" + str(folder), str(ROOT / "tests/input_background_test.c"), "-o", str(exe)])
"-I" + str(folder), str(ROOT / "tests/input_background_test.c"), "-o", str(exe)]
+ ([] if os.name == "nt" else ["-lm"])) # (sqrt, the stick's length: libm is its own library on Linux)
for case in ((a.case,) if a.case else CASES):
Member

L2 (should fix): The new case inherits HOS_MOUSE_NATIVE, which overrides the mouse mode set by the fixture.

When: With HOS_MOUSE_NATIVE=1 in the environment, item-choice-motion starts in Native mode despite setting mouse_mode to As the stick. Its first packet expects mouse stick movement, but the Native path takes it instead, so the test fails.

Do: Remove HOS_MOUSE_NATIVE from the case environment, along with any other mouse switches that affect the fixture.

**L2** (should fix): The new case inherits HOS_MOUSE_NATIVE, which overrides the mouse mode set by the fixture. *When:* With HOS_MOUSE_NATIVE=1 in the environment, item-choice-motion starts in Native mode despite setting mouse_mode to As the stick. Its first packet expects mouse stick movement, but the Native path takes it instead, so the test fails. **Do:** Remove HOS_MOUSE_NATIVE from the case environment, along with any other mouse switches that affect the fixture.
Author
Contributor

Review round (BeanBot's L1, L2): head now cdea304c (test 6a06e395, fix cdea304c), rebased on main 56823e27. Both findings were folded into the two commits.

L1 (game/oot_menu.c), done: only Windows tells the host. item_choice_seen is now inside #if defined(_WIN32), and the Linux hos_oot_menu_tick is back to main's (sprint_menu_tick alone). I checked the cause: host/posix/display_sdl.c hands the wheel only to the Insert menu (if (menu_open) pointer_update(...)), so Linux had no replacement for the mouse's steering. There the carousel is now as on main. A Linux carousel wheel can follow separately; I can't run the game on Linux here. Pin: test_oot_menu_mouse.py's test_the_linux_tick_does_not_tell_the_host is a source check that runs on Linux. It fails against 4c65c239 ('item_choice_seen' unexpectedly found in "#else ...") and passes on cdea304c.

L2 (tests/test_input_background.py), done: the shared environment drops every HOS_MOUSE_* switch, as it already did HOS_INPUT_*. I confirmed it: with HOS_MOUSE_NATIVE=1 exported before the fix, menu-side-buttons, deck-motion and item-choice-motion failed. Now all 29 cases pass with and without it, on Linux and Windows.

Re-run on cdea304c:

  • Windows: test_oot_menu_mouse.py OK (fails at lines 302, 310 and 314 on the test commit). test_input_background.py passes 29 of 29.
  • Linux: test_input_background.py passes 29 of 29 (item-choice-motion FAIL:193 on the test commit). test_hold_toggle, test_walk_key, test_input_movie, test_mouse_stick, test_menu_hooks and the other checks that cut the changed code pass. check_host_compile.py: 119 units, 0 failed, 0 warnings, the same as main.
  • Linux suite, strict (run_all.py --strict), head cdea304c against main 56823e27: head 829 passed, 88 failed, 10 skipped; main 827 passed, 90 failed, 10 skipped. Nothing fails only on the head. Only on main: test_input_background (the test commit repairs it) and test_longshot_ctl (untouched here; it passes on the head).

The game runs in the description (4c65c239) weren't repeated. The Windows code the game runs is unchanged: the function moved inside the #if, and comments changed. main's two new commits (#2969, #2909) touch none of these files.

Review round (BeanBot's L1, L2): head now cdea304c (test 6a06e395, fix cdea304c), rebased on `main` 56823e27. Both findings were folded into the two commits. **L1** (`game/oot_menu.c`), done: only Windows tells the host. `item_choice_seen` is now inside `#if defined(_WIN32)`, and the Linux `hos_oot_menu_tick` is back to `main`'s (`sprint_menu_tick` alone). I checked the cause: `host/posix/display_sdl.c` hands the wheel only to the Insert menu (`if (menu_open) pointer_update(...)`), so Linux had no replacement for the mouse's steering. There the carousel is now as on `main`. A Linux carousel wheel can follow separately; I can't run the game on Linux here. Pin: `test_oot_menu_mouse.py`'s `test_the_linux_tick_does_not_tell_the_host` is a source check that runs on Linux. It fails against 4c65c239 (`'item_choice_seen' unexpectedly found in "#else ..."`) and passes on cdea304c. **L2** (`tests/test_input_background.py`), done: the shared environment drops every `HOS_MOUSE_*` switch, as it already did `HOS_INPUT_*`. I confirmed it: with `HOS_MOUSE_NATIVE=1` exported before the fix, `menu-side-buttons`, `deck-motion` and `item-choice-motion` failed. Now all 29 cases pass with and without it, on Linux and Windows. Re-run on cdea304c: - Windows: `test_oot_menu_mouse.py` OK (fails at lines 302, 310 and 314 on the test commit). `test_input_background.py` passes 29 of 29. - Linux: `test_input_background.py` passes 29 of 29 (`item-choice-motion` `FAIL:193` on the test commit). `test_hold_toggle`, `test_walk_key`, `test_input_movie`, `test_mouse_stick`, `test_menu_hooks` and the other checks that cut the changed code pass. `check_host_compile.py`: 119 units, 0 failed, 0 warnings, the same as `main`. - Linux suite, strict (`run_all.py --strict`), head cdea304c against main 56823e27: head 829 passed, 88 failed, 10 skipped; main 827 passed, 90 failed, 10 skipped. Nothing fails only on the head. Only on `main`: `test_input_background` (the test commit repairs it) and `test_longshot_ctl` (untouched here; it passes on the head). The game runs in the description (4c65c239) weren't repeated. The Windows code the game runs is unchanged: the function moved inside the `#if`, and comments changed. `main`'s two new commits (#2969, #2909) touch none of these files.
cuecuemoar force-pushed fix/carousel-wheel from 4c65c239c9
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to cdea304c15
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 5s
2026-12-02 05:10:23 +00:00
Compare
Owner
@review
BeanBot left a comment

Recommendation: Approve. The Windows carousel wheel and mouse behavior are demonstrated in game, and both earlier issues are fixed. Linux retains its previous steering behavior. Recommend approval; not approved on the forge.

On Windows, the mouse wheel turns the item carousel without mouse motion throwing the choice to an end. The change adds a small cross-thread signal and leaves Linux behavior unchanged.

Since the last review (on 4c65c239c9)
Resolved: L1 (Linux suppresses mouse steering of the carousel but has no carousel wheel handler.); L2 (The new case inherits HOS_MOUSE_NATIVE, which overrides the mouse mode set by the fixture.)

Checks: Still running: 10 checks.

Also noticed (2; not asked for, not blocking)
  • The author still plans an in-game check of a controller's right stick alongside the mouse.
  • CI was still running in the supplied status.
More: does it help, other systems, switches, what was read

Does it help: Yes. The reported Windows game run logged six wheel turns on the PR versus none on main, and mouse movement left the choice in place instead of moving it to the row's ends.

Other systems: Linux no longer sends the carousel signal, so its mouse steering remains as on main. The pad stick is combined separately from the suppressed mouse motion; an in-game pad check remains outstanding. The Windows game run and Linux host compile are reported by the author.

Switches: None added, changed or removed.

Reviewed: cdea304c15 against 56823e27a1: Read the diff, commit list, repository agent and contribution rules, and the relevant platform and environment paths. The full output for the larger changed code and test files was truncated, so those files were not read in full; the player guide, PR template and developer standards were not read in full.; nothing run (a code review).

Checked and fine:

  • The Windows carousel signal remains in the menu tick.
  • The Linux source check covers the platform separation.
  • The fixture removes the environment override before starting its cases.

Testing: No commands from the project were run. The author reports Windows in-game input checks, game-free checks on Windows and Linux, and a Linux host compile.

Overlaps and merge order: The PR description identifies an overlapping test-header repair in #2962; merge order was not established.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The Windows carousel wheel and mouse behavior are demonstrated in game, and both earlier issues are fixed. Linux retains its previous steering behavior. Recommend approval; not approved on the forge. On Windows, the mouse wheel turns the item carousel without mouse motion throwing the choice to an end. The change adds a small cross-thread signal and leaves Linux behavior unchanged. **Since the last review** (on 4c65c239c95d) Resolved: L1 (Linux suppresses mouse steering of the carousel but has no carousel wheel handler.); L2 (The new case inherits HOS_MOUSE_NATIVE, which overrides the mouse mode set by the fixture.) **Checks:** Still running: 10 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The author still plans an in-game check of a controller's right stick alongside the mouse. - CI was still running in the supplied status. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. The reported Windows game run logged six wheel turns on the PR versus none on main, and mouse movement left the choice in place instead of moving it to the row's ends. **Other systems:** Linux no longer sends the carousel signal, so its mouse steering remains as on main. The pad stick is combined separately from the suppressed mouse motion; an in-game pad check remains outstanding. The Windows game run and Linux host compile are reported by the author. **Switches:** None added, changed or removed. **Reviewed:** cdea304c1566 against 56823e27a13a: Read the diff, commit list, repository agent and contribution rules, and the relevant platform and environment paths. The full output for the larger changed code and test files was truncated, so those files were not read in full; the player guide, PR template and developer standards were not read in full.; nothing run (a code review). **Checked and fine:** - The Windows carousel signal remains in the menu tick. - The Linux source check covers the platform separation. - The fixture removes the environment override before starting its cases. **Testing:** No commands from the project were run. The author reports Windows in-game input checks, game-free checks on Windows and Linux, and a Linux host compile. **Overlaps and merge order:** The PR description identifies an overlapping test-header repair in #2962; merge order was not established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/carousel-wheel 2026-12-02 15:10:57 +00:00
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 5s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
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
MagicBeanDev/Longshot!2964
No description provided.