WIP: feat(menu): number rows step by 1, a long hold by their own steps #1294

Draft
kendowashere wants to merge 1 commit from kendowashere/Longshot:feat/menu-fine-steps into main
First-time contributor

Type: feat · Risk: low · Tested on: Windows 11, RTX 5070 Ti, DualSense · Needs: Linux, any GPU

Why

The Insert menu's number rows move in coarse steps: Field of view and Volume by 5, Sharpness and Mouse sensitivity by 10, Camera speed and Rumble strength by 25, HDR peak brightness by 100. A player who wants 97% field of view or 80% camera speed can't pick it. Players asked for steps of 1 (issue #710 asks it for the stick dead zone, which a separate pull request makes a percentage row). This makes every number row take steps of 1, and keeps a long scale quick to cross.

What changed

A number row (a scale of more than two values whose step is above 1) moves by 1 for a tap of an arrow and for the first 1.5 s it is held, the repeat's slow part. Held longer, the repeat's fast part, it moves by the row's own step, to the next of its steps counted from the row's low end (52 → 55 → 60 on Volume), so HDR peak brightness's 400 to 4000 still takes seconds, not minutes. Rows of step 1 and two-value rows are unchanged. The rows' definitions are unchanged: their step stays the coarse one, so nothing that reads a row's step changes.

  • gpu/vk/vk_menu.cpp:
    • row_next(r, dir, fast): the value one press away, before set_row's ends (which still stop or wrap as before).
    • arrow_held_ns[5]: kept by menu_tick's existing repeat (how long each arrow is held).
    • arrow_fast(dir): whether that arrow is past 1.5 s.
    • Both places a Left or Right press changes a row (the tabs, and the Controls page's own rows) go through row_next.
    • The value column's width also measures the value just under each step, which a 1 between steps can make wider (88% against 90%).
    • rumble_step keeps an options file's Rumble strength within 0 to 150 instead of rounding it to 25, so a value the arrows picked survives the next start.
  • README.md: each number row's choices say "in steps of 1 (N while held)", and a line above the table says how the arrows step.
  • Tests:
    • tests/test_menu_fine_steps.py (new): see Testing.
    • tests/test_rumble_menu.py: a tap moves 1, a long hold moves to the next 25, an options file's value is kept. Its stand-ins also gain framegen_by_dlss_offered, which set_row calls since main's frame generation rows; without it the check failed to compile on main too.
    • tests/test_camera_speed.py: the README row's new text.
    • tests/test_menu_text_field.py: arrow_held_ns in its stand-ins.

Measurements

Verdict: nothing to measure: a menu input change; the repeat keeps one more number per arrow.

Flags and settings

No new row, switch or build flag. The number rows' steps change as the README's table now says.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
The number rows' arrows Field of view, Volume, Sharpness, Mouse sensitivity, Camera speed, Rumble strength, Walk speed, Motion sensitivity X/Y, HDR paper white, peak brightness and contrast their step (5 to 100) 1; their step once held past 1.5 s Any value can be picked Helps: players who want an exact value -

Testing

Tested:

  • Game-free:
    • tests/test_menu_fine_steps.py (new) cuts row_next and the Row struct out of vk_menu.cpp, compiles them with a C++ compiler and runs them: a tap moves 1; a long hold goes to the next step from the row's low end in either direction (Volume, Mouse sensitivity from 10, HDR peak brightness); a step-1 row and a two-value row are unchanged; the ends are set_row's.
    • It also checks that both arrow sites go through row_next, that the repeat keeps the hold's length, that the whole steps start at 1.5 s, that an options file's Rumble strength is no longer rounded, and that the README's rows give their steps of 1. It fails with a tap moving the row's whole step (tried).
    • python -I -B tests/run_all.py on this branch (bf885f8f) on main @ f88e6e3a, against a clean main @ f88e6e3a on this PC run at the same time: every failure here also fails on main: test_auto_handheld, test_bug_report_defaults, test_cpu_report, test_crash_dialog, test_crt_options, test_damage_debug_menu, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_framegen_preset, test_fsr_uniform_ownership, test_guest_imported, test_hud_layout_row, test_import_reach, test_invalidate_vcore, test_job_queue, test_linux_preflight, test_linux_pressure, test_menu_i18n, test_mirror_budget, test_missing_nup, test_pads_after_menu, test_parallel_init_order, test_pending_guest_import, test_perf_report, test_pipeline_play_cache, test_portable_builder_home, test_portable_builder_startup, test_present_thread, test_profiling_mode, test_readback_timeout_source, test_recorder_sync, test_replay_write_order, test_run_all_changed, test_slow_frames, test_staging_burst, test_target_image_pool, test_tested_configurations, test_upscaler_round_trip, test_upscaler_rows, test_vcore_escape, test_vk_occlusion_queries, test_walk_key. test_rumble_menu, which fails to compile on main, passes here.
  • In the game: Windows 11 Pro, GeForce RTX 5070 Ti, a DualSense through SDL, a pack of this change on an earlier main (6c9edffe), together with my other branches. Tapping Field of view and Volume moves them by 1, and holding speeds up to their old steps; it works as intended.

Not tested: a run of this exact commit on current main in the game (it was run on an earlier main; the menu code it changes is the same); Linux and Steam Deck (no platform code changes).

Must be tested:

  • Linux, any GPU (the Test Farm): build this branch and start the game, expecting it to build and start and the Insert menu's Field of view to move by 1 a press.
  • Any platform, by hand: Insert menu, Gameplay, Field of view: tap Right, expecting 101%; hold Right for two seconds, expecting it to speed up and land on multiples of 5; restart the game, expecting the value kept.

Risks

What could break: a row with a step above 1 whose values between steps mean nothing would now accept them. Every such row is a number (the twelve above), and their text functions print any value. An options file's Rumble strength is no longer rounded to 25: a hand-edited 60 stays 60 (the rumble is a percentage).

Turning it off: revert the commit.

Compatibility: the options file is unchanged, and older files load as before. No caches, no API change, nothing for the player's build to translate again.

Issues

See #710 (the stick dead zone's own percentage row is a separate pull request).

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Open: built and run on Windows; gpu/vk/vk_menu.cpp not built for Linux here.)
  • Docs updated.
**Type:** feat · **Risk:** low · **Tested on:** Windows 11, RTX 5070 Ti, DualSense · **Needs:** Linux, any GPU ## Why The Insert menu's number rows move in coarse steps: Field of view and Volume by 5, Sharpness and Mouse sensitivity by 10, Camera speed and Rumble strength by 25, HDR peak brightness by 100. A player who wants 97% field of view or 80% camera speed can't pick it. Players asked for steps of 1 (issue #710 asks it for the stick dead zone, which a separate pull request makes a percentage row). This makes every number row take steps of 1, and keeps a long scale quick to cross. ## What changed A number row (a scale of more than two values whose step is above 1) moves by **1** for a tap of an arrow and for the first 1.5 s it is held, the repeat's slow part. Held longer, the repeat's fast part, it moves by the row's own step, to the next of its steps counted from the row's low end (52 → 55 → 60 on Volume), so HDR peak brightness's 400 to 4000 still takes seconds, not minutes. Rows of step 1 and two-value rows are unchanged. The rows' definitions are unchanged: their step stays the coarse one, so nothing that reads a row's step changes. - `gpu/vk/vk_menu.cpp`: - `row_next(r, dir, fast)`: the value one press away, before `set_row`'s ends (which still stop or wrap as before). - `arrow_held_ns[5]`: kept by `menu_tick`'s existing repeat (how long each arrow is held). - `arrow_fast(dir)`: whether that arrow is past 1.5 s. - Both places a Left or Right press changes a row (the tabs, and the Controls page's own rows) go through `row_next`. - The value column's width also measures the value just under each step, which a 1 between steps can make wider (88% against 90%). - `rumble_step` keeps an options file's Rumble strength within 0 to 150 instead of rounding it to 25, so a value the arrows picked survives the next start. - `README.md`: each number row's choices say "in steps of 1 (N while held)", and a line above the table says how the arrows step. - Tests: - `tests/test_menu_fine_steps.py` (new): see Testing. - `tests/test_rumble_menu.py`: a tap moves 1, a long hold moves to the next 25, an options file's value is kept. Its stand-ins also gain `framegen_by_dlss_offered`, which `set_row` calls since main's frame generation rows; without it the check failed to compile on `main` too. - `tests/test_camera_speed.py`: the README row's new text. - `tests/test_menu_text_field.py`: `arrow_held_ns` in its stand-ins. ## Measurements **Verdict:** nothing to measure: a menu input change; the repeat keeps one more number per arrow. ### Flags and settings No new row, switch or build flag. The number rows' steps change as the README's table now says. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | The number rows' arrows | Field of view, Volume, Sharpness, Mouse sensitivity, Camera speed, Rumble strength, Walk speed, Motion sensitivity X/Y, HDR paper white, peak brightness and contrast | their step (5 to 100) | 1; their step once held past 1.5 s | Any value can be picked | Helps: players who want an exact value | - | ## Testing **Tested:** - Game-free: - `tests/test_menu_fine_steps.py` (new) cuts `row_next` and the `Row` struct out of `vk_menu.cpp`, compiles them with a C++ compiler and runs them: a tap moves 1; a long hold goes to the next step from the row's low end in either direction (Volume, Mouse sensitivity from 10, HDR peak brightness); a step-1 row and a two-value row are unchanged; the ends are `set_row`'s. - It also checks that both arrow sites go through `row_next`, that the repeat keeps the hold's length, that the whole steps start at 1.5 s, that an options file's Rumble strength is no longer rounded, and that the README's rows give their steps of 1. It fails with a tap moving the row's whole step (tried). - `python -I -B tests/run_all.py` on this branch (bf885f8f) on `main` @ f88e6e3a, against a clean `main` @ f88e6e3a on this PC run at the same time: every failure here also fails on `main`: `test_auto_handheld`, `test_bug_report_defaults`, `test_cpu_report`, `test_crash_dialog`, `test_crt_options`, `test_damage_debug_menu`, `test_display_startup_failure`, `test_dlss_feature_size`, `test_failed_compile_keeps_objects`, `test_framegen_preset`, `test_fsr_uniform_ownership`, `test_guest_imported`, `test_hud_layout_row`, `test_import_reach`, `test_invalidate_vcore`, `test_job_queue`, `test_linux_preflight`, `test_linux_pressure`, `test_menu_i18n`, `test_mirror_budget`, `test_missing_nup`, `test_pads_after_menu`, `test_parallel_init_order`, `test_pending_guest_import`, `test_perf_report`, `test_pipeline_play_cache`, `test_portable_builder_home`, `test_portable_builder_startup`, `test_present_thread`, `test_profiling_mode`, `test_readback_timeout_source`, `test_recorder_sync`, `test_replay_write_order`, `test_run_all_changed`, `test_slow_frames`, `test_staging_burst`, `test_target_image_pool`, `test_tested_configurations`, `test_upscaler_round_trip`, `test_upscaler_rows`, `test_vcore_escape`, `test_vk_occlusion_queries`, `test_walk_key`. `test_rumble_menu`, which fails to compile on `main`, passes here. - In the game: Windows 11 Pro, GeForce RTX 5070 Ti, a DualSense through SDL, a pack of this change on an earlier `main` (6c9edffe), together with my other branches. Tapping Field of view and Volume moves them by 1, and holding speeds up to their old steps; it works as intended. **Not tested:** a run of this exact commit on current `main` in the game (it was run on an earlier `main`; the menu code it changes is the same); Linux and Steam Deck (no platform code changes). **Must be tested:** - Linux, any GPU (the Test Farm): build this branch and start the game, expecting it to build and start and the Insert menu's Field of view to move by 1 a press. - Any platform, by hand: Insert menu, Gameplay, Field of view: tap Right, expecting 101%; hold Right for two seconds, expecting it to speed up and land on multiples of 5; restart the game, expecting the value kept. ## Risks **What could break:** a row with a step above 1 whose values between steps mean nothing would now accept them. Every such row is a number (the twelve above), and their text functions print any value. An options file's Rumble strength is no longer rounded to 25: a hand-edited 60 stays 60 (the rumble is a percentage). **Turning it off:** revert the commit. **Compatibility:** the options file is unchanged, and older files load as before. No caches, no API change, nothing for the player's build to translate again. ## Issues See #710 (the stick dead zone's own percentage row is a separate pull request). ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Open: built and run on Windows; `gpu/vk/vk_menu.cpp` not built for Linux here.) - [x] Docs updated.
feat(menu): number rows step by 1, a long hold by their own steps
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
bf885f8fa4
Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
First-time contributor

Tested in game: Windows 11 Pro, GeForce RTX 5070 Ti, a DualSense through SDL; a pack of this change (with my other branches) on main @ 6c9edffe. Field of view and Volume move by 1 a tap and speed up to their old steps when held.

Tested in game: Windows 11 Pro, GeForce RTX 5070 Ti, a DualSense through SDL; a pack of this change (with my other branches) on main @ 6c9edffe. Field of view and Volume move by 1 a tap and speed up to their old steps when held.
Owner

Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).

  • Tested on my own PC: ticked: Testing's Tested and the author's comments: in the game on Windows 11, RTX 5070 Ti, DualSense, on an earlier main.
  • Nothing gets worse that I know of: ticked: Measurements says nothing to measure for a menu input change, and Risks names no speed cost.
Brought up to the [ready-for-review standard](https://git.magicbean.dev/MagicBeanDev/Longshot/src/branch/main/CONTRIBUTING.md#ready-for-review-out-of-wip) (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know). - *Tested on my own PC*: ticked: Testing's Tested and the author's comments: in the game on Windows 11, RTX 5070 Ti, DualSense, on an earlier main. - *Nothing gets worse that I know of*: ticked: Measurements says nothing to measure for a menu input change, and Risks names no speed cost.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/menu-fine-steps:kendowashere-feat/menu-fine-steps'
git switch 'kendowashere-feat/menu-fine-steps'
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!1294
No description provided.