play-nvidia.ps1 made the layer again with DLSS only when the start's own
switches wanted DLSS ($wantDlss), and it decides that before it reads the
F1 menu's saved settings. A DLSS choice the menu saved behind a replayed
-Resolution (the menu's SAVE AND RESTART) therefore asked for no build: with
a build noted as made without DLSS and NVIDIA's SDK installed afterwards,
every such start fell back from DLSS. get-nvidia-sdks.ps1 says the next
start builds the layer with DLSS; that held only for some switches.
The check now follows the SDK alone: a diag build noted as made without DLSS
is made again when nvsdk_ngx_d.lib is here, unless -NoDlss. It stays the one
check it was; no second one behind the menu.
Two things follow from asking more starts for that build:
- without cargo such a start no longer stops with "No build and no cargo":
it says DLSS waits for cargo and runs the build that is here (a start with
no build at all still stops, as before);
- a dry run, which builds nothing, says that a start builds first and prints
the settings of the start after it; it printed the settings from before
the build without a word.
Test: tests/test_play_nvidia_menu_choice.py, ten cases of launcher dry runs
against a synthetic folder with a stand-in cargo on the PATH (no game files,
no GPU), and one more run for a note whose exe is gone. On main six of the
ten fail (the five that expect the build and the one without cargo); with
this change all pass.
Not in this change: scripts/game-gate.ps1 refuses to run without a build so
that none is made inside a run. A build noted as made without DLSS, with the
SDK there, is now made again by starts that did not ask for it before (the
gate's default Series X start among them), inside the run. A guard there is
a follow-up: the gate needs PowerShell 7, which the PC this was written on
does not have.
Found by ubiquitarianism (ProjectLeonida/mandy#2570, 1 Dec 2026).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Review of 3a3f38325 (aslan2142):
- The values -More sets were not in what the menu was compared with. A replaced value printed "-> (unset)", a value
equal to the menu's was reported as replaced, and an empty menu value set by -More was not reported. They are
overlaid now.
- -Dlss now also sets LEONIDA_RENDER_SCALE_MIN and LEONIDA_OUTPUT in $switchSettings, as -Resolution and -Lowest do,
so a typed DLSS mode replaces a saved lowest scale.
- play-d3d12.ps1's -SmoothMotion is named -SmoothMotion/-NoSmoothMotion in the report, as -SeriesS is.
- The menu file is not read again to tell whether a value left it. After a failed write, only a temporary file this
start wrote is removed; whatever already stood at that name is left alone.
Tests: 14. With the launcher of 3a3f38325, 4 fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of cf15c2c6e (merzleckeier, full launcher with the final start mocked):
- A saved LEONIDA_FSR_FRAMEGEN=1 undid a typed -FrameGen 2. The launcher keeps FSR 3's frame generation when both are
set and drops DLSS's. The two are one choice, so -FrameGen now also sets LEONIDA_FSR_FRAMEGEN and -FsrFrameGen also
sets LEONIDA_FRAME_GEN in $switchSettings. A typed one replaces the menu's other.
- LEONIDA_MENU_ARGS left -NoFrameGen out, as main does, so SAVE AND RESTART turned frame generation on. It is
replayed now.
Tests: 12 (two new). With the launcher of cf15c2c6e, the two new ones fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the first version: a value that differs from the last start's command line was taken for the user's new
choice. That lost an explicit flag on the first start after an upgrade, never let the same flag typed again win, and
dropped a menu value the command line never mentioned when leonida-launch.txt lacked the key. The menu file was also
rewritten before the history, so a failed history write had already lost a saved choice.
Now the rule follows what the user typed:
- A switch typed for this start wins over the menu's saved value of each setting it makes. The menu file drops that
value, so F1 shows the command line's. scripts\play-d3d12.ps1 passes the switches typed there as -Typed, so its
Series X default and -Lowest 1080 leave the menu's choice standing. A start by hand counts its own switches, and
-More wins like a typed switch.
- Every other setting keeps the menu's value.
- The menu's SAVE AND RESTART adds -MenuRestart to the switches it replays (LEONIDA_MENU_ARGS), so there the menu's
values, saved after those switches, win.
leonida-launch.txt is gone. The menu file is written to a temporary file and moved over the old one, and only when a
value leaves it. If that fails, the start runs with the command line's values and the file stays whole.
Tests: 10 cases, among them the same switch typed again, an untyped default, a setting no switch makes, the restart,
a start by hand, -More and a menu file that cannot be written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
play-nvidia.ps1 applied leonida-settings.txt (what F1 saved) over the command line at every start. An empty value
there removed what the command line set, so a later -Resolution, -Dlss or -SeriesS was lost without a word.
Now leonida-launch.txt (git-ignored) keeps what the last start's command line made:
- A setting this command line makes otherwise than that start's did wins. The menu file drops its value, so F1
shows and saves the new one.
- A setting it makes as before keeps the menu's value, the newer choice.
- Each start says which values came from the menu and which the command line replaced.
- A dry run writes neither file.
The F1 menu gets the native render scale (1, which -Resolution makes at the output's height) and the dynamic
resolution's lowest scale (LEONIDA_RENDER_SCALE_MIN, from -Lowest).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>