fix(menu): hide rows for features this PC lacks, and keep mouse clicks on the row meant #1825

Merged
hckrman101 merged 3 commits from menu-hide-rows into main 2026-11-10 18:27:09 +00:00
hckrman101 commented 2026-11-10 17:40:35 +00:00 (Migrated from github.com)

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.

  • NVIDIA Reflex: hidden without the driver's extension.
  • AMD Anti-Lag 2: hidden without VK_AMD_anti_lag.
  • Upscaler: hidden where only the game's own upscaler runs.
  • DLSS model: hidden unless DLSS actually runs here, not just when the build has it.
  • HDR paper white and HDR peak brightness: shown only while HDR is on. They come back live when HDR is turned on.

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.

  • A row picked by the mouse no longer scrolls the list.
  • A click on a row's name only selects it. Before, it stepped the value as Right did, so clicking "Output resolution" to read its help changed it.
  • A click on the half of a toggle that is already chosen leaves it as it is.

Tests

  • tests/test_menu_mouse_scroll.py: runs the real scroll_rows and shows the old slide onto Output resolution and the fixed behaviour.
  • tests/test_menu_hit.cpp: covers the new row_click() in vk_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.py on Linux gives the same results as main, 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.

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. - **NVIDIA Reflex**: hidden without the driver's extension. - **AMD Anti-Lag 2**: hidden without `VK_AMD_anti_lag`. - **Upscaler**: hidden where only the game's own upscaler runs. - **DLSS model**: hidden unless DLSS actually runs here, not just when the build has it. - **HDR paper white** and **HDR peak brightness**: shown only while HDR is on. They come back live when HDR is turned on. 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. - A row picked by the mouse no longer scrolls the list. - A click on a row's name only selects it. Before, it stepped the value as Right did, so clicking "Output resolution" to read its help changed it. - A click on the half of a toggle that is already chosen leaves it as it is. ## Tests - `tests/test_menu_mouse_scroll.py`: runs the real `scroll_rows` and shows the old slide onto Output resolution and the fixed behaviour. - `tests/test_menu_hit.cpp`: covers the new `row_click()` in `vk_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.py` on Linux gives the same results as `main`, 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.
Commenting is not possible because the repository is archived.
No description provided.