refactor(vk)!: the old menu's leftovers removed; - and = set the mouse sensitivity through the settings #2877

Merged
HumanBean merged 7 commits from HumanBean/Longshot:cleanup/area1-old-menu into mod-api 2026-11-30 18:47:03 +00:00
Owner

Summary

The Insert menu's rows moved to the system mods' mod.toml and the TS menu mod, but the renderer and the host still carried the old C++ menu: #ifndef MENU_LAYOUT_ONLY guards around code that always built (the macro is defined nowhere), empty and write-only modules, 32 Options fields only an applier wrote, helpers only the old rows called, option ids nothing answers, HOS_SETTING's ignored id, MkwVkHost slots no renderer code calls, and host->version gates that can never be false. This deletes them (area 1 of the mod-api cleanup survey, 1a and 1b together). It changes no behaviour except one bug:

  • Fix: the - and = keys did nothing. They called rx_option_set(7, …), which only moved the renderer's opts.mouse_sens (read by nothing); at the next read host/nn_hid.c took the game's value back. They now set system/controls' mouse_sensitivity through game_setting_set, as the flight shortcut does, rounded to the setting's steps of 10 (the game refuses a value off them). A press not at the end moves at least one step (at 10 %, = gives 20 %, where 125 % would round back to 10 %). On main/mod-api: in play with the mouse captured, press =; Controls' Mouse sensitivity stays at 100.

What went, by area:

  • gpu/vk/menu/: the guards; camera, motion, controller_speaker, volume, headset, autosave, detail.cpp; the write-only appliers in menu_settings, controller, gpu, gameplay, threads, audio; apply_preset/apply_auto; output.cpp's walkers; Dlss5Preset.
  • Helpers: upscaler_rows.h's steppers and fixed-stop block, framegen_rows.h down to fixed_top, vk_menu_hit.h down to what the ReShade bar uses, vk_ui_theme.h's prompts, banner, paragraphs, shadows and unused palette, i18n::plural, fmt_into, the transition autosave's dead copy, resolution_auto, mods_now_ns, kMicLevelHelp, env_release; hos_reset_binding, host_guest_alloc.
  • HOS_SETTING(field, otherwise) (49 call sites); every option id but the jitter's and the host's four notices; game/options.h.
  • MkwVkHost: tex_layout, guest_alloc, gyro_status, nfc_dir, reset_binding, rebind_control, binding_is_default, game_settings_generation, game_setting_text, game_setting_hint (MKWVK_API_VERSION 82); vk_host filled with designated initialisers (every member maps to the function it did); the game's exports only those named (game_settings_generation, game_setting_hint, game_camera_scale, game_movie_age).
  • The host->version >= N gates: the renderer takes a host of its own version only (vk_main.cpp init_body), as architecture.md already said.
  • Website: the settings table's restart wording for Upscaler and Frame generation by matches their declarations (they change at once; only with Streamline running DLSS FG does a change wait for the next start); Volume and the Simulated turf link have help. The settings page reads the mods' declarations and the menu mod's own layout (view.ts laidOut) instead of parsing C++ rows that no longer exist.
  • Docs: architecture.md's Insert menu part and AGENTS.md's menu rule describe settings declared in system mods.

Kept, being live: hos_rebind_control, hos_binding_is_default, hos_sdl_gyro_status, hos_nfc_dir, hos_guest_word (the game's Rust calls them); game_setting_text/_row/_get/_set (host and renderer); upscaler_rows.h's step tables (snap, Auto's tuning); Map/Hit for the ReShade comparison bar; aspect_started; kTierResolution.

Read first: host/nn_hid.c mouse_sens_set, host/game_settings.h, gpu/vk/vk_api.h's ids, host/rx_backend.c vk_host, tests/area_settings.py, tests/vk_host_members.py.

See #2822.

Testing

Tested: in the game on this PC (Linux, RTX 3090), a pack and runtime of this branch on cb37f5ab (rebased since onto 12f42db5, #2861: the conflicts were docs, layout.ts and a website test's expected order, no C/C++), under gamescope: reached play from kokiri-start; the control bridge read mouse_sensitivity 100, after = 130, after - - 80 (option get); Insert opened the menu on Graphics (menu_open: true, hosted system/menu). Game-free: tests/run_all.py 834 passed, 3 failed; test_lifter.py fails on mod-api@origin too, test_drs.py and test_stick_inversion_rest.py were this branch's and are fixed (re-run through the queue: all three pass). cargo test/clippy -D warnings/fmt --check on longshot-game: pass. Windows: renderer dev compile --only renderer with llvm-mingw: pass; host C with llvm-mingw: 79 of 80 units, host/nn_video.c failing on libavcodec/avcodec.h not found (FFmpeg not on this PC's Windows tools; the file is untouched). tests/test_mouse_settings.py runs mouse_sens_keys over a stand-in game that refuses off-step values: it fails on mod-api@origin ("- and = hand the sensitivity to the renderer…") and on each mutation (off the steps, 70 % for -, another key, the call removed). Its ends case (10 % = gives 20 %, 20 % - gives 10 %) fails at 95dcd124 and passes at 433d3b2b, with gcc and clang (--cc now defaults from CC); host/nn_hid.c at 433d3b2b passes -fsyntax-only with llvm-mingw and gcc. Every rewritten check was run against its mutation. Website (after the rebase): node --test 97 pass, 1 fail (publication.test.ts, a fixture unrelated to this); astro build passes; check-site.ts passes (the Debug tab's ammunition lines reworded to name no game items).

Still to test:

  • Windows: the game starts, the menu opens and =/- change Mouse sensitivity (@Beanstalk smoke on Windows NVIDIA).

Measurements

Nothing to measure: deletions, and a fix shown by its test above.

Risks

A renderer and host from different commits no longer start together (82), as before for any layout change. Input recordings name settings by the declarations' legacyIds, which this does not touch (test_option_ids.py now holds them distinct). Players notice only that - and = work, in steps of 10 %. A revert is enough.

Checklist

Ready for review

  • One topic, on current mod-api; 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): test_lifter.py fails on mod-api@origin too.
  • 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.
  • MKWVK_API_VERSION bumped (MkwVkHost or MkwVkRenderer in gpu/vk/vk_api.h changed).
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows host: every unit compiles at this head with the pinned FFmpeg 9.0.2 headers from tools.lock, queue job ffm-hostwin2)
  • 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_016o1k1SQVyAWsujjFVd8Wuc

## Summary The Insert menu's rows moved to the system mods' `mod.toml` and the TS menu mod, but the renderer and the host still carried the old C++ menu: `#ifndef MENU_LAYOUT_ONLY` guards around code that always built (the macro is defined nowhere), empty and write-only modules, 32 `Options` fields only an applier wrote, helpers only the old rows called, option ids nothing answers, `HOS_SETTING`'s ignored id, `MkwVkHost` slots no renderer code calls, and `host->version` gates that can never be false. This deletes them (area 1 of the mod-api cleanup survey, 1a and 1b together). It changes no behaviour except one bug: - **Fix: the `-` and `=` keys did nothing.** They called `rx_option_set(7, …)`, which only moved the renderer's `opts.mouse_sens` (read by nothing); at the next read `host/nn_hid.c` took the game's value back. They now set `system/controls`' `mouse_sensitivity` through `game_setting_set`, as the flight shortcut does, rounded to the setting's steps of 10 (the game refuses a value off them). A press not at the end moves at least one step (at 10 %, `=` gives 20 %, where 125 % would round back to 10 %). On `main`/mod-api: in play with the mouse captured, press `=`; Controls' Mouse sensitivity stays at 100. What went, by area: - `gpu/vk/menu/`: the guards; `camera`, `motion`, `controller_speaker`, `volume`, `headset`, `autosave`, `detail`.cpp; the write-only appliers in `menu_settings`, `controller`, `gpu`, `gameplay`, `threads`, `audio`; `apply_preset`/`apply_auto`; `output.cpp`'s walkers; `Dlss5Preset`. - Helpers: `upscaler_rows.h`'s steppers and fixed-stop block, `framegen_rows.h` down to `fixed_top`, `vk_menu_hit.h` down to what the ReShade bar uses, `vk_ui_theme.h`'s prompts, banner, paragraphs, shadows and unused palette, `i18n::plural`, `fmt_into`, the transition autosave's dead copy, `resolution_auto`, `mods_now_ns`, `kMicLevelHelp`, `env_release`; `hos_reset_binding`, `host_guest_alloc`. - `HOS_SETTING(field, otherwise)` (49 call sites); every option id but the jitter's and the host's four notices; `game/options.h`. - `MkwVkHost`: `tex_layout`, `guest_alloc`, `gyro_status`, `nfc_dir`, `reset_binding`, `rebind_control`, `binding_is_default`, `game_settings_generation`, `game_setting_text`, `game_setting_hint` (`MKWVK_API_VERSION` 82); `vk_host` filled with designated initialisers (every member maps to the function it did); the game's exports only those named (`game_settings_generation`, `game_setting_hint`, `game_camera_scale`, `game_movie_age`). - The `host->version >= N` gates: the renderer takes a host of its own version only (`vk_main.cpp` `init_body`), as architecture.md already said. - Website: the settings table's restart wording for Upscaler and Frame generation by matches their declarations (they change at once; only with Streamline running DLSS FG does a change wait for the next start); Volume and the Simulated turf link have help. The settings page reads the mods' declarations and the menu mod's own layout (`view.ts` `laidOut`) instead of parsing C++ rows that no longer exist. - Docs: architecture.md's Insert menu part and AGENTS.md's menu rule describe settings declared in system mods. Kept, being live: `hos_rebind_control`, `hos_binding_is_default`, `hos_sdl_gyro_status`, `hos_nfc_dir`, `hos_guest_word` (the game's Rust calls them); `game_setting_text`/`_row`/`_get`/`_set` (host and renderer); `upscaler_rows.h`'s step tables (`snap`, Auto's tuning); `Map`/`Hit` for the ReShade comparison bar; `aspect_started`; `kTierResolution`. Read first: `host/nn_hid.c` `mouse_sens_set`, `host/game_settings.h`, `gpu/vk/vk_api.h`'s ids, `host/rx_backend.c` `vk_host`, `tests/area_settings.py`, `tests/vk_host_members.py`. See #2822. ## Testing **Tested:** in the game on this PC (Linux, RTX 3090), a pack and runtime of this branch on cb37f5ab (rebased since onto 12f42db5, #2861: the conflicts were docs, `layout.ts` and a website test's expected order, no C/C++), under gamescope: reached play from kokiri-start; the control bridge read `mouse_sensitivity` 100, after `=` 130, after `-` `-` 80 (`option get`); Insert opened the menu on Graphics (`menu_open: true`, hosted `system/menu`). Game-free: `tests/run_all.py` 834 passed, 3 failed; `test_lifter.py` fails on mod-api@origin too, `test_drs.py` and `test_stick_inversion_rest.py` were this branch's and are fixed (re-run through the queue: all three pass). `cargo test`/`clippy -D warnings`/`fmt --check` on `longshot-game`: pass. Windows: renderer `dev compile --only renderer` with llvm-mingw: pass; host C with llvm-mingw: 79 of 80 units, `host/nn_video.c` failing on `libavcodec/avcodec.h` not found (FFmpeg not on this PC's Windows tools; the file is untouched). `tests/test_mouse_settings.py` runs `mouse_sens_keys` over a stand-in game that refuses off-step values: it fails on mod-api@origin ("- and = hand the sensitivity to the renderer…") and on each mutation (off the steps, 70 % for `-`, another key, the call removed). Its ends case (10 % `=` gives 20 %, 20 % `-` gives 10 %) fails at 95dcd124 and passes at 433d3b2b, with gcc and clang (`--cc` now defaults from `CC`); `host/nn_hid.c` at 433d3b2b passes `-fsyntax-only` with llvm-mingw and gcc. Every rewritten check was run against its mutation. Website (after the rebase): `node --test` 97 pass, 1 fail (`publication.test.ts`, a fixture unrelated to this); `astro build` passes; `check-site.ts` passes (the Debug tab's ammunition lines reworded to name no game items). **Still to test:** - Windows: the game starts, the menu opens and `=`/`-` change Mouse sensitivity (`@Beanstalk` smoke on Windows NVIDIA). ## Measurements Nothing to measure: deletions, and a fix shown by its test above. ## Risks A renderer and host from different commits no longer start together (82), as before for any layout change. Input recordings name settings by the declarations' `legacyId`s, which this does not touch (`test_option_ids.py` now holds them distinct). Players notice only that `-` and `=` work, in steps of 10 %. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `mod-api`; 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): `test_lifter.py` fails on mod-api@origin too. - [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] `MKWVK_API_VERSION` bumped (`MkwVkHost` or `MkwVkRenderer` in `gpu/vk/vk_api.h` changed). - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows host: every unit compiles at this head with the pinned FFmpeg 9.0.2 headers from tools.lock, queue job ffm-hostwin2) - [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_016o1k1SQVyAWsujjFVd8Wuc
The menu's rows are the system mods' settings now; what the C++ menu left behind is deleted:
- the MENU_LAYOUT_ONLY guards (defined nowhere), the empty and write-only modules (camera, motion,
  controller_speaker, volume, headset, autosave, detail), 32 Options fields only an applier wrote,
  and the helpers only the old rows called (upscaler_rows.h's steppers and its fixed-stop block,
  framegen_rows.h but fixed_top, vk_menu_hit.h's sliders, drag and row clicks, vk_ui_theme.h's
  prompts, banner, paragraphs and unused palette, apply_preset/apply_auto, output.cpp's walkers,
  Dlss5Preset, i18n::plural, fmt_into, the transition autosave's dead copy, hos_reset_binding);
- HOS_SETTING's ignored id argument; every option id nothing answers, and game/options.h;
- the MkwVkHost slots with no renderer caller (tex_layout, guest_alloc, gyro_status, nfc_dir,
  reset_binding, rebind_control, binding_is_default, game_settings_generation, game_setting_text,
  game_setting_hint; MKWVK_API_VERSION 82), vk_host filled with designated initialisers, and the game's exports only they
  named (game_settings_generation, game_setting_hint, game_camera_scale, game_movie_age);
- the host->version gates: the renderer takes a host of its own version only (vk_main.cpp).

fix(input): the - and = keys set system/controls' mouse_sensitivity (game_setting_set, on its steps of
10), as the flight shortcut does; they called rx_option_set(7), which only moved a renderer copy
nothing read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Checks of deleted helpers go with them; stand-ins key HOS_SETTING by field, vk_host checks ask
that each member is set to its function, test_option_ids holds the remaining ids and the system
mods' legacyIds distinct, and test_mouse_settings runs the - and = keys over a fake
game_setting_set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs: the Insert menu as it is now; the website reads the settings' declarations
All checks were successful
PR description / Title and description (pull_request_target) Successful in 9s
3e9fd5f6ce
architecture.md's menu part and AGENTS.md's rule describe settings declared in system mods, not
MENU_MODULE rows; the website's settings page reads the mods' declarations and the menu mod's
layout, not C++ rows that no longer exist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #2861 refactor(menu): each row goes where its place says; layout.ts keeps tabs, pages, headings and links — Continues menu cleanup after moving rows to mod declarations
  • PR #1774 refactor(menu): every Insert menu row in a feature module, built through a menu model (#1633) — Original extraction of Insert menu modules and model
Possibly related, for context: - PR #2861 refactor(menu): each row goes where its place says; layout.ts keeps tabs, pages, headings and links — Continues menu cleanup after moving rows to mod declarations - PR #1774 refactor(menu): every Insert menu row in a feature module, built through a menu model (#1633) — Original extraction of Insert menu modules and model
HumanBean force-pushed cleanup/area1-old-menu from 3e9fd5f6ce
All checks were successful
PR description / Title and description (pull_request_target) Successful in 9s
to 45b9f6ae66
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
2026-11-30 06:39:37 +00:00
Compare
Author
Owner

Rebased onto mod-api cb37f5ab; game run passed (RTX 3090, Linux): play reached, mouse sensitivity 100 → 130 (=) → 80 (- twice) read over the bridge, menu opened. Website drift fixed (restart column, volume and turf help).

Rebased onto mod-api cb37f5ab; game run passed (RTX 3090, Linux): play reached, mouse sensitivity 100 → 130 (=) → 80 (- twice) read over the bridge, menu opened. Website drift fixed (restart column, volume and turf help).
docs(user): the Debug tab's ammunition lines name no game items
All checks were successful
PR description / Title and description (pull_request_target) Successful in 5s
c56d4cbc0f
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

The Debug tab's ammunition lines in graphics-and-controls.md no longer name game items, so the site check passes (21 pages).

The Debug tab's ammunition lines in graphics-and-controls.md no longer name game items, so the site check passes (21 pages).
HumanBean force-pushed cleanup/area1-old-menu from c56d4cbc0f
All checks were successful
PR description / Title and description (pull_request_target) Successful in 5s
to 95dcd12470
All checks were successful
PR description / Title and description (pull_request_target) Successful in 9s
2026-11-30 08:34:29 +00:00
Compare
Author
Owner

Rebased onto mod-api 12f42db5 (#2861): conflicts only in docs, layout.ts and a website test; light checks pass.

Rebased onto mod-api 12f42db5 (#2861): conflicts only in docs, layout.ts and a website test; light checks pass.
Author
Owner

Windows host compile (llvm-mingw, with tools.lock's FFmpeg 9.0.2 headers): every host unit compiles at this head; box ticked.

Windows host compile (llvm-mingw, with tools.lock's FFmpeg 9.0.2 headers): every host unit compiles at this head; box ticked.
HumanBean changed title from WIP: refactor(vk)!: the old menu's leftovers removed; - and = set the mouse sensitivity through the settings to refactor(vk)!: the old menu's leftovers removed; - and = set the mouse sensitivity through the settings 2026-11-30 11:48:24 +00:00
BeanBot left a comment

Recommendation: Request changes. At the lowest sensitivity, = rounds back to the same value, so the shortcut cannot raise it. The pull request also combines a fix with a refactor, contrary to the repository’s one-topic rule.

The change removes the old renderer menu code and routes mouse-sensitivity shortcuts through the game’s settings. The cleanup reduces dead code, but the shortcut has a lower-bound regression and the change spans a large host and renderer interface.

Blocking (2): must change before merging.

  1. L1 host/nn_hid.c:125: Rounding the multiplicative shortcut to the nearest step can leave it at the same value even though the key asks to change it. (more on the line) Do: When a shortcut is not already at the relevant bound, ensure rounding advances at least one 10% step in the requested direction, and cover both cases in the behavioral test.
  2. L2 host/nn_hid.c:126: The mouse shortcut fix is combined with the old-menu refactor, although the repository’s code rules require a fix and a refactor to be separate changes. (more on the line) Do: Separate the shortcut fix and the menu cleanup into focused pull requests, with the necessary ordering between them.

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

  • L3 tests/test_mouse_settings.py:133: The new test defaults directly to gcc instead of honoring CC when invoked on its own. (more on the line) Do: Default --cc from CC, with the repository’s normal compiler fallback.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4: The Windows game smoke run listed as still to test has not been reported. When: The Windows host and renderer compile, but that does not show that their revised interface starts the game and accepts the sensitivity shortcuts. Do: Run the game on Windows, open the menu, and verify = and - change Mouse sensitivity.

@fix can do L1, L2 and L3.

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

Does it help: Yes, for the tested values: the reported Linux game run changed sensitivity from 100 to 130 with =, then to 80 with two presses of -. The fix does not work at every supported value: at 10, = leaves it at 10.

Other systems: The host and renderer ABI changes affect both Windows and Linux and all GPU vendors. The reported in-game run covers Linux on an RTX 3090; the Windows host and renderer compiled, but the Windows game smoke run and other Tier 1 hardware runs remain outstanding.

Switches: No switches added, changed or removed.

Reviewed: 95dcd12470 against 12f42db5c1: Read AGENTS.md, CONTRIBUTING.md, the PR template and standards; docs/review-checklist.md is absent. Read the commits and inspected the input fix, settings interface, selected renderer cleanup, Rust changes and website settings parser. The remaining changed files, tests, translations and generated-file implications were not all read in full, so this review is incomplete.; nothing run (a code review).

Checked and fine:

  • MKWVK_API_VERSION is bumped from 81 to 82 for the host interface change.
  • The listed commits carry AI-assistance trailers.
  • The reported Linux game run demonstrates the shortcut for the values it exercised.

Testing: No commands that build or run project code were executed, as requested. The review relies on the author’s reported runs and the supplied CI results.

Overlaps and merge order: Not checked; network access was excluded.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** At the lowest sensitivity, `=` rounds back to the same value, so the shortcut cannot raise it. The pull request also combines a fix with a refactor, contrary to the repository’s one-topic rule. The change removes the old renderer menu code and routes mouse-sensitivity shortcuts through the game’s settings. The cleanup reduces dead code, but the shortcut has a lower-bound regression and the change spans a large host and renderer interface. **Blocking (2)**: must change before merging. 1. **L1** `host/nn_hid.c:125`: Rounding the multiplicative shortcut to the nearest step can leave it at the same value even though the key asks to change it. (more on the line) **Do:** When a shortcut is not already at the relevant bound, ensure rounding advances at least one 10% step in the requested direction, and cover both cases in the behavioral test. 2. **L2** `host/nn_hid.c:126`: The mouse shortcut fix is combined with the old-menu refactor, although the repository’s code rules require a fix and a refactor to be separate changes. (more on the line) **Do:** Separate the shortcut fix and the menu cleanup into focused pull requests, with the necessary ordering between them. **Should fix (1)**: not blocking, but worth doing before merging. - **L3** `tests/test_mouse_settings.py:133`: The new test defaults directly to `gcc` instead of honoring `CC` when invoked on its own. (more on the line) **Do:** Default `--cc` from `CC`, with the repository’s normal compiler fallback. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4**: The Windows game smoke run listed as still to test has not been reported. *When:* The Windows host and renderer compile, but that does not show that their revised interface starts the game and accepts the sensitivity shortcuts. **Do:** Run the game on Windows, open the menu, and verify `=` and `-` change Mouse sensitivity. `@fix` can do L1, L2 and L3. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes, for the tested values: the reported Linux game run changed sensitivity from 100 to 130 with `=`, then to 80 with two presses of `-`. The fix does not work at every supported value: at 10, `=` leaves it at 10. **Other systems:** The host and renderer ABI changes affect both Windows and Linux and all GPU vendors. The reported in-game run covers Linux on an RTX 3090; the Windows host and renderer compiled, but the Windows game smoke run and other Tier 1 hardware runs remain outstanding. **Switches:** No switches added, changed or removed. **Reviewed:** 95dcd12470a1 against 12f42db5c145: Read AGENTS.md, CONTRIBUTING.md, the PR template and standards; docs/review-checklist.md is absent. Read the commits and inspected the input fix, settings interface, selected renderer cleanup, Rust changes and website settings parser. The remaining changed files, tests, translations and generated-file implications were not all read in full, so this review is incomplete.; nothing run (a code review). **Checked and fine:** - MKWVK_API_VERSION is bumped from 81 to 82 for the host interface change. - The listed commits carry AI-assistance trailers. - The reported Linux game run demonstrates the shortcut for the values it exercised. **Testing:** No commands that build or run project code were executed, as requested. The review relies on the author’s reported runs and the supplied CI results. **Overlaps and merge order:** Not checked; network access was excluded. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -123,0 +122,4 @@
replaced by it again at a later start */
static void mouse_sens_set(double sens) {
/* (on the setting's steps, 10 to 500 in tens: game/mods/controls/mod.toml; the game refuses a value off them) */
const long percent = lround(sens * 10) * 10;
Member

L1 (blocking): Rounding the multiplicative shortcut to the nearest step can leave it at the same value even though the key asks to change it.

When: With Mouse sensitivity at its minimum of 10%, = computes 12.5%, which rounds back to 10%; repeated presses can never increase it. At 20%, - similarly rounds 16% back to 20%.

Do: When a shortcut is not already at the relevant bound, ensure rounding advances at least one 10% step in the requested direction, and cover both cases in the behavioral test.

**L1** (blocking): Rounding the multiplicative shortcut to the nearest step can leave it at the same value even though the key asks to change it. *When:* With Mouse sensitivity at its minimum of 10%, `=` computes 12.5%, which rounds back to 10%; repeated presses can never increase it. At 20%, `-` similarly rounds 16% back to 20%. **Do:** When a shortcut is not already at the relevant bound, ensure rounding advances at least one 10% step in the requested direction, and cover both cases in the behavioral test.
@ -123,0 +123,4 @@
static void mouse_sens_set(double sens) {
/* (on the setting's steps, 10 to 500 in tens: game/mods/controls/mod.toml; the game refuses a value off them) */
const long percent = lround(sens * 10) * 10;
game_setting_set("mouse_sensitivity", percent < 10 ? 10 : percent > 500 ? 500 : (int)percent);
Member

L2 (blocking): The mouse shortcut fix is combined with the old-menu refactor, although the repository’s code rules require a fix and a refactor to be separate changes.

When: This pull request changes shortcut behavior while also deleting the menu modules and changing the host-renderer ABI, so neither topic can be reviewed or reverted independently.

Do: Separate the shortcut fix and the menu cleanup into focused pull requests, with the necessary ordering between them.

**L2** (blocking): The mouse shortcut fix is combined with the old-menu refactor, although the repository’s code rules require a fix and a refactor to be separate changes. *When:* This pull request changes shortcut behavior while also deleting the menu modules and changing the host-renderer ABI, so neither topic can be reviewed or reverted independently. **Do:** Separate the shortcut fix and the menu cleanup into focused pull requests, with the necessary ordering between them.
@ -37,2 +132,2 @@
if "HOS_SETTING(mouse_sensitivity, 7, 100)" not in keys or "rx_option_set(7," not in keys:
raise SystemExit("- and = do not change the menu's sensitivity")
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--cc", default="gcc")
Member

L3 (should fix): The new test defaults directly to gcc instead of honoring CC when invoked on its own.

When: On a supported developer setup with Clang selected through CC and no gcc executable, running this test directly fails before checking the fix.

Do: Default --cc from CC, with the repository’s normal compiler fallback.

**L3** (should fix): The new test defaults directly to `gcc` instead of honoring `CC` when invoked on its own. *When:* On a supported developer setup with Clang selected through `CC` and no `gcc` executable, running this test directly fails before checking the fix. **Do:** Default `--cc` from `CC`, with the repository’s normal compiler fallback.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc
fix(input): - and = move the mouse sensitivity at least one step unless at its end
All checks were successful
PR description / Title and description (pull_request_target) Successful in 7s
433d3b2b73
At 10%, = asked for 12.5%, which rounded back to 10%, so the key could never raise it (and - at 20% likewise).

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

L1: fixed in 433d3b2b. A press not at the end now moves at least one 10 % step (10 % = gives 20 %, 20 % - gives 10 %). The test commit 2b1131e4 covers both ends and fails without the fix.
L2: kept together. The cleanup deletes the old renderer option path (rx_option_set to opts.mouse_sens) that the keys called, so the keys must move to game_setting_set in the same change. A fix-only PR first would have to rewrite the same code the cleanup removes.
L3: fixed, --cc defaults from CC, then gcc.
L4: still to test on Windows, as the description says.

L1: fixed in 433d3b2b. A press not at the end now moves at least one 10 % step (10 % `=` gives 20 %, 20 % `-` gives 10 %). The test commit 2b1131e4 covers both ends and fails without the fix. L2: kept together. The cleanup deletes the old renderer option path (`rx_option_set` to `opts.mouse_sens`) that the keys called, so the keys must move to `game_setting_set` in the same change. A fix-only PR first would have to rewrite the same code the cleanup removes. L3: fixed, `--cc` defaults from `CC`, then gcc. L4: still to test on Windows, as the description says.
HumanBean merged commit 7349a82130 into mod-api 2026-11-30 18:47:03 +00:00
HumanBean deleted branch cleanup/area1-old-menu 2026-11-30 18:47:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!2877
No description provided.