WIP feat(graphics): Reset to defaults at the top of the Graphics tab #1467
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1467
Loading…
Reference in a new issue
No description provided.
Delete branch "Victor/Longshot:feat/graphics-reset-defaults"
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: Linux, NVIDIA (RTX 3050 Ti Laptop, 4 GB), in the game; Windows, built (llvm-mingw cross build) · Needs: Windows, any GPU, in the game
Why
A player who changed the Graphics settings and now has a game that runs badly or looks wrong has no quick way back:
they have to find and undo each row by hand, or delete
longshot_options.iniand lose every other setting too. Thedefaults a new install picks are almost always the right setup, so the Graphics tab gets a button at the top that puts
them back. See #1117; the reporter agreed on the place, the top of the tab.
What changed
Reset to defaults is the Graphics tab's first row. Pressed twice (as Restart and Quit), it puts the Graphics rows
back as a new install starts on this PC: Auto (this PC) chooses the Quality preset's rows for this card again, the
Output resolution goes back to a new install's, and the other rows to their defaults. The rows that set up this PC's
screen and card stay as the player set them (Fullscreen, Fullscreen monitor, HDR and its levels, GPU device), and the
other tabs are not touched.
graphics_reset()andreset_keeps()ingpu/vk/vk_menu.cpp. "Default" is a first start's, notOptions{}alone:
Options{}would give a small card the full-size picture (a GTX 1050 lost the device that way, Discord2026-11-10). The same switches as a first start apply:
RX_VK_LOW_SPECis Minimum, lighter;RX_VK_AUTO_PRESET=0keeps the built-in values. Every row it sets is the player's from then on (env_release), asa preset's; the rows that take a restart ask at the next close (
restart_state.note).new_install_output(), the Output resolution a new install starts at, now shared bymenu_initand the reset.The reset applies it through Custom output size's own
output_field_apply(), which keeps the Aspect ratio's shapesand the restart slots in step.
pendingpath as Restart and Quit (confirms_row), with the sameprompts in the full menu and the compact bar; its cell reads Apply, "Press again to confirm", then Done until the menu
closes.
tab_selectedstarts the Graphics tab on the Quality preset, so the menu does not open on the reset.gpu/vk/menu_i18n.h); its label and cell texts were already there.(
docs/images/guide/, withsource-review-graphics-reset.md).tests/test_graphics_reset.py(new);test_menu_sections,test_readme_menu_rowsandtest_output_resolutionfollow the new first row and the shared function.
Measurements
Nothing to measure: a menu action, nothing runs per frame, and nothing at all until the row is pressed twice.
Flags and settings
One menu row added; no switch, ini key or build flag added. The reset reads three switches that already exist, as a first start reads them, without changing them.
RX_VK_AUTO_PRESETRX_VK_LOW_SPECHOS_HANDHELDTesting
Tested: Linux, game-free:
python -I -B tests/run_all.pygives 601 passed, 36 failed, 88 skipped (this PR rebased @64accd2c); the failuresare the same files that fail on a clean
main@c14641a6on this PC (no Tooling checkout beside it, missing Vulkan/SPIR-Vheaders). The menu compiled and rendered with the UI-only fixture (
scripts/screenshots/menu.cpp): the row at the topwith the tab opening on the Quality preset, and the row after its first press.
Tested in the game: Linux, RTX 3050 Ti Laptop 4 GB, 1920x1080, this PR @ dbeef12a packed over
main@544229a2(Spanish menu). With Fullscreen on and several Graphics rows changed (Frame generation on Auto among them), Reset to
defaults pressed twice gave Auto (this PC) with its tier-1 rows (Render resolution 50%, Sharpness 0%), Output
resolution 1920x1080, Frame generation off, Fullscreen still on, Done in the cell, and the restart question on close.
longshot_options.iniafterwards:quality_preset=6,frame_generation=0,fullscreen=1. The same function run alone(the menu built with stubs) takes Frame generation from Auto to off in one call, twice in a row.
UI-only fixture, this PR @ dbeef12a, English, 1280x720: the Graphics tab as it opens
UI-only fixture, this PR @ dbeef12a: Reset to defaults selected after its first press
Built for Windows:
longshot_vk.dllcross-built on Linux from this PR @64accd2cwith llvm-mingw 20261104 (ucrt),RX_TARGET=windows nx2/build.py --standalone: 0 failed, no warnings,mkwvk_initexported, the new row and its help in the DLL.Not tested: running on Windows; a GPU with HDR (the HDR rows kept).
Must be tested:
Output resolution, Frame generation, Anisotropic filtering), and turn Fullscreen on. Press Reset to defaults once:
expecting "Press again to confirm" and nothing changed. Press it again: expecting the Quality preset on Auto (this PC)
with its rows, the Output resolution a new install's, the other rows at their defaults, Fullscreen still on, Done in
the row's cell, and on closing the menu the restart question if a restart row changed. Restart: the settings are
kept (by hand)
Risks
What could break: only the Graphics tab's first row and what it sets: a row reset to a wrong value, or the restart
question asked or not asked wrongly. Nothing runs until the row is pressed twice.
Turning it off: revert the commit.
Compatibility: Nothing changes:
longshot_options.inikeeps its keys, and no cache, save or ABI is touched.Issues
See #1117
Checklist
Everyone
type(scope): description) of the status line's type.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.🤖 Generated with Claude Code
Tested in game: Linux, NVIDIA RTX 3050 Ti Laptop 4 GB, 1920x1080, this PR packed over main
544229a2(dev_packs): Graphics tab, Reset to defaults pressed twice after changing several rows with Fullscreen on: Auto (this PC) with its tier-1 rows (Render resolution 50%, Sharpness 0%), Output resolution 1920x1080, Frame generation off, Fullscreen kept, Done in the cell, the restart question on close; longshot_options.ini afterwards quality_preset=6, frame_generation=0, fullscreen=1.Screenshots for the description: UI-only menu fixture (no game), English, 1280x720.
Built for Windows: longshot_vk.dll cross-built on Linux from
64accd2cwith llvm-mingw 20261104 (ucrt), RX_TARGET=windows nx2/build.py --standalone: 0 failed, no warnings, mkwvk_init exported. Not run on Windows yet (no Windows PC here); the two by-hand tests under Must be tested still stand.WIP: feat(graphics): Reset to defaults at the top of the Graphics tabto feat(graphics): Reset to defaults at the top of the Graphics tabVerdict: Request changes. The reset is a real gain and the code is careful, but it also changes two rows on other tabs (Frame pacing and Game speed) while the README, the guide and the description promise "the other tabs are not touched". The description also fails the current template's check, and the Windows run, where the Aspect ratio takes a different path, is still missing.
For a player, this adds a way back from a Graphics setup that runs badly or looks wrong without deleting
longshot_options.ini: two presses put the tab back as a new install starts on this PC (Auto (this PC) for the card, a new install's Output resolution), and Fullscreen, the monitor, HDR and the GPU device stay. It makes the code better on net. It reuses the first start's own steps (new_install_output()is now shared withmenu_init, the Output resolution goes throughoutput_field_apply()), and it adds nothing per frame. The one regression is the cross-tab change below.Reviewed:
64accd2cagainst fork pointc14641a6(main@origin26354a62is 6 commits ahead, none of them in the menu files or the tests this PR touches). Read in full:gpu/vk/vk_menu.cpp's changes and the code they rely on (apply_preset,apply_auto,menu_init,menu_auto_for_gpu,set_row,output_field_apply,aspect_monitor_value/aspect_follows_host/aspect_of_choice,env_release/saved_value,restart_values/restart_state, themenu_tickpress and mouse paths,draw_options,draw_tune_bar,row_value_cell),Optionsinvk_menu.h, the four test files, the README and guide text. Skimmed: the 13 newmenu_i18n.hentries (each is a real translation, sorted in place, counts bumped) and the guide image's manifest (itsreviewed_sourcehashes match every listed file at the head, and the revision hash matches its pairs). Nothing run: this is a code review.Fixed in this review: nothing.
Checked and fine:
pending, the second callsgraphics_reset(), andgraphics_reset()has no other caller. Moving off the row, Esc/B or a right click cancels the first press. The full menu and the compact bar both say "Confirm". The menu first opens on the Quality preset (tab_selected = {1}, andTAB_GRAPHICSis 0). A controller gets there only by Up from the Quality preset, or by wrapping Down from GPU device, and the cell then reads "Press again to confirm". That is the same guard as Restart and Quit.kRestartRow,kQuitRowandkBugReportRowcount back from the table's end. The new row has no value, so it takes no restart slot. No other test pins a Graphics row by index:test_framegen_preset,test_auto_settingsandtest_menu_save_atomicfind the Quality preset row by its text, which is unchanged.optsare reset (the pointer-range check), andreset_keepscovers every HDR row, Fullscreen, the GPU device andmonitor_pick.Options{}alone. The preset goes to 0 and then to Auto throughapply_auto(), which sets the upscaler for the card, the tier's rows andbudget.RX_VK_LOW_SPECandRX_VK_AUTO_PRESET=0behave as at a first start, and with no card known yet it falls back to Custom.-1fromaspect_monitor_value()is the "follows the host" value thataspect_follows_hostreads.output_field_applythen putsultrawideback to a real place, keepsr.hiand the restart slots in step, and clears the player's custom size.vsync_was), so the swapchain is made again with no extra call. HDR and Fullscreen are kept, so there is no HDR swap and no mode change.samplers_changed()andtemporal_reset_failure()cover Anisotropic filtering and the Upscaler. Rows that need a restart are noted beforesave()and asked about when the menu closes.longshot_options.inikeeps its keys. Rows the environment held are released, as a preset's are, so the reset's values are the ones saved.Blocking (to change before merge)
gpu/vk/vk_menu.cpp:3150(and theRX_VK_LOW_SPECbranch above it):apply_auto()→apply_preset(tier)also setsopts.pace(Debug → Frame pacing) andopts.realtime(Gameplay → Game speed), and callsenv_releaseon both. Example: a player who chose Game speed: Per frame, or turned Frame pacing off, presses Reset to defaults. Both come back on and are saved, yet the README (line 438), the guide (docs/graphics-and-controls.md:45) and the description say the other tabs are left as they are.test_only_the_graphics_rows_changeonly grepsgraphics_reset's text forTAB_names, so it can't see this. Fix: keepopts.paceandopts.realtime(and their env holds) across the reset, which I'd prefer for a "Graphics" reset. Or say in the help, README, guide and description that the preset sets those two, as choosing Auto on the Quality preset row does.main(CI "PR description / Description follows the template" fails). Since #1454, Everyone has two more boxes: "Tested on my own PC where it runs…" and "Nothing gets worse that I know of…". "Rebased on currentmain" is ticked, but the branch is 6 commits behind (no conflicts). Fix: rebase, add and tick the two boxes once they hold, and add the cost from point 1 to Risks if it stays.Suggestions (the author may take or leave)
reset_keepskeeps ("this PC's screen"). That is a judgement call; a new install does give 60 and Auto.tests/test_graphics_reset.pychecks the text of the fix, not what it does, and has its own brace counter. AGENTS.md asks new checks to cut withtests/srccut.py. A check that compilesgraphics_resetwith stubs, as the menu's other checks do, and compares everyOptionsfield outside the Graphics rows before and after would have caught point 1.vk_menu.cpp:2036: only the menu's first opening is on the Quality preset. After a visit to Reset to defaults, the selection stays there for the next opening. That is harmless with two presses, but the comment says more than holds.Testing: Victor ran it in the game on Linux with an RTX 3050 Ti 4 GB and posted the ini afterwards. Windows was cross-built with llvm-mingw but not run. The CI's other jobs are still blocked, waiting on required conditions, so nothing beyond the description check has run on the head. Missing: the PR's two Must be tested Windows runs, by hand. They hold the merge. On Windows the menu knows the monitor's shape (Linux doesn't), so the reset's Aspect ratio goes through the
aspect_monitor_value() == -1path that the Linux run never took.Overlaps and merge order: #1466 retains the same guide image (
settings-graphics.pngindocs/images/guide/manifest.json), so whichever merges second redoes its fingerprints and review note. #1388 changes what Custom with no preset behind it (budget0) does, and that is what this reset leaves underRX_VK_AUTO_PRESET=0. Neither has to go first.@ -435,0 +435,4 @@**Reset to defaults**, above them all, puts the Graphics rows back as a new install starts on your PC: the Quality preseton Auto (this PC) with the rows it chooses, the Output resolution a new install's, and the other rows at the defaultsbelow. What sets up your screen and card stays as you set it: Fullscreen, Fullscreen monitor, the HDR rows and GPUdevice. Press Enter or A twice; rows that apply after a restart ask for one when the menu closes. The other tabs are left"The other tabs are left as they are": not quite, since the Auto preset also sets Frame pacing and Game speed. See the comment on
vk_menu.cpp:3150.@ -42,0 +42,4 @@To go back to that start, choose **Graphics → Reset to defaults**, the tab's first row, and press <kbd>Enter</kbd> or Atwice. It puts the Graphics rows back as a new install starts on your PC: **Auto (this PC)** chooses again, the Outputresolution goes back to a new install's, and the other rows to their defaults. **Fullscreen**, **Fullscreen monitor**,the **HDR** rows and **GPU device** stay as you set them, and the other tabs are not touched.Same as the README: Frame pacing (Debug) and Game speed (Gameplay) are set by the preset the reset applies.
@ -2018,1 +2034,3 @@int tab_selected[TAB_FPS_DEV + 1] = {}; // (and the pages' a row opens: Motion, the FPS counter's details)// (and the pages' a row opens: Motion, the FPS counter's details). The Graphics tab opens on the Quality preset, its second// row, not on Reset to defaults above itint tab_selected[TAB_FPS_DEV + 1] = {1};Nit: this holds for the menu's first opening only. After a visit to Reset to defaults, the next opening starts on it. That is harmless with two presses, but the comment says more than holds.
@ -3099,0 +3147,4 @@apply_preset(1);opts.upscale = 0, opts.sharpness = 0;} else if (env_int("RX_VK_AUTO_PRESET", 1) && auto_choice.tier >= 1) {apply_auto();Blocking:
apply_auto()->apply_preset(tier)also sets andenv_releasesopts.pace(Debug → Frame pacing) andopts.realtime(Gameplay → Game speed). A player on Game speed: Per frame, or with Frame pacing off, gets both turned back on. The README and the guide say the other tabs are left as they are. Keep those two across the reset, or say that it changes them. (TheRX_VK_LOW_SPECbranch'sapply_preset(1)does the same.)@ -0,0 +19,4 @@I18N = (ROOT / "gpu" / "vk" / "menu_i18n.h").read_text(encoding="utf-8")def function(marker):Nit: AGENTS.md asks new checks to cut with
tests/srccut.py(block,between) rather than their own brace counter. Also, these checks read the fix's text; a stubbed compile ofgraphics_resetthat compares the non-GraphicsOptionsfields before and after would have caught the Frame pacing / Game speed change.Request changes. The reset is careful, it does what #1117 asks, and it reuses the first start's own steps. Three things need to change before it can merge, all small: (1) it also resets Frame pacing and Game speed, which are on other tabs, while the README, the guide, the help text and the description say the other tabs are untouched (I agree with the earlier review, and I confirmed it by running the code); (2) it breaks the website's Settings page build and 13 website tests that pass on main; (3) since #1466 landed the branch no longer merges cleanly (guide manifest), and the description needs the current template's boxes and the new TL;DR and Breakdown.
What it does for players
A player who changed Graphics rows and now has a game that runs badly or looks wrong gets one row at the top of the Graphics tab, pressed twice, that puts the tab back as a new install starts on this PC: the Quality preset on Auto (this PC) with the rows it picks for the card, the Output resolution a new install's, the rest at their defaults. Fullscreen, Fullscreen monitor, the HDR rows and GPU device stay. The tab still opens on the Quality preset, not on the new row.
Exactly what the reset touches
I read
graphics_reset()andreset_keeps()(gpu/vk/vk_menu.cpp:3130-3174) against the Graphics rows (vk_menu.cpp:1499-1601), then rangraphics_reset()on a state changed on every tab (game-free, see "What I ran"). Graphics rows, in the tab's order:RX_VK_AUTO_PRESET=0: Custom on the built-in values. WithRX_VK_LOW_SPEC: Custom on Minimum's values, lighterHOS_HANDHELD(restart row)Not rows, but also changed and saved:
memory_budget(the Auto tier, so Minimum's texture trimming follows it),auto_for, and the measured tuning (auto_tunedandauto_stepsare cleared atvk_menu.cpp:1103-1104, so Auto measures again in play and may move Render resolution; that is what a first start does too). The Debug tab's "Set up for a weak laptop" cell goes back to "Apply" (vk_menu.cpp:3152).Outside the Graphics tab, also changed (the finding below): Game speed (Gameplay) and Frame pacing (Debug). Rows I changed on the other tabs for the run and found untouched: Volume, FPS counter, Field of view, Mouse sensitivity (Audio, Gameplay, Controls) and Threaded rendering, Intel shader compiles (Debug).
Problems
1. Blocking: it also resets Frame pacing (Debug) and Game speed (Gameplay). Agreed with review 1686, and checked by running it.
graphics_reset()callsapply_auto()(vk_menu.cpp:3150) or, withRX_VK_LOW_SPEC,apply_preset(1)(:3147).apply_auto()callsapply_preset(c.tier)(:1099), and every tier from 1 to 5 setsopts.pace = 1andopts.realtime = 1and callsenv_release()on both (:1060,:1066-:1082). Those are the rows "Frame pacing" (:1793, Debug tab, "for testing, not a player's choice") and "Game speed" (:1655, Gameplay tab). On a state with Frame pacing Off and Game speed on Per frame, the reset gave:and
save()writes both. A player who chose Per frame (slower frames, slower game, on purpose) loses it silently; the README (README.md:438), the guide (docs/graphics-and-controls.md:45), the code comment (vk_menu.cpp:3127) and the description all say the other tabs are left as they are. WithRX_VK_AUTO_PRESET=0the two rows do not move, so only the Auto and Low spec paths do it.A second effect of the same cause: when a test run holds those rows through
RX_VK_PACEorHOS_REALTIME_STEP,env_release()makessave()write the run's value over the player's own. In my probe the player's saved Frame pacing and Game speed were 0 and 0, the environment forced 1 and 1 for the run, and after the resetsave()would write 1 and 1.What a correct scope looks like: keep those two across the reset, and keep their environment holds, in
graphics_reset()only. This is the smaller fix: the README, guide, help text and all 13 translations stay true as written (the other way out, saying in the help that the preset sets them, changes the help in 13 languages and their counts). Patch, on top of the head:menu_setting_setalready snapshotsenv_overridesthe same way (vk_menu.cpp:5849-5851). I built the probe with this patch: Game speed and Frame pacing no longer move, every Graphics row moves exactly as before, and the saved values in the environment case are the player's (0 and 0, the hold kept). The patch adds no warning under-Wall -Wextra, andtests/test_graphics_reset.py,test_menu_env_overrides.pyandtest_preset_exempt.pystill pass with it.2. Blocking: the website's Settings page build stops, and 13 website tests fail that pass on main.
docs/graphics-and-controls.mdis turned into the Settings page byformatGraphicsSettings(website/src/repo-docs/pages.ts:68), which reads README's menu table andvk_menu.cpp's row table and stops on any drift. With this headreadGraphicsSettingsthrowsIncomplete README graphics setting, because the new README line (README.md:443) has an empty Default cell. With the cell filled in it throws the next check,README/menu graphics coverage mismatch at Reset to defaults, because a Graphics row with no value is only accepted for the registered text field and the monitor selector (website/src/repo-docs/graphics-settings.ts:148);ACTIONScovers Restart and Quit on other tabs only.tests/test_readme_menu_rows.pywas changed to allow the empty cell, but the website reader was not. The source-review note says the website build was not checked.Website tests (
node --test tests/*.test.tsinwebsite/, all 106): main 104 pass, 2 fail ("HDR Native condition accepts current prose but remains required" and "cards take the menu's help, the source restart flag and README conditions", both already failing on main); this head 91 pass, 15 fail (those two and 13 new ones: the Graphics settings tests, plus "guide tables retain headers and are keyboard reachable without JavaScript" and "canonical guide images resolve to this site, with descriptive alt text"). With the patch below: 104 pass, the same 2 fail as main.website.ymlbuilds on every push to main that changesdocs/**and every hour (schedule), and runsnpm run buildandnpm run check; I did not run the full Astro build, but the reader is on its path (pages.ts:68) and it throws. This PR does not show it, because the website job is blocked for a fork PR until a maintainer adds thepreviewlabel. Fix, four lines inwebsite/src/repo-docs/graphics-settings.ts, leaving README as it is:(
'\u2014'is the dash the other tabs already show for a row with no default.) The card for the new row lands in the "Quality preset" group, ahead of the Quality preset card; that is fine, but a maintainer may want it in a group of its own. This makes the PR touchwebsite/, so the preview needs a maintainer'spreviewlabel for a fork PR; that would give a real build of the page.3. Blocking: the branch no longer merges cleanly. It did until #1466 merged (21:18 UTC). Now
git merge-treeagainst main (93bc8a7fb, and again against92c5fca28) has one conflict,docs/images/guide/manifest.json: #1466 re-reviewed the samesettings-graphics.pngentry (itsreviewed_sourcerevision and hashes changed, and its file list grew from 67 to 77 by ten headers thatdevice_policy.hbrings in). Everything else merges. Resolution: take main'sreviewed_sourcelist, re-hashgpu/vk/vk_menu.cppandgpu/vk/menu_i18n.hfor the rebased head, recompute the revision (SHA-256 of the sortedpath=hashlines with final newlines), and re-run the capture helper on the rebased head socaptured_sourceand the new note (docs/images/guide/source-review-graphics-reset.md:4anddocs/images/guide/README.md:13still say "based on main544229a2") are true. I did the hash part by hand on a scratch merge:scripts/check_guide_screenshots.py --review-sourcespasses on it (ASSET OK: settings-graphics.png). I did not re-run the capture helper.4. Blocking (process): the description. The current checker (main
93bc8a7fb, run on the live body) gives two errors: the two Everyone boxes added by #1454 are missing ("Tested on my own PC where it runs..." and "Nothing gets worse that I know of..."), and two warnings that came with #1470: no## TL;DRand no## Breakdownafter the status line. "Rebased on current main" is ticked but is not true any more. "Nothing gets worse" can only be ticked once problem 1 is fixed, and the description's "the other tabs are not touched" must stay true. "Tested" should say the website was checked once problem 2 is fixed. The CI context "PR description / Description follows the template" is red on this head for the first reason; every other context is "Blocked by required conditions" or skipped, so no other check has run.5. Suggestion:
tests/test_graphics_reset.pyreads the text of the fix, it does not run it (agreed with the inline comment on line 22). It passes on this head with problem 1 present. The check that would have caught it compiles the menu with the stubs ofscripts/screenshots/menu.cpp(the guide-screenshot job already compiles that unit), sets a value on every tab, callsgraphics_reset(), and compares everyOptionsfield outside the Graphics rows before and after. My probe is that, about 150 lines, and takes about 10 seconds to build here.6. Nit:
laptop_applied = false(vk_menu.cpp:3152). The comment says Set up for a weak laptop's rows are gone. That action also sets Intel shader compiles to one at a time and Intel quick compute builds on (Debug tab), and the reset leaves those; only its cell goes back to "Apply". Integrated GPUs only. Either leave the flag alone or say what stays.Saved file
graphics_reset()ends withrestart_state.note()thensave()(vk_menu.cpp:3164-3169), the same order asset_row. Nothing new inlongshot_options.ini: the same keys,options_version=6. After a reset on the Auto path the file hasquality_preset=6,memory_budget=<the Auto tier>,auto_for=<this PC>,output_res=<WxH>,ultrawide=1(follows the monitor), the reset values for every Graphics row, and the kept rows as they were;auto_tunedandauto_stepslines are dropped. Lines the menu does not own (controls,toggle_, unknown keys) are kept bysave(). The author's pasted lines (quality_preset=6,frame_generation=0,fullscreen=1) match what I get. WithRX_VK_AUTO_PRESET=0the file getsquality_preset=0andmemory_budget=0; an oldauto_forstays, which is harmless under Custom. Rows the environment held are released, as a preset does, so the reset's values are what is saved (the exception is problem 1). I did not read the file back after a restart.Restart-needed rows
Graphics rows that take a restart: Aspect ratio, Output resolution (with Custom output size), Profile, and GPU device (kept). The reset changes them, then notes the new values before
save(), and the question is asked when the menu closes, only for rows that differ from what the run started with, and again even after a "Later" if a value moved (menu_restart.hnote). I checked the Aspect ratio and Output path game-free with the menu's screen size faked to four screens, starting the run as a new install, changing to a custom 3840x2160 and 16:9, then resetting:Each matches what a new install gives on that screen. The two Debug rows I had changed (Threaded rendering, Intel shader compiles) stayed pending, which again shows the other tabs are left alone. When the run started on the player's own values (the usual case: they are in the ini) a reset that changes them asks to restart at close; the author saw that on Linux. This path (monitor's shape known,
aspect_monitor_value() == -1) is also taken on Linux whenever the host reports the screen's size, which the author's 1920x1080 result shows it did, so the earlier review's remark that the Linux run never took it is probably not right; the Windows-only parts that this does not cover are the window's monitor (window_monitor) and the list of display modes, so the Windows run is still needed.HDR
reset_keeps(vk_menu.cpp:3130-3133) keeps HDR, paper white, peak brightness, contrast and tone mapper, and neitherapply_presetnorapply_autosets any of them (I read both), so they stay; the probe shows them unchanged (hdr=1 white=300 peak=800 contrast=120 tonemap=1before and after). The reset does change several rows in one frame that the present loop watches (V-Sync, Frame generation, Reflex);present_imagechecks them in one condition and makes the swapchain once (vk_replay.cpp:5559-5585), andhdr_wasequalsopts.hdr, so the HDR format is asked for again, not dropped. I cannot judge that on this PC: no HDR display, no Windows. For the HDR run, please also have Frame generation on (and Native HDR) before pressing the reset, and look for a flash to SDR or a lost device after it.Questions
&opts.fps_capand&opts.vsynctoreset_keeps, and the help sentence and its 13 translations change.reset_keepsis a list of pointers, so every Graphics row added later is reset unless its author remembers to add it. Open PRs that add Graphics rows: #1393 and #1394 (12 PsychoV35 HDR look rows, with their own "reset all"), #139 (Colour filter, an accessibility setting), #774 (HUD mode), #1382 (Grass distance), #656 (Don't wait for the GPU), #727 and #1151 (ray tracing). Is "reset unless kept" what you want, and should a check list every Graphics row as one or the other?Overlaps and merge order
I took the 91 other open PRs that touch the files this one changes, and ran
git merge-treeof each against main and against main plus this PR (the resolved merge), and read the hunks of the new conflicts.RX_VK_AUTO_PRESET=0(Custom,budget0): that now trims the large textures where Auto would pick Minimum, which is also what a first start with Auto off gives, so I see nothing to change here. #1442 (frame generation's fixed multipliers) also merged and editsvk_menu.cppandmenu_i18n.h: no conflict, but the guide manifest hashes must be taken after it.tests/test_output_resolution.py(a comment line and the saved-aspect fixture);vk_menu.cppmerges. By reading, it movesaspect_monitor_value()to -2 and gives Window -1; the reset setsopts.ultrawide = aspect_monitor_value()andoutput_field_apply()follows the host's shape, so a player on Window ends on the monitor's shape, a new install's value. Not run.menu_tick, in the press block this PR changes (it re-indents it). Textual only; whichever lands second re-indents.tests/test_readme_menu_rows.pythat this one extends (#204, #280, #392, #613, #616, #1393, #1394): a one-line conflict for each.menu_i18n.h(#619, #620, #822, #1092, #1318, #1349): any two such PRs conflict there.menu_tickand the Restart row's cell inrow_value_cell; its scripted-run rule (own = mine || scripted) will need to apply to the reset's second press too, which I will do on my side. #68 conflicts at thetab_selecteddeclaration and re-captures the same guide picture and manifest entry, so it redoes its fingerprints after this lands. No overlap with my launcher work on saves: this PR touches no launcher file and no save.What I ran
Game-free only; no game run and no GPU (the card is reserved for my own PRs by day), no Windows.
apply_preset,apply_auto,menu_init,menu_auto_for_gpu,set_row,output_field_apply, theaspect_*helpers,save,env_release/saved_value,menu_restart.h,present_image,menu_tick,draw_options,draw_tune_bar,row_value_cell).scripts/screenshots/menu.cpp, sets a value on every tab, callsgraphics_reset()and prints everyOptionsfield and row that moved. Run on the head: plain Auto path, Auto off, Low spec, a held environment, and four faked screens; and on the head with the patch from problem 1.93bc8a7fb(one conflict, resolved by hand as described), the guide-screenshot check on the PR head and on the resolved merge: both pass. The same again on main92c5fca28(the guide check and the focused checkstest_graphics_reset,test_menu_i18n,test_menu_sections,test_readme_menu_rows,test_output_resolution,test_guide_screenshots,test_preset_exempt,test_menu_env_overrides,test_menu_restart_slots,test_menu_setting_walk): all pass.run_all.py --jobs 6 --strict, fresh home) on main93bc8a7fb: 675 passed, 38 failed, 17 skipped. On the trial merge (main plus this PR): 676 passed (the new test is the one more), 38 failed, 17 skipped. The 38 failing names are the same on both, so nothing new fails; they are this PC's, not this PR's. I also ran the 93 checks that read a file this PR changes, singly, on main and on the merge: the same 9 failing names with the same diagnostics (test_bug_report_defaults,test_crt_options,test_damage_debug_menu,test_framegen_preset,test_hud_layout_row,test_rumble_menu,test_upscaler_round_trip,test_upscaler_rows,test_walk_key).node --test tests/*.test.tsinwebsite/on the three (numbers in problem 2). Not the full Astro build and notscripts/check-site.ts.gpu/vk/vk_menu.cppcompiled for x86_64-w64-mingw32 against llvm-mingw's headers (-fsyntax-only -Wall -Wextra): the head has 0 errors and the same 4 warnings as main; with my patch also 0 errors and the same 4. The fixture check for the C++ fixture this PR touches (tests/test_output_resolution.py) fails on this head and on main alike, onhost/hos_wide_size.h:55(getenvdeprecated under-Werror), before it reaches this PR's lines, so that driver's later variants are not judged. A syntax pass is not a Windows run.Not run, and what would settle it
longshot_options.inito be unchanged (on this head they flip). Also Frame generation on, then reset: expect Frame generation Off with no lost device.tests/test_output_resolution.py) is not covered by a syntax check.Inline-comment candidates
apply_preset(1)here andapply_auto()at :3150 set Frame pacing (Debug) and Game speed (Gameplay) and release their environment holds (:1060, :1066-1082). I ran it: Game speed Per frame and Frame pacing Off both come back On and are saved. Keep them across the reset; patch in my review.website/src/repo-docs/graphics-settings.tsits build stops (see my review).Optionsfields would catch it.544229a2" and the dependency list need the rebase's values.feat(graphics): Reset to defaults at the top of the Graphics tabto WIP feat(graphics): Reset to defaults at the top of the Graphics tabView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.