fix(menu): hide rows for features this PC lacks, and keep mouse clicks on the row meant #1825
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1825
Loading…
Reference in a new issue
No description provided.
Delete branch "menu-hide-rows"
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?
The menu showed rows that can't do anything on the player's PC (AMD Anti-Lag 2 on an NVIDIA card, with a "Not available here" line), and the HDR fine-tuning rows while HDR was off. Separately, picking DLSS with the mouse could change Output resolution without the player choosing it, and then closing the menu asked "Restart to apply Output resolution?".
Rows hidden when they can't apply
All of these go through
row_shown(), which the Debug tools rows already use. The keys, the pad, the mouse, the scrolling and the side help all follow it.VK_AMD_anti_lag.The two "Not available here" lines are gone. Choices within a row that can't run here are left as they were: the Upscaler still skips engines that don't run, and Render resolution is still greyed out at Native with DLAA.
Handheld profile becomes Profile
The row reads Profile: Docked / Handheld instead of Handheld profile: Off / On. It is still saved as
handheld_profile=0/1, so existing settings keep their value.Mouse clicks land on the row meant
This was the restart question for an Output resolution nobody chose. When the mouse picked the top row shown, the list scrolled down a row (as it does for the keys) under a cursor that hadn't moved, so the next click hit the row above. On the Graphics tab, that row is Output resolution, right above the Upscaler.
Tests
tests/test_menu_mouse_scroll.py: runs the realscroll_rowsand shows the old slide onto Output resolution and the fixed behaviour.tests/test_menu_hit.cpp: covers the newrow_click()invk_menu_hit.h.tests/test_menu_restart.py: checks the Profile row's key and values.tests/test_upscaler_rows.py/.cpp: now also fail if any row says "Not available here".The full
tests/run_all.pyon Linux gives the same results asmain, plus the new tests passing.The readme's options table now lists the HDR rows, marks the rows that are only shown on some PCs, and renames Handheld profile to Profile.
Screenshots will follow in a comment.