WIP: feat(menu): number rows step by 1, a long hold by their own steps #1294
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1294
Loading…
Reference in a new issue
No description provided.
Delete branch "kendowashere/Longshot:feat/menu-fine-steps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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, beforeset_row's ends (which still stop or wrap as before).arrow_held_ns[5]: kept bymenu_tick's existing repeat (how long each arrow is held).arrow_fast(dir): whether that arrow is past 1.5 s.row_next.rumble_stepkeeps 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/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 gainframegen_by_dlss_offered, whichset_rowcalls since main's frame generation rows; without it the check failed to compile onmaintoo.tests/test_camera_speed.py: the README row's new text.tests/test_menu_text_field.py:arrow_held_nsin 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.
Testing
Tested:
tests/test_menu_fine_steps.py(new) cutsrow_nextand theRowstruct out ofvk_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 areset_row's.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.pyon this branch (bf885f8f) onmain@f88e6e3a, against a cleanmain@f88e6e3aon this PC run at the same time: every failure here also fails onmain: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 onmain, passes here.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
mainin the game (it was run on an earliermain; the menu code it changes is the same); Linux and Steam Deck (no platform code changes).Must be tested:
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
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.gpu/vk/vk_menu.cppnot built for Linux here.)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.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).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.