Skip to content

d3d12: the last choice wins between the command line and the F1 menu (D3D12-MENU-LAST-CHOICE-WINS) - #2880

Merged
aslan2142 merged 4 commits into
ProjectLeonida:mainfrom
alpfilho:d3d12/menu-last-choice-wins
Dec 1, 2026
Merged

aslan2142 merged 4 commits into
ProjectLeonida:mainfrom
alpfilho:d3d12/menu-last-choice-wins

Conversation

@alpfilho

@alpfilho alpfilho commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: D3D12-MENU-LAST-CHOICE-WINS (#2570 (comment))

What and why

d3d12/scripts/play-nvidia.ps1 applied leonida-settings.txt (what the F1 menu saved) over the command line at every start. An empty value there also removed what the command line had set. So a -Resolution, -Dlss or -SeriesS given after a menu save was lost without a word. Here:

  • Four starts in a row ran at render scale 0.6, which a menu save had left, whatever the command line asked for.
  • A saved LEONIDA_MENU_CONSOLE=series-x ran Series X with -SeriesS passed.
  • A later save with an empty LEONIDA_RENDER_SCALE= removed the scale -Resolution 1080 asked for.

Now the user's last choice wins, one setting at a time, by what was typed:

  • A switch typed for this start wins over the menu's saved value of each setting it makes, and the menu file drops that value, so F1 shows (it reads the run's values when it opens) and saves the command line's.
    • scripts/play-d3d12.ps1 passes the switches typed there as -Typed, so its Series X default and -Lowest 1080, which nobody typed, leave the menu's choice standing. -SeriesS counts as the console's switch.
    • A start of play-nvidia.ps1 by hand counts its own switches.
    • -More wins like a typed switch.
    • Which settings each switch makes is one table ($switchSettings); -Dlss replaces the scales as -Resolution and -Lowest do. DLSS's and FSR 3's frame generation are one choice there: a typed -FrameGen replaces a saved FSR 3, and a typed -FsrFrameGen replaces a saved DLSS amount.
  • Every other setting keeps the menu's value, which was chosen after the defaults.
  • The menu's "SAVE AND RESTART NOW" adds -MenuRestart to the switches it replays (LEONIDA_MENU_ARGS, commented where it is built). On that start the menu's values, saved after those switches, win. The replay now includes -NoFrameGen, which main leaves out.
  • An empty value still unsets a setting.
  • 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.
  • Each start says which values came from the menu and which the command line replaced, and by which switch, for example F1 menu settings (leonida-settings.txt, for what the command line did not set): LEONIDA_PANEL=1 and Command line over the F1 menu's saved values: LEONIDA_MENU_CONSOLE series-x -> series-s (-SeriesS/-SeriesX), LEONIDA_RENDER_SCALE 0.6 -> 0.6667 (-Resolution).
  • -DryRun prints the same lines and writes nothing.

The F1 menu (host/menu.rs) also shows two values it could not show before:

  • Render scale 1 NATIVE (SERIES X), which -Resolution makes at the output's own height. Before, it showed as a bare 1. The label says Series X because scale 1 on Series S ends the title at its own breakpoint (known, d3d12/README.md).
  • LOWEST SCALE (DYNAMIC RES), LEONIDA_RENDER_SCALE_MIN, which -Lowest sets. Before, it was not shown at all.

The README and docs/mod-menu.md say how the two now combine.

Tested

  • tests/test_play_nvidia_menu_choice.py: 14 tests, OK in 8.5 s. Thirteen run the launcher's block in Windows PowerShell against a menu file in a temporary folder; one runs the whole launcher with -DryRun and a stand-in executable. The cases:
    • a typed switch wins and the menu file keeps its other settings;
    • the same switch typed again after a menu save wins again;
    • an untyped default (play-d3d12's Series X and its -Lowest 1080) keeps the menu's value, and a typed -SeriesS wins over a menu's Series X;
    • a setting no switch makes is never taken from the menu;
    • the menu's restart keeps the values it saved;
    • a start by hand counts its own switches;
    • -More wins like a typed switch, and the report names its value;
    • a typed -Dlss replaces the menu's lowest scale;
    • -SmoothMotion typed in play-d3d12 is named as typed;
    • an empty menu value still unsets;
    • a dry run writes nothing;
    • a menu file that cannot be written keeps every saved value, the start still runs with the switch, and what stood at the temporary name is left alone;
    • a typed frame generation replaces the menu's other one, both ways;
    • the restart's LEONIDA_MENU_ARGS replays -NoFrameGen, -FsrFrameGen, -SeriesX, -Lowest and -MenuRestart.
  • With the rule disabled (typed switches ignored), 7 of the first 10 fail. With the launcher of cf15c2c6e, the two frame-generation tests fail; with that of 3a3f38325, the four that cover the second review fail.
  • cargo test --locked -p leonida-gpu --features diagnostics --lib host::menu: 2 passed. Every menu line, the two new ones included, fits the box and has a glyph for each character.
  • play-nvidia.ps1 and play-d3d12.ps1 parse ([System.Management.Automation.Language.Parser]::ParseFile, 0 errors).
  • scripts\play-d3d12.ps1 -Game <copy> ... -DryRun with a menu file holding LEONIDA_MENU_CONSOLE=series-x, LEONIDA_RENDER_SCALE=0.6 and LEONIDA_PANEL=1:
    • -SeriesS -Resolution 720: Series S at 0.6667, the panel from the menu, the two replaced values listed.
    • Nothing typed: Series X at 0.6, all three from the menu.
  • tests/test_text_write_line_endings.py: OK. scripts/check_no_game_data.py on the changed files: clean.
  • Not tested: a full start with the title. The change is in the launcher before the title starts, and in the menu's lists.

GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 621.40, Windows 11 Pro (build 26300); Ryzen 5 5600GT

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No translator change.)

🤖 Generated with Claude Code

@KelboLive KelboLive mentioned this pull request Dec 1, 2026
4 tasks

@KelboLive KelboLive left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two-file split and "the menu file drops what the CLI replaced" are the right shape, and the tests cover the four obvious orders (CLI-only, menu-only, CLI-then-menu, menu-then-CLI). python -m unittest tests.test_play_nvidia_menu_choice is 7/7 here, and both hops are guarded — forcing "menu always wins", or removing the $menu.Remove($k), each fails 2–4 tests.

But the rule as implemented is "a value that differs from the last start's CLI wins", not "the last choice wins", and that shows up in two cases:

  1. Re-typing the identical flag never wins. -SeriesS -NoSmoothMotion after F1 once chose Series X + smooth stays series-x/smooth forever; -Resolution 1440p after F1 set scale 1 stays at 1. Each start prints "F1 menu settings (…, newer than the command line)" while the flag was typed now. The cause is the baseline: leonida-launch.txt is the pre-menu snapshot (:535) of the whole merged table — defaults and machine-derived keys included — so "what the command line made" also contains what it didn't make.
  2. A missing key in that baseline is destructive. With a last file that lacks LEONIDA_CARD_AWAKE (older launcher, different machine, a new default), F1's =1 is deleted from leonida-settings.txt and reported as "Command line over the F1 menu's … 1 -> 0" for a flag the command line never mentioned. I reproduced both cases with temp folders.

Suggested shape: record per key which side and when chose it (a source/time stamp alongside the value) instead of inferring it from a value diff; keep the losing menu value rather than deleting it (so an upgrade or machine change can restore it); and add two tests — "same flag repeated after the menu" and "last file missing a seeded key".

Two smaller things:

  • scripts/game-gate.ps1:97-98 copies leonida-settings.txt into a run's folder but not leonida-launch.txt, so a gate run's artifacts no longer record the input this rule depends on.
  • LEONIDA_MENU_ARGS replays the CLI flags, not the effective values (:632-640), which is why the repeated-flag case survives an F1 restart — worth a comment where it is built, since it is now load-bearing for the rule.

@merzleckeier

Copy link
Copy Markdown
Contributor

I exercised the full launcher with #2761 and this PR (c066c04a on 3e7b34a5), with Start-Process stubbed to record the final settings. The dynamic preset with -MotionBlur:$false starts at minimum scale 0.75. Replaying the actual LEONIDA_MENU_ARGS after the menu saves 0.67 uses 0.67. A later explicit -Lowest 720 selects 0.5 and preserves the unrelated menu panel setting. Using the main launcher with the same preset in all three launches gives 0.75 → 0.67 → 0.67. The seven targeted tests also pass with the test runner switched to pwsh on Linux.

A separate write-failure case loses a saved choice. After a successful first launch, make leonida-launch.txt readable but not writable and leave leonida-settings.txt writable with LEONIDA_RENDER_SCALE_MIN=0.67. Starting with -Lowest 720 removes the saved 0.67 from the menu file before updating the history. The history write fails and leaves the old history intact. With ErrorActionPreference=Stop the process is never dispatched. With the default Continue the process is dispatched with 0.5, but the history remains stale. In both cases the saved choice is already gone. The two file updates need to preserve the menu on a persistence failure.

MEASURED with PowerShell 7.4.21 on Linux using temporary files and a synthetic runtime stub. AI-assisted (Codex).

@KelboLive

Copy link
Copy Markdown

Follow-up with the upgrade case measured, since it is worse than "the flag is ignored once".

Block extracted exactly as the test does and run alone at c066c04af — menu file LEONIDA_RENDER_SCALE=0.6, no leonida-launch.txt, command line LEONIDA_RENDER_SCALE=0.5:

  • effective settings: {"LEONIDA_RENDER_SCALE":"0.6"} — the explicit flag loses;
  • printed: F1 menu settings (leonida-settings.txt, newer than the command line): LEONIDA_RENDER_SCALE=0.6 — a claim the code cannot support, since with no launch file it has nothing to compare;
  • menu file after the start: unchanged at 0.6; leonida-launch.txt written with the CLI value 0.5.

And a second start with the same command line behaves identically — because the launch file now holds 0.5, the comparison sees "unchanged" and lets the menu win again. So an explicit flag stays shadowed on every start until the user changes or removes it, which contradicts the README's "a setting you change on the command line after saving it in the menu takes the command line's value."

The obvious fix does not work: pre-seeding the launch file with the CLI values before the merge still yields 0.6, because last and now are equal (I tried it). What is needed is to treat a non-empty command-line value that differs from the menu's as the newer choice on the first start too — equivalently, use the menu's value as the baseline only for keys the command line actually set, so untouched menu keys survive — plus a neutral "no launch file yet" line instead of "newer than the command line", and a test for the upgrade case (the existing first-start test asserts the current behaviour).

alpfilho and others added 2 commits December 1, 2026 11:16
…(D3D12-MENU-LAST-CHOICE-WINS)

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>
… (D3D12-MENU-LAST-CHOICE-WINS)

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>
@alpfilho
alpfilho force-pushed the d3d12/menu-last-choice-wins branch from c066c04 to cf15c2c Compare December 1, 2026 14:23
@alpfilho

alpfilho commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@KelboLive @merzleckeier thanks, both right. The first version inferred the choice from a value that differed from the last start's command line, and every case you found came from that. cf15c2c6e (rebased on main) decides by what was typed instead, and drops leonida-launch.txt:

  • A typed switch wins over the menu's value of each setting it makes. play-d3d12.ps1 passes its typed switches as -Typed, so its Series X default and -Lowest 1080 count as untyped. A start by hand counts its own switches, and -More wins like a typed switch. Every other setting keeps the menu's value.
  • Same flag typed again, and the first start after the upgrade: both win now. There is no baseline to compare with.
  • A key the last file lacked: with no last file, a setting no typed switch makes (LEONIDA_CARD_AWAKE and the like) is never taken from the menu.
  • Write failure: only one file is written now, and only when a value leaves it. It goes to a temporary file that is moved over the old one. If that fails, the start runs with the command line's values and the menu file stays whole.
  • LEONIDA_MENU_ARGS: commented where it is built. SAVE AND RESTART now adds -MenuRestart, and on that start the menu's values win, since they were saved after the switches it replays.
  • game-gate.ps1: no change needed, since there is no second file to copy.

On keeping the losing menu value: I drop it on purpose. Dropping it is what makes F1 show the command line's value, which is what the user asked for. Without the baseline, an upgrade or a machine change no longer removes anything the command line did not set.

Tests: 10 cases, among them both of yours ("same switch typed again", "a setting no switch makes"), the restart and the unwritable menu file. With the rule disabled, 7 of the 10 fail.

AI-assisted (Claude Code, Claude Opus 5.5).

@lixonik

lixonik commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Verified independently on native Windows 10 Pro 22H2 (build 19045, Ryzen 9 5950X 16C/32T, Windows PowerShell 5.1.19041.7844) with #2880 head cf15c2c6e merged onto main 0ff8a532f:

  • python -I tests/test_play_nvidia_menu_choice.py (with #2880): 10 passed, 0 failed (covers @KelboLive's upgrade case where leonida-settings.txt holds LEONIDA_RENDER_SCALE=0.6 with no extra state file and a typed -Resolution 1080 overrides it and drops LEONIDA_RENDER_SCALE from leonida-settings.txt).
  • Red control (d3d12/scripts/play-nvidia.ps1 and scripts/play-d3d12.ps1 checked out from origin/main 0ff8a532f): 3 passed, 7 failed.
  • cargo test --locked -p leonida-gpu --lib host::menu: 2 passed, 0 failed (default features) and 2 passed, 0 failed (--features diagnostics).
  • python -m unittest discover -s tests -p "test_docs_*.py" -v: 57 passed, 0 failed.

MEASURED (synthetic launcher/unit tests, no game files). AI-assisted: Antigravity.

@merzleckeier

Copy link
Copy Markdown
Contributor

Full-launcher frame-generation follow-up at cf15c2c + 0ff8a53. This uses the real launcher scripts under PowerShell 7.4.21 with CIM and the final Start-Process mocked. The harness sees the environment handed to the runtime. AMD DLL availability is represented by empty files used only by Test-Path.

  • With saved LEONIDA_FSR_FRAMEGEN=1, both play-nvidia.ps1 -FrameGen 2 and play-d3d12.ps1 -FrameGen 2 hand off FSR=1 and no DLSS frame-generation value. With a saved DLSS value of 3 instead, the same direct switch correctly hands off 2 and drops that saved entry. The FSR override is left outside the FrameGen switch's settings, then the mutual-exclusion block removes the newly chosen DLSS value.
  • With -SeriesX -Lowest 1080 -NoFrameGen, simulated RTX 4070 SUPER and Streamline present, the first start has no frame generation. Replaying its exact LEONIDA_MENU_ARGS with the menu file holding only an unrelated setting enables 2x. The replay omits NoFrameGen on both main and this PR.

A local trial treating the two explicit enable switches as mutually exclusive choices and replaying NoFrameGen produced DLSS=2 in both first cases, preserved the reverse FSR choice and kept frame generation off on restart. The independent panel setting stayed saved. The merge with #2761 also kept the MotionBlur true/false distinction and 2560×1440 output.

MEASURED with synthetic inputs. AI-assisted (Codex).

…start replays -NoFrameGen

Review of cf15c2c (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 cf15c2c, the two new ones fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alpfilho

alpfilho commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@merzleckeier both confirmed and fixed in 3a3f38325:

  • A saved FSR 3 undid a typed -FrameGen. DLSS's and FSR 3's frame generation are one choice, so in $switchSettings -FrameGen now also sets LEONIDA_FSR_FRAMEGEN, and -FsrFrameGen also sets LEONIDA_FRAME_GEN. A typed one replaces the menu's other one, and the menu file drops it. -NoFrameGen still sets DLSS's only, as the launcher treats it.
  • The restart dropped -NoFrameGen. LEONIDA_MENU_ARGS now replays it.

Two new tests. One runs the block for both directions of the frame-generation choice. The other runs the whole launcher with -DryRun and a stand-in executable, and checks that the restart's arguments keep -NoFrameGen, -FsrFrameGen, -SeriesX, -Lowest and -MenuRestart. Both fail with the launcher of cf15c2c6e, and all 12 pass now.

@lixonik thanks for the independent run on Windows 10.

AI-assisted (Claude Code, Claude Opus 5.5).

@aslan2142 aslan2142 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-assisted review (Antigravity).

CI failure diagnosis

The two failing checks on 3a3f38325 (check and linux-python-and-viewer in run 46688205991) are not caused by this PR. They are pre-existing regressions currently failing on main (7f8bb9037, run 46688812432) on the exact same files:

  • tests/test_wave_diff.py & tests/test_wave_trace.py (TypeError: WaveRef._check_vgpr_dst() missing 1 required positional argument: 'dst')
  • tests/test_x64_recomp.py (test_opcode_90_nop_pause_and_rex_xchg)
  • tests/test_x64_recomp_qemu_runner.py (AssertionError: called run_kernel instead of run_result)
  • tests/test_piecewise_parse.py (3 scripts/run_gpu_tests.py failures on Linux)

These are already fixed in #2895 (currently green on all checks). Everything touched by this PR passed in CI: tests/test_play_nvidia_menu_choice.py (12/12 OK in check), d3d12 (windows-latest), no-game-data, change-scope, semantic-tests, windows, and linux-gpu-tools.


Code review findings

The typed-switch design ($switchSettings + -Typed + -MenuRestart) is clean and well-scoped, and the host/menu.rs additions (1 NATIVE (SERIES X) and LOWEST SCALE (DYNAMIC RES)) both fit the 60-column menu box (55 chars each with *) using existing glyphs in host/font.rs.

A few real bugs/edge cases in d3d12/scripts/play-nvidia.ps1:

  1. -More values are missing from $fromLine, so the replacement summary prints (unset) instead of the -More value (d3d12/scripts/play-nvidia.ps1:564-576, 601)

    • $fromLine = @{} + $settings is captured at line 564, before $More is applied to $settings at line 601.
    • When leonida-settings.txt has LEONIDA_PROMPTS=playstation and -More @{LEONIDA_PROMPTS='xbox'} is passed, $fromLine['LEONIDA_PROMPTS'] is $null, so line 573 prints LEONIDA_PROMPTS playstation -> (unset) (-More) instead of -> xbox (-More) (while line 601 still runs with xbox).
    • Similarly, overriding an empty menu entry (LEONIDA_PANEL=) with -More @{LEONIDA_PANEL='1'} compares "" -ne "" and omits the line from $replaced, while passing the same value (LEONIDA_PANEL=1) falsely logs 1 -> (unset) (-More).
    • test_more_wins_over_the_menu_like_a_typed_switch missed this because it only checks self.assertIn("(-More)", ran["said"]).
    • Fix: overlay $More onto $fromLine right after line 566:
      foreach ($k in $More.Keys) { $fromLine[$k] = "$($More[$k])" }
      and assert "LEONIDA_PROMPTS playstation -> xbox (-More)" in test_more_wins_over_the_menu_like_a_typed_switch.
  2. -Dlss omits LEONIDA_RENDER_SCALE_MIN in $switchSettings (d3d12/scripts/play-nvidia.ps1:538)

    • Resolution and Lowest both include 'LEONIDA_RENDER_SCALE_MIN', but Dlss does not.
    • On Series S, -Dlss quality intentionally leaves LEONIDA_RENDER_SCALE unset (line 397) so the title renders at its own 2/3 height. If leonida-settings.txt holds a saved LEONIDA_RENDER_SCALE_MIN=0.5, typing -Dlss quality keeps LEONIDA_RENDER_SCALE_MIN=0.5 from the menu instead of dropping it (and on Series X leaves a stale entry in leonida-settings.txt).
    • Fix: add 'LEONIDA_RENDER_SCALE_MIN' (and 'LEONIDA_OUTPUT' if desired for parity with Resolution/Lowest) to Dlss in $switchSettings.
  3. -SmoothMotion via scripts/play-d3d12.ps1 reports as (-NoSmoothMotion) (d3d12/scripts/play-nvidia.ps1:556)

    • scripts/play-d3d12.ps1:118 maps 'SeriesS' -> 'SeriesX' and 'SmoothMotion' -> 'NoSmoothMotion', but line 556 only expands 'SeriesX' to '-SeriesS/-SeriesX'.
    • Passing play-d3d12.ps1 -SmoothMotion over a saved LEONIDA_MENU_SMOOTH_MOTION=0 prints LEONIDA_MENU_SMOOTH_MOTION 0 -> 1 (-NoSmoothMotion).
    • Fix: handle 'NoSmoothMotion' { '-SmoothMotion/-NoSmoothMotion' } alongside 'SeriesX'.
  4. Minor cleanup (d3d12/scripts/play-nvidia.ps1:586, 591-596):

    • Line 586 re-reads $menuFile from disk ($menu.Count -ne (Read-SettingsFile $menuFile).Count); comparing against $menu.Count captured before the loop (or a $dropped boolean) avoids a redundant read and TOCTOU window.
    • In catch (line 595), Remove-Item -LiteralPath "$menuFile.tmp" runs even when WriteAllText failed before creating $tmp (e.g., if a pre-existing directory exists at $tmp, PowerShell removes it if empty); tracking whether WriteAllText succeeded before removing $tmp avoids deleting something this script didn't create.

Local verification (Linux, no PowerShell installed)

  • python3 -I scripts/check_no_game_data.py — clean
  • git diff --check b3910e5e3..HEAD — clean
  • python3 -m compileall -q make_game.py tools tests — clean
  • python3 -I tests/test_text_write_line_endings.py — 3 passed
  • python3 -m unittest discover -s tests -p "test_docs_*.py" -v — 57 passed
  • PowerShell tests (tests/test_play_nvidia_menu_choice.py) were not run locally (skipped on Linux; 12/12 passed in Windows CI run 46688205991), so no commits were pushed to the PR branch.

…cale, a tidier menu file write

Review of 3a3f383 (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 3a3f383, 4 fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alpfilho

alpfilho commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@aslan2142 thanks. All four are confirmed and fixed in 8e1d4000a:

  1. -More in the report: its values are now overlaid onto what the menu is compared with. So the report says LEONIDA_PROMPTS playstation -> xbox (-More), an equal value is not reported, and an empty menu value set by -More is.
  2. -Dlss: it now also sets LEONIDA_RENDER_SCALE_MIN and LEONIDA_OUTPUT in $switchSettings, like -Resolution and -Lowest.
  3. -SmoothMotion: reported as -SmoothMotion/-NoSmoothMotion, as -SeriesS is.
  4. The menu file write: the count is taken when the file is read, so it is not read a second time. After a failed write, only a temporary file this start wrote is removed. The unwritable-file test now also checks that what stood at that name is still there.

Tests: 14, OK on Windows PowerShell 5.1. With the launcher of 3a3f38325, the four that cover these fail.

AI-assisted (Claude Code, Claude Opus 5.5).

@aslan2142 aslan2142 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-assisted review (Antigravity): verified commit 8e1d400 cleanly resolves all 4 review items with 14/14 PowerShell tests passing in Windows CI; all active checks are green.

@aslan2142
aslan2142 merged commit 9f0d351 into ProjectLeonida:main Dec 1, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants