feat(settings): the player's own DLSS 5 files, added in Settings and copied where every version's game looks for them #282

Closed
pmwork-personal wants to merge 4 commits from pmwork-personal/LongshotLauncher:feat/dlss5-files into main
Member

Longshot runs NVIDIA's DLSS 5 since Longshot #2503, and on RTX 20, 30 and 40 the community FP16 file since Longshot #2513, but it never ships or downloads either file: today players copy nvngx_dlssnr.dll into a folder by hand. With this, they choose the files they already have in Settings, and the launcher puts each one where every version's game looks for it.

HumanBean and hckrman101 agreed to the approach before the game PRs, depending on how it is done; this is its launcher half.

What changed

  • Settings › DLSS 5 FILES (EXPERIMENTAL), on Windows with an NVIDIA RTX GPU (or no GPU found). The game uses the files on Windows only, so Linux has no section.
    • One Add DLSS 5 file… button. The launcher tells by the file's content which of the two it is, so the player does not have to know (two separate Choose buttons, tried first by hand, made the player pick the right one). One line beside it gives the progress, then where the file went or why it was refused.
    • Two rows, NVIDIA's file (RTX 50) and Community FP16 file (RTX 20, 30, 40 and 50), each with what is in place and its own Remove.
    • A line for this PC's GPU: an RTX 50 runs both (the game's DLSS 5 model row then chooses, after a restart); RTX 20 to 40 run the FP16 file.
    • The hint says that Longshot does not include or download DLSS 5, where the copies go, that a version needs NVIDIA DLSS, and that a file in a version's own ngx folder comes first.
  • Where the copies go: %LOCALAPPDATA%\Longshot\ngx\nvngx_dlssnr.dll and %LOCALAPPDATA%\Longshot\ngx\fp16\nvngx_dlssnr.dll, whatever the file was called. Longshot's gpu/vk/vk_dlss.cpp looks there after RX_VK_DLSS_DIR and the game folder's ngx, and the folder is shared by every version and kept by updates.
    • A copy, not RX_VK_DLSS_DIR: an environment variable works only when the launcher starts the game, it would override a player's own RX_VK_DLSS_DIR, and NGX looks for its other runtimes there too.
    • Not a hard link: another tool that changes the original in place would change the game's file too. With a copy, the player can move or delete the original.
    • No new setting: the files in the folder are the state. Files put there by hand, or in a version's ngx folder, work as before.
    • What the launcher placed: a small record beside the copies, .longshot-launcher-placed.txt (each file's identity, bytes, last write time and SHA-256 as placed; its name starts with a dot, never nvngx_). Longshot's guide has players put the files in this folder by hand. A file the record does not match (put there by hand, or changed since) is the player's: its row offers no Remove, and Storage and Remove everything leave it out. The row says "Put here by hand", except when an FP16 file has an unrecognized size. Adding a file over it makes the place the launcher's again.
  • The checks (Core/Dlss5Files.cs):
    • Before any copy: the file is there, is a Windows program file (MZ) and has a DLSS 5 model's size.
    • The file is copied once, hashed as it is copied, into a temporary file beside its place. The temporary name does not start with nvngx, so NGX never takes it.
    • The copy is then sorted by its content:
      • One of Longshot's gpu/vk/dlss_nr_model.h kFp16Known (size and SHA-256 CDFA6C1E…FEABF3ED) is the FP16 file.
      • Any other file must carry a valid signature whose signer's organisation (the subject's O attribute, read alone) is NVIDIA Corporation (Windows' WinVerifyTrust, offline: NGX loads only NVIDIA-signed files), and its description must say DLSSNR. Then it is NVIDIA's file. The signature check is the one the Bloodborne PC port's launcher does (Dlss5.CheckSignature); the description check is new.
      • Anything else is refused: another NVIDIA DLL with its own reason, any other file with "neither NVIDIA's own DLSS 5 file nor the known community FP16 file".
    • Only then is its identity recorded and the copy moved over that file's old copy, in one step. If the record cannot be written, the old file stays in place. Linked destination directories are refused. A refused or failed copy leaves the files in place and no temporary file.
    • Copy and check run off the window's thread, with a percent beside Add: about 0.3 to 0.7 s on an NVMe drive.
  • Remove deletes only the launcher's copy (and its line in the record), then the fp16 and ngx folders when they are empty. It never touches a file in a game folder, a file put there by hand, or the file it was copied from. Add and Remove are refused while Longshot runs, because the game holds the files.
  • Storage: the launcher's copies show under Your data as DLSS 5 files with their size. They are not removable there (Settings removes them). Add and Remove clear the page's kept measure, so its next visit measures again.
  • Remove everything: the confirmation has a DLSS 5 files added in Settings line, and the run deletes the launcher's copies. A file put there by hand stays and is listed as kept; another file in that folder, and the player's own files, stay too.
  • Storage's measure, a fix beside it: Disk.Walk took a part that is a file for a folder that failed to list, so the measure was called partial. That happened to the DLSS 5 files, and main's system_headers.txt part takes the same path. A file part is now skipped there; Storage.Measure already counts its bytes.
  • Checks and tools:
    • tests/launcher_core/Dlss5Checks.cs covers the paths, when the section shows, the RTX series by name, how Add sorts the two files (the FP16 file without asking NVIDIA's check), the record of placed files, changed files and a file put there by hand, a failed record write, linked destination directories, files refused before and after the copy, replace and remove, the signer's organisation read alone, a file held by a running game (Windows), Storage and Remove everything's line, and on Windows the real signature check (an unsigned file, the .NET host signed by Microsoft, NVIDIA's nvapi64.dll when present). The test files are a few MB and made in the test; no NVIDIA file is in the repository.
    • RemoveEverythingChecks.cs has a Windows case: the launcher's copy goes, a file put there by hand stays and is listed as kept.
    • tests/test_launcher_core.py --longshot checks that the launcher's FP16 list is Longshot's kFp16Known. It is skipped for a Longshot from before #2513, such as the pinned one.
    • Screenshot scenes: launcher-settings-dlss5, launcher-settings-dlss5-rtx40, storage-dlss5, storage-remove-everything-dlss5.
  • New texts in the 12 full catalogs. The game's own row names ("Graphics", "DLSS 5 model") stay in English, as the game shows them. README: a paragraph in Using it, plus the scenes and the tests.

Testing

Tested (Windows 11, RTX 5090; this branch on main 5f145106):

  • By hand, the whole way, on this PC: this branch's launcher, portable, with Longshot's #2513 branch build (stamped pr-2513-76252ff9). That build had no RX_VK_DLSS_DIR and no DLSS 5 file in its own ngx.
    • Add DLSS 5 file… with each real file: each went to its own place in %LOCALAPPDATA%\Longshot\ngx.
    • Play started the game. Its log: "DLSS 5: the community FP16 nvngx_dlssnr.dll found in %USERPROFILE%\AppData\Local\Longshot\ngx\fp16 (… the known file)" and "DLSS 5: NVIDIA's nvngx_dlssnr.dll found in %USERPROFILE%\AppData\Local\Longshot\ngx: the Graphics tab's DLSS 5 rows show".
    • DLSS 5 ran with the FP16 file ("the community FP16 file, direct"). Turned off and on again in the game, then the game closed normally.
  • dotnet build LongshotLauncher.slnx -c Release -p:RestoreLockedMode=true: 0 warnings, 0 errors.
  • python -I tests/test_launcher_core.py: on this Windows PC, main itself stops at SavesChecks, as #265 found too. I ran every check group on its own (a local edit, not in this branch) on main and on this branch:
    • main: 2695 checks pass;
    • this branch: 2737 checks pass;
    • on both, the same three groups fail on Windows only: SavesChecks (a link check), and SteamChecks and RouteChecks (Linux paths);
    • the new Dlss5Checks and the Windows Remove everything case pass.
  • check_dlss5_fp16 against Longshot main 68ab0bc7: the lists match; a changed hash is caught; a Longshot without the header is skipped.
  • Tooling's test_release.py: 42 of 43 pass. test_prune_keeps_the_newest_nightlies_and_everything_else fails on main on this PC too.
  • With the real files (a scratch program over Core/Dlss5Files.cs, into a scratch ngx folder; the files are not in the repository):
    • NVIDIA's nvngx_dlssnr.dll 310.9.16 (266,424,944 bytes, signed by NVIDIA Corporation) and the FP16 file (276,162,560 bytes, the known hash): each is sorted to its own place (0.6 s and 0.3 s). Another NVIDIA DLL (nvapi64.dll) is refused.
    • The copies are byte for byte the originals, and no temporary file is left.
    • A held FP16 file is neither replaced nor removed.
    • The record holds both copies as the launcher's; Remove deletes the copies, the record and the empty folders, and the originals stay.
  • Headless screenshots of the four scenes, below.

Still to test

  • An RTX 20, 30 or 40 PC: the GPU line, and the FP16 file running.
  • Linux: the section hidden, and CI's full core checks.

A review of the whole diff before opening found that Remove everything would have deleted files put there by hand, a stale Storage measure, Add's busy state left on after an unexpected error, a loose match on the signer's name, and the partial measure above. All are fixed in the last commit, with checks.

Risks

  • #265 adds a section to the same Settings page, so whichever merges second may need to merge main in.
  • The signature check is offline, so revocation is not checked, as in the Bloodborne port. NGX checks the signature again when the game loads the file.

Screenshots

In the first comment: the Settings section on an RTX 5090 with both files and on an RTX 4070 with none, Storage's Your data, and Remove everything's confirmation, drawn by tools/screenshots.

Co-Authored-By: Claude Opus 5.5 [email protected]

🤖 Generated with Claude Code

Longshot runs NVIDIA's DLSS 5 since [Longshot #2503](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2503), and on RTX 20, 30 and 40 the community FP16 file since [Longshot #2513](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2513), but it never ships or downloads either file: today players copy `nvngx_dlssnr.dll` into a folder by hand. With this, they choose the files they already have in Settings, and the launcher puts each one where every version's game looks for it. HumanBean and hckrman101 agreed to the approach before the game PRs, depending on how it is done; this is its launcher half. ## What changed - **Settings › DLSS 5 FILES (EXPERIMENTAL)**, on Windows with an NVIDIA RTX GPU (or no GPU found). The game uses the files on Windows only, so Linux has no section. - One **Add DLSS 5 file…** button. The launcher tells by the file's content which of the two it is, so the player does not have to know (two separate Choose buttons, tried first by hand, made the player pick the right one). One line beside it gives the progress, then where the file went or why it was refused. - Two rows, **NVIDIA's file** (RTX 50) and **Community FP16 file** (RTX 20, 30, 40 and 50), each with what is in place and its own **Remove**. - A line for this PC's GPU: an RTX 50 runs both (the game's DLSS 5 model row then chooses, after a restart); RTX 20 to 40 run the FP16 file. - The hint says that Longshot does not include or download DLSS 5, where the copies go, that a version needs NVIDIA DLSS, and that a file in a version's own `ngx` folder comes first. - **Where the copies go:** `%LOCALAPPDATA%\Longshot\ngx\nvngx_dlssnr.dll` and `%LOCALAPPDATA%\Longshot\ngx\fp16\nvngx_dlssnr.dll`, whatever the file was called. Longshot's `gpu/vk/vk_dlss.cpp` looks there after `RX_VK_DLSS_DIR` and the game folder's `ngx`, and the folder is shared by every version and kept by updates. - **A copy, not `RX_VK_DLSS_DIR`:** an environment variable works only when the launcher starts the game, it would override a player's own `RX_VK_DLSS_DIR`, and NGX looks for its other runtimes there too. - **Not a hard link:** another tool that changes the original in place would change the game's file too. With a copy, the player can move or delete the original. - **No new setting:** the files in the folder are the state. Files put there by hand, or in a version's `ngx` folder, work as before. - **What the launcher placed:** a small record beside the copies, `.longshot-launcher-placed.txt` (each file's identity, bytes, last write time and SHA-256 as placed; its name starts with a dot, never `nvngx_`). Longshot's guide has players put the files in this folder by hand. A file the record does not match (put there by hand, or changed since) is the player's: its row offers no Remove, and Storage and Remove everything leave it out. The row says "Put here by hand", except when an FP16 file has an unrecognized size. Adding a file over it makes the place the launcher's again. - **The checks** (`Core/Dlss5Files.cs`): - Before any copy: the file is there, is a Windows program file (`MZ`) and has a DLSS 5 model's size. - The file is copied once, hashed as it is copied, into a temporary file beside its place. The temporary name does not start with `nvngx`, so NGX never takes it. - The copy is then sorted by its content: - One of Longshot's `gpu/vk/dlss_nr_model.h` `kFp16Known` (size and SHA-256 `CDFA6C1E…FEABF3ED`) is the FP16 file. - Any other file must carry a valid signature whose signer's organisation (the subject's O attribute, read alone) is NVIDIA Corporation (Windows' WinVerifyTrust, offline: NGX loads only NVIDIA-signed files), and its description must say DLSSNR. Then it is NVIDIA's file. The signature check is the one the Bloodborne PC port's launcher does (`Dlss5.CheckSignature`); the description check is new. - Anything else is refused: another NVIDIA DLL with its own reason, any other file with "neither NVIDIA's own DLSS 5 file nor the known community FP16 file". - Only then is its identity recorded and the copy moved over that file's old copy, in one step. If the record cannot be written, the old file stays in place. Linked destination directories are refused. A refused or failed copy leaves the files in place and no temporary file. - Copy and check run off the window's thread, with a percent beside Add: about 0.3 to 0.7 s on an NVMe drive. - **Remove** deletes only the launcher's copy (and its line in the record), then the `fp16` and `ngx` folders when they are empty. It never touches a file in a game folder, a file put there by hand, or the file it was copied from. Add and Remove are refused while Longshot runs, because the game holds the files. - **Storage:** the launcher's copies show under **Your data** as **DLSS 5 files** with their size. They are not removable there (Settings removes them). Add and Remove clear the page's kept measure, so its next visit measures again. - **Remove everything:** the confirmation has a **DLSS 5 files added in Settings** line, and the run deletes the launcher's copies. A file put there by hand stays and is listed as kept; another file in that folder, and the player's own files, stay too. - **Storage's measure, a fix beside it:** `Disk.Walk` took a part that is a file for a folder that failed to list, so the measure was called partial. That happened to the DLSS 5 files, and main's `system_headers.txt` part takes the same path. A file part is now skipped there; `Storage.Measure` already counts its bytes. - **Checks and tools:** - `tests/launcher_core/Dlss5Checks.cs` covers the paths, when the section shows, the RTX series by name, how Add sorts the two files (the FP16 file without asking NVIDIA's check), the record of placed files, changed files and a file put there by hand, a failed record write, linked destination directories, files refused before and after the copy, replace and remove, the signer's organisation read alone, a file held by a running game (Windows), Storage and Remove everything's line, and on Windows the real signature check (an unsigned file, the .NET host signed by Microsoft, NVIDIA's `nvapi64.dll` when present). The test files are a few MB and made in the test; no NVIDIA file is in the repository. - `RemoveEverythingChecks.cs` has a Windows case: the launcher's copy goes, a file put there by hand stays and is listed as kept. - `tests/test_launcher_core.py --longshot` checks that the launcher's FP16 list is Longshot's `kFp16Known`. It is skipped for a Longshot from before #2513, such as the pinned one. - Screenshot scenes: `launcher-settings-dlss5`, `launcher-settings-dlss5-rtx40`, `storage-dlss5`, `storage-remove-everything-dlss5`. - New texts in the 12 full catalogs. The game's own row names ("Graphics", "DLSS 5 model") stay in English, as the game shows them. README: a paragraph in *Using it*, plus the scenes and the tests. ## Testing **Tested** (Windows 11, RTX 5090; this branch on main `5f145106`): - **By hand, the whole way**, on this PC: this branch's launcher, portable, with Longshot's #2513 branch build (stamped `pr-2513-76252ff9`). That build had no `RX_VK_DLSS_DIR` and no DLSS 5 file in its own `ngx`. - **Add DLSS 5 file…** with each real file: each went to its own place in `%LOCALAPPDATA%\Longshot\ngx`. - **Play** started the game. Its log: "DLSS 5: the community FP16 nvngx_dlssnr.dll found in `%USERPROFILE%\AppData\Local\Longshot\ngx\fp16` (… the known file)" and "DLSS 5: NVIDIA's nvngx_dlssnr.dll found in `%USERPROFILE%\AppData\Local\Longshot\ngx`: the Graphics tab's DLSS 5 rows show". - DLSS 5 ran with the FP16 file ("the community FP16 file, direct"). Turned off and on again in the game, then the game closed normally. - `dotnet build LongshotLauncher.slnx -c Release -p:RestoreLockedMode=true`: 0 warnings, 0 errors. - `python -I tests/test_launcher_core.py`: on this Windows PC, main itself stops at `SavesChecks`, as #265 found too. I ran every check group on its own (a local edit, not in this branch) on main and on this branch: - main: 2695 checks pass; - this branch: 2737 checks pass; - on both, the same three groups fail on Windows only: `SavesChecks` (a link check), and `SteamChecks` and `RouteChecks` (Linux paths); - the new `Dlss5Checks` and the Windows Remove everything case pass. - `check_dlss5_fp16` against Longshot main `68ab0bc7`: the lists match; a changed hash is caught; a Longshot without the header is skipped. - Tooling's `test_release.py`: 42 of 43 pass. `test_prune_keeps_the_newest_nightlies_and_everything_else` fails on main on this PC too. - **With the real files** (a scratch program over `Core/Dlss5Files.cs`, into a scratch `ngx` folder; the files are not in the repository): - NVIDIA's `nvngx_dlssnr.dll` 310.9.16 (266,424,944 bytes, signed by NVIDIA Corporation) and the FP16 file (276,162,560 bytes, the known hash): each is sorted to its own place (0.6 s and 0.3 s). Another NVIDIA DLL (`nvapi64.dll`) is refused. - The copies are byte for byte the originals, and no temporary file is left. - A held FP16 file is neither replaced nor removed. - The record holds both copies as the launcher's; Remove deletes the copies, the record and the empty folders, and the originals stay. - Headless screenshots of the four scenes, below. **Still to test** - An RTX 20, 30 or 40 PC: the GPU line, and the FP16 file running. - Linux: the section hidden, and CI's full core checks. A review of the whole diff before opening found that Remove everything would have deleted files put there by hand, a stale Storage measure, Add's busy state left on after an unexpected error, a loose match on the signer's name, and the partial measure above. All are fixed in the last commit, with checks. ## Risks - #265 adds a section to the same Settings page, so whichever merges second may need to merge main in. - The signature check is offline, so revocation is not checked, as in the Bloodborne port. NGX checks the signature again when the game loads the file. ## Screenshots In the first comment: the Settings section on an RTX 5090 with both files and on an RTX 4070 with none, Storage's Your data, and Remove everything's confirmation, drawn by `tools/screenshots`. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Longshot neither ships nor downloads NVIDIA's DLSS 5 (Longshot #2503, #2513): players put nvngx_dlssnr.dll in a folder by
hand. Settings now has DLSS 5 files (experimental), on Windows with an NVIDIA RTX GPU: NVIDIA's file and the community FP16
file, each chosen from the player's own and copied to %LOCALAPPDATA%\Longshot\ngx (ngx\nvngx_dlssnr.dll and
ngx\fp16\nvngx_dlssnr.dll), the folder every version's game looks in and no update changes.

- Core/Dlss5Files.cs: the folder, the FP16 list (Longshot's gpu/vk/dlss_nr_model.h kFp16Known), a copy hashed as it is
  copied into a temporary file beside the place, checked (the FP16 file by size and SHA-256; NVIDIA's by its NVIDIA
  signature, WinVerifyTrust offline, and its DLSSNR description), then moved over the old one; Remove deletes the copy only.
- Settings: two rows with Choose and Remove, what this GPU runs, refused while Longshot runs.
- Storage: the copies under Your data (removed in Settings only); Remove everything deletes them, never the player's own.
- Checks: tests/launcher_core/Dlss5Checks.cs and a Windows Remove everything case; --longshot compares the FP16 list with
  Longshot's. Screenshot scenes for Settings and Storage. New texts in the 12 full catalogs. README.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tried by hand with two Choose buttons: the launcher should recognise NVIDIA's own file whichever button is used. Settings
now has one Add DLSS 5 file button. Dlss5Files.Install copies the file once and sorts it as copied: the known FP16 file (size
and SHA-256) goes to ngx\fp16, a file with NVIDIA's signature and the DLSSNR description to ngx, anything else is refused
(another NVIDIA DLL with its own reason). The rows keep what is in place and their Remove; one line under Add says where the
file went, or why not. Checks, texts in the 12 catalogs (8 out, 6 in), README and the scenes follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(settings): DLSS 5 files put there by hand stay the player's; Storage measures them whole
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
1dd0a6b09c
A review before opening the pull request found that Remove everything deleted any file at the two DLSS 5 places, though
Longshot's guide has players put them there by hand, and said "your own files stay".

- Dlss5Files keeps a record beside the copies (.longshot-launcher-placed.txt: each kind's bytes and last write time as
  placed). Ours: the file in place is the launcher's copy. A file put there by hand, or changed since, is the player's:
  the row says "Put here by hand" and offers no Remove; Storage and Remove everything leave it out, and Remove everything
  says it kept it. Adding a file over it makes the place the launcher's again.
- Add and Remove clear Storage's kept measure, so Remove everything's confirmation lists what is there now.
- Add's busy state is reset in a finally, and odd paths are said as a copy that failed.
- NVIDIA's signer: the organisation is read as the subject's O attribute alone, not a text match on the subject.
- Disk.Walk: a part that is a file (a DLSS 5 file, system_headers.txt) is not taken as a folder that failed to list, so
  Storage no longer calls the measure partial for it.
- Checks for each; texts in the 12 catalogs (2 out, 3 in); the screenshot stand-ins are recorded as the launcher's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Screenshots, drawn headless by tools/screenshots (the scenes in this PR; stand-in files of the real sizes, no NVIDIA file):

Settings on an RTX 5090, both files added (launcher-settings-dlss5)

Settings, DLSS 5 files on an RTX 5090 with both files added

Settings on an RTX 4070, no file added (launcher-settings-dlss5-rtx40): the GPU line says it runs the FP16 file

Settings, DLSS 5 files on an RTX 4070 with no file added

Storage › Your data (storage-dlss5): the copies with their size, removed in Settings only

Storage, Your data with the DLSS 5 files

Remove everything (storage-remove-everything-dlss5): the copies go, the player's own files stay

Remove everything with the DLSS 5 files line

Screenshots, drawn headless by `tools/screenshots` (the scenes in this PR; stand-in files of the real sizes, no NVIDIA file): **Settings on an RTX 5090, both files added** (`launcher-settings-dlss5`) ![Settings, DLSS 5 files on an RTX 5090 with both files added](https://git.magicbean.dev/attachments/5514f786-da8f-4488-aa2f-ca10a0c039b6) **Settings on an RTX 4070, no file added** (`launcher-settings-dlss5-rtx40`): the GPU line says it runs the FP16 file ![Settings, DLSS 5 files on an RTX 4070 with no file added](https://git.magicbean.dev/attachments/436568d5-2bee-4ddf-87a0-dccd5e3981a7) **Storage › Your data** (`storage-dlss5`): the copies with their size, removed in Settings only ![Storage, Your data with the DLSS 5 files](https://git.magicbean.dev/attachments/7878597f-3621-4c87-bcbd-b943f350bbc5) **Remove everything** (`storage-remove-everything-dlss5`): the copies go, the player's own files stay ![Remove everything with the DLSS 5 files line](https://git.magicbean.dev/attachments/98e6f2fe-6377-449b-ad02-d1b8711bb440)
Member
@fix
BeanBot force-pushed feat/dlss5-files from 1dd0a6b09c
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
to c588fbe690
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
2026-11-26 05:06:14 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The reported Windows run shows that players can add and use the files, but the requested RTX 20–40 and Linux checks remain outstanding. An interrupted replacement can also leave an existing launcher copy unrecognized. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is c588fbe690. I rebased it onto main (1e5e5ed842).

Conflicts resolved

  • App/ViewModels/StorageViewModel.cs: Kept builder storage changes and added DLSS 5 paths to measurement and its cache key.
  • App/Views/SettingsView.axaml: Kept the reorganized Settings page and added the DLSS 5 controls.
  • Core/Lang/de.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/es.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/fr.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/it.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/ja.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/ko.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/nl.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/pl.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/pt-BR.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/ru.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/zh-Hans.json: Kept base translations and added DLSS 5 translations.
  • Core/Lang/zh-Hant.json: Kept base translations and added DLSS 5 translations.
  • Core/RemoveEverything.cs: Kept builder data and DLSS 5 removal descriptions.
  • Core/Storage.cs: Kept builder storage and added the DLSS 5 storage kind and paths.
  • README.md: Kept the updated screenshot and builder documentation and added DLSS 5 coverage.
  • tests/test_launcher_core.py: Kept the builder checks and added the DLSS 5 FP16 list comparison. No tests or builds were run.
  • App/ViewModels/StorageViewModel.cs: Kept the base branch’s toolchain and version-folder handling and the pull request’s launcher-owned DLSS 5 file list.
  • Core/RemoveEverything.cs: Kept both the builder data description and the distinction for player-owned DLSS 5 files.
  • Core/Storage.cs: Kept the base branch’s storage fields and the pull request’s DLSS 5 ownership description. I edited its description to match the change.

Changed

  • Linked destination directories, Core/Dlss5Files.cs:278: Reject linked or reparse-point destination ancestors during installation and removal; added Windows junction checks.
  • Ownership record failure, Core/Dlss5Files.cs:178: Write the ownership record before replacing the destination, so a record write failure reports an error and leaves the previous file in place. Added a failure check. Tests were not run, as requested.
  • Verify ownership of changed DLSS 5 files: Core/Dlss5Files.cs:219 records and verifies SHA-256 alongside file identity and metadata. tests/launcher_core/Dlss5Checks.cs:148 covers an in-place edit with the size and timestamp preserved. Tests were not run, as requested.
  • Settings ownership checks: Moved row ownership checks and removal to background tasks, discarded stale row results, and retained the fresh ownership check before deletion in App/ViewModels/Dlss5FilesViewModel.cs:163. No build or tests were run, as requested.

Nothing was built or run: the checks run again on the new head.

Players can add their own DLSS 5 files through Settings for use by Longshot versions. The fix strengthens ownership checks and moves Settings checks off the UI thread, at the cost of hashing installed files.

Should fix (1): not blocking, but worth doing before merging.

  • L6 Core/Dlss5Files.cs:179: The ownership record is replaced before the destination file, leaving the two inconsistent if the launcher stops between those operations. (more on the line) Do: Make the record and replacement recoverable across interruption, for example by recording a pending replacement and reconciling it on the next ownership check.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L4: The other supported GPU generations and Linux visibility have not had the runs described in the pull request. When: The reported end-to-end run covers an RTX 5090; an RTX 20, 30 or 40 player’s FP16 flow and Linux’s hidden section remain unverified. Do: Exercise the FP16 flow on one RTX 20–40 Windows PC and confirm the section is hidden on Linux.

@fix can do L6.

Checks: they run again on this head; a failure shows on the pull request.

More: does it help, other systems, switches, what was read

Does it help: Yes: the author reports adding both real files and running the FP16 model on Windows 11 with an RTX 5090. The revised ownership and background-check code has not yet been run.

Other systems: The feature is offered on Windows; Linux visibility and RTX 20–40 use remain untested. Storage and Remove everything also depend on the ownership record.

Switches: No switches added, changed or removed.

Reviewed: c588fbe690 against 1e5e5ed842: Read AGENTS.md, CONTRIBUTING.md, Core/Dlss5Files.cs, App/ViewModels/Dlss5FilesViewModel.cs, the fix diff, and the relevant Storage and Remove everything callers. Skimmed the base diff's file list and commits; the other changed files, translations, generated assets and screenshot images were not read in full.; nothing run (a code review).

Checked and fine:

  • The fix preserves the old destination when the initial ownership-record write fails.
  • Settings invalidates stale row checks and performs removal on a background task.
  • The ownership check compares file identity, metadata and SHA-256.

Testing: No commands that build or run the project were executed. CI has not run on this head; the reported Windows tests predate the fix.

Overlaps and merge order: PR #265 also changes Settings; the description flags a possible merge conflict. The pull request is currently reported as not mergeable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The reported Windows run shows that players can add and use the files, but the requested RTX 20–40 and Linux checks remain outstanding. An interrupted replacement can also leave an existing launcher copy unrecognized. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is c588fbe6908f. I rebased it onto `main` (1e5e5ed842e3). **Conflicts resolved** - App/ViewModels/StorageViewModel.cs: Kept builder storage changes and added DLSS 5 paths to measurement and its cache key. - App/Views/SettingsView.axaml: Kept the reorganized Settings page and added the DLSS 5 controls. - Core/Lang/de.json: Kept base translations and added DLSS 5 translations. - Core/Lang/es.json: Kept base translations and added DLSS 5 translations. - Core/Lang/fr.json: Kept base translations and added DLSS 5 translations. - Core/Lang/it.json: Kept base translations and added DLSS 5 translations. - Core/Lang/ja.json: Kept base translations and added DLSS 5 translations. - Core/Lang/ko.json: Kept base translations and added DLSS 5 translations. - Core/Lang/nl.json: Kept base translations and added DLSS 5 translations. - Core/Lang/pl.json: Kept base translations and added DLSS 5 translations. - Core/Lang/pt-BR.json: Kept base translations and added DLSS 5 translations. - Core/Lang/ru.json: Kept base translations and added DLSS 5 translations. - Core/Lang/zh-Hans.json: Kept base translations and added DLSS 5 translations. - Core/Lang/zh-Hant.json: Kept base translations and added DLSS 5 translations. - Core/RemoveEverything.cs: Kept builder data and DLSS 5 removal descriptions. - Core/Storage.cs: Kept builder storage and added the DLSS 5 storage kind and paths. - README.md: Kept the updated screenshot and builder documentation and added DLSS 5 coverage. - tests/test_launcher_core.py: Kept the builder checks and added the DLSS 5 FP16 list comparison. No tests or builds were run. - App/ViewModels/StorageViewModel.cs: Kept the base branch’s toolchain and version-folder handling and the pull request’s launcher-owned DLSS 5 file list. - Core/RemoveEverything.cs: Kept both the builder data description and the distinction for player-owned DLSS 5 files. - Core/Storage.cs: Kept the base branch’s storage fields and the pull request’s DLSS 5 ownership description. I edited its description to match the change. **Changed** - **Linked destination directories, Core/Dlss5Files.cs:278**: Reject linked or reparse-point destination ancestors during installation and removal; added Windows junction checks. - **Ownership record failure, Core/Dlss5Files.cs:178**: Write the ownership record before replacing the destination, so a record write failure reports an error and leaves the previous file in place. Added a failure check. Tests were not run, as requested. - **Verify ownership of changed DLSS 5 files**: Core/Dlss5Files.cs:219 records and verifies SHA-256 alongside file identity and metadata. tests/launcher_core/Dlss5Checks.cs:148 covers an in-place edit with the size and timestamp preserved. Tests were not run, as requested. - **Settings ownership checks**: Moved row ownership checks and removal to background tasks, discarded stale row results, and retained the fresh ownership check before deletion in App/ViewModels/Dlss5FilesViewModel.cs:163. No build or tests were run, as requested. Nothing was built or run: the checks run again on the new head. Players can add their own DLSS 5 files through Settings for use by Longshot versions. The fix strengthens ownership checks and moves Settings checks off the UI thread, at the cost of hashing installed files. **Should fix (1)**: not blocking, but worth doing before merging. - **L6** `Core/Dlss5Files.cs:179`: The ownership record is replaced before the destination file, leaving the two inconsistent if the launcher stops between those operations. (more on the line) **Do:** Make the record and replacement recoverable across interruption, for example by recording a pending replacement and reconciling it on the next ownership check. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L4**: The other supported GPU generations and Linux visibility have not had the runs described in the pull request. *When:* The reported end-to-end run covers an RTX 5090; an RTX 20, 30 or 40 player’s FP16 flow and Linux’s hidden section remain unverified. **Do:** Exercise the FP16 flow on one RTX 20–40 Windows PC and confirm the section is hidden on Linux. `@fix` can do L6. **Checks:** they run again on this head; a failure shows on the pull request. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes: the author reports adding both real files and running the FP16 model on Windows 11 with an RTX 5090. The revised ownership and background-check code has not yet been run. **Other systems:** The feature is offered on Windows; Linux visibility and RTX 20–40 use remain untested. Storage and Remove everything also depend on the ownership record. **Switches:** No switches added, changed or removed. **Reviewed:** c588fbe6908f against 1e5e5ed842e3: Read AGENTS.md, CONTRIBUTING.md, Core/Dlss5Files.cs, App/ViewModels/Dlss5FilesViewModel.cs, the fix diff, and the relevant Storage and Remove everything callers. Skimmed the base diff's file list and commits; the other changed files, translations, generated assets and screenshot images were not read in full.; nothing run (a code review). **Checked and fine:** - The fix preserves the old destination when the initial ownership-record write fails. - Settings invalidates stale row checks and performs removal on a background task. - The ownership check compares file identity, metadata and SHA-256. **Testing:** No commands that build or run the project were executed. CI has not run on this head; the reported Windows tests predate the fix. **Overlaps and merge order:** PR #265 also changes Settings; the description flags a possible merge conflict. The pull request is currently reported as not mergeable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
@ -0,0 +176,4 @@
Directory.CreateDirectory(Path.GetDirectoryName(place)!);
CheckDirectories(Path.GetDirectoryName(place)!);
// Record the temporary file's identity first. If the record cannot be written, the old file stays in place.
var previous = Record(folder);
Member

L6 (should fix): The ownership record is replaced before the destination file, leaving the two inconsistent if the launcher stops between those operations.

When: If the launcher exits or the PC loses power after writing the new record but before moving the temporary file, the previous launcher-installed file remains in place but no longer matches the record. Settings treats it as the player's file, and Remove everything leaves it behind.

Do: Make the record and replacement recoverable across interruption, for example by recording a pending replacement and reconciling it on the next ownership check.

**L6** (should fix): The ownership record is replaced before the destination file, leaving the two inconsistent if the launcher stops between those operations. *When:* If the launcher exits or the PC loses power after writing the new record but before moving the temporary file, the previous launcher-installed file remains in place but no longer matches the record. Settings treats it as the player's file, and Remove everything leaves it behind. **Do:** Make the record and replacement recoverable across interruption, for example by recording a pending replacement and reconciling it on the next ownership check.
@ -0,0 +313,4 @@
else throw new IOException("File identity is unavailable.");
var details = new FileInfo(path);
return new Entry(details.Length, details.LastWriteTimeUtc.Ticks, identity,
sha256 ?? Convert.ToHexStringLower(SHA256.HashData(file)));
Member

L5 (should fix): Ownership checks now hash entire model files synchronously on the UI thread.

When: When both files are installed, constructing or refreshing the Settings rows reads roughly 542 MB before the window can respond; Remove performs additional synchronous checks. Slower storage can make the launcher visibly pause.

Do: Perform ownership hashing off the UI thread and update the rows when the results arrive, while retaining a fresh ownership check before deletion.

**L5** (should fix): Ownership checks now hash entire model files synchronously on the UI thread. *When:* When both files are installed, constructing or refreshing the Settings rows reads roughly 542 MB before the window can respond; Remove performs additional synchronous checks. Slower storage can make the launcher visibly pause. **Do:** Perform ownership hashing off the UI thread and update the rows when the results arrive, while retaining a fresh ownership check before deletion.
Author
Member

Closing in favour of #328: the launcher is Rust + Slint since #284, so this C# PR can't merge. #328 ports it, with the fixes for L5 (no hashing on the window's thread: the rows use a quick match, a delete checks the SHA-256 off it) and L6 (a pending record line while a copy is put in place, settled on the next check) from the review above.

Closing in favour of #328: the launcher is Rust + Slint since #284, so this C# PR can't merge. #328 ports it, with the fixes for L5 (no hashing on the window's thread: the rows use a quick match, a delete checks the SHA-256 off it) and L6 (a pending record line while a copy is put in place, settled on the next check) from the review above.
pmwork-personal closed this pull request 2026-11-28 02:37:21 +00:00
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!282
No description provided.