fix(build): DLSS and FSR 4 only on GPUs that run them, no Prepare shaders switch, Longshot in the titles, a coloured log and the read's progress #79

Merged
HumanBean merged 2 commits from HumanBean/LongshotLauncher:fix/build-settings-ui into main 2026-11-15 08:02:03 +00:00
Owner

The build settings offered DLSS and FSR 4 on PCs that can't run them, kept a "Prepare shaders now" switch nobody should turn off, and the build page sat at 0% while it read the game and showed the log as one grey wall. This fixes those in one go.

What changed

  • DLSS and FSR 4 only where they run. Each switch is enabled only when a card runs it: GeForce RTX for DLSS, Radeon RX 6000 and newer for FSR 4 (SystemInfo.DlssRuns, FsrRuns, Offers). On Windows the launcher now reads the display adapters from the registry, by maker and name (App/WindowsGpus.cs). On Linux it still knows each card only by its maker. When no card is found, both stay on offer. A switch remembered from another PC is left out of the build and the report, and the row says why ("This PC has no GeForce RTX card.").
  • "Prepare shaders now" removed. Every build prepares the shaders. LauncherSettings.PrepareShaders is gone, and an older settings.json that has it still loads.
  • Linux FSR 4: choose your library. AMD publishes its signed runtime for Windows only, and Longshot can't include AMD's files, so on Linux the library is the player's. With FSR 4 on, a new FSR 4 library row has a Choose… button. The launcher checks the file (a 64-bit ELF under 256 MB), remembers it (LauncherSettings.FsrLibraryPath), and copies it into the game folder as amd_fidelityfx_upscaler_vk.so whenever a build with FSR 4 finishes, including updates and rebuilds (Core/FsrLibrary.cs). If the copy fails, the Ready page and the log say so. The notice no longer reads as unsupported: it explains this and doesn't tell players where to get the library.
  • Names. The build title reads "Building Longshot v3.0.0" (also Updating to / Rebuilding). The title bar reads "Longshot Launcher" with the launcher's version in small text beside it.
  • Show details. Each line starts with its level's tag (ERR, WRN, INF, DBG, TRC) in that level's colour. The level picker shows coloured swatches that build up with each level, so it's clear each level adds to the ones before it.
  • Read the game files progress. The unpacking sends no @@progress, so the row sat at 0% for minutes. Its row now moves with nup.py's MiB written lines, measured against the title's size from the title 0: ... romfs N files, X GB line. The unpacking fills 95% of the row, the checks after it the rest (measured: unpacking took 87 s of a 91 s read).
  • All 12 full catalogs have the new texts, and the leftovers are gone (scripts/translations.py: all complete).

Testing

Tested:

  • python -I tests/test_launcher_core.py: 1059 checks passed, 14 of them new. They cover the FSR 4 library check and copy (64-bit ELF taken; 32-bit, text or missing refused; the old copy replaced; the game folder left alone on a refusal), GPU makers from Windows device ids, which cards run DLSS and FSR 4, the offers with no card found, the read's progress from MiB lines (before the size, past the end, in another stage), log prefixes and lines with levels, and an old settings.json with prepareShaders.
  • python -I tests/test_release.py: OK.
  • dotnet build: no warnings.

Not tested: a real build through the launcher with these changes, and the copy with a real FSR 4 library. The screens are checked in the screenshots below. I also haven't run the Windows registry read on a Windows PC.

Screenshots

Drawn with the screenshot tool from #85, on this branch merged with it locally.

Linux with an AMD GPU: DLSS off and disabled, FSR 4 on with the library row

settings-linux

Windows with an RTX card: FSR 4 disabled, and the Prepare shaders switch gone

settings-windows

The Linux FSR 4 notice

fsr-linux-notice

Building Longshot v3.0.0, reading the game files at 48%, and Longshot Launcher with its version in the title bar

build

Show details at Debug: each line's coloured prefix and the picker's stacked swatches

build-log

The build settings offered DLSS and FSR 4 on PCs that can't run them, kept a "Prepare shaders now" switch nobody should turn off, and the build page sat at 0% while it read the game and showed the log as one grey wall. This fixes those in one go. ## What changed - **DLSS and FSR 4 only where they run.** Each switch is enabled only when a card runs it: GeForce RTX for DLSS, Radeon RX 6000 and newer for FSR 4 (`SystemInfo.DlssRuns`, `FsrRuns`, `Offers`). On Windows the launcher now reads the display adapters from the registry, by maker and name (`App/WindowsGpus.cs`). On Linux it still knows each card only by its maker. When no card is found, both stay on offer. A switch remembered from another PC is left out of the build and the report, and the row says why ("This PC has no GeForce RTX card."). - **"Prepare shaders now" removed.** Every build prepares the shaders. `LauncherSettings.PrepareShaders` is gone, and an older settings.json that has it still loads. - **Linux FSR 4: choose your library.** AMD publishes its signed runtime for Windows only, and Longshot can't include AMD's files, so on Linux the library is the player's. With FSR 4 on, a new **FSR 4 library** row has a **Choose…** button. The launcher checks the file (a 64-bit ELF under 256 MB), remembers it (`LauncherSettings.FsrLibraryPath`), and copies it into the game folder as `amd_fidelityfx_upscaler_vk.so` whenever a build with FSR 4 finishes, including updates and rebuilds (`Core/FsrLibrary.cs`). If the copy fails, the Ready page and the log say so. The notice no longer reads as unsupported: it explains this and doesn't tell players where to get the library. - **Names.** The build title reads "Building Longshot v3.0.0" (also Updating to / Rebuilding). The title bar reads "Longshot Launcher" with the launcher's version in small text beside it. - **Show details.** Each line starts with its level's tag (ERR, WRN, INF, DBG, TRC) in that level's colour. The level picker shows coloured swatches that build up with each level, so it's clear each level adds to the ones before it. - **Read the game files progress.** The unpacking sends no `@@progress`, so the row sat at 0% for minutes. Its row now moves with nup.py's `MiB written` lines, measured against the title's size from the `title 0: ... romfs N files, X GB` line. The unpacking fills 95% of the row, the checks after it the rest (measured: unpacking took 87 s of a 91 s read). - All 12 full catalogs have the new texts, and the leftovers are gone (`scripts/translations.py`: all complete). ## Testing **Tested:** - `python -I tests/test_launcher_core.py`: 1059 checks passed, 14 of them new. They cover the FSR 4 library check and copy (64-bit ELF taken; 32-bit, text or missing refused; the old copy replaced; the game folder left alone on a refusal), GPU makers from Windows device ids, which cards run DLSS and FSR 4, the offers with no card found, the read's progress from MiB lines (before the size, past the end, in another stage), log prefixes and lines with levels, and an old settings.json with prepareShaders. - `python -I tests/test_release.py`: OK. - `dotnet build`: no warnings. **Not tested:** a real build through the launcher with these changes, and the copy with a real FSR 4 library. The screens are checked in the screenshots below. I also haven't run the Windows registry read on a Windows PC. ## Screenshots Drawn with the screenshot tool from #85, on this branch merged with it locally. **Linux with an AMD GPU: DLSS off and disabled, FSR 4 on with the library row** ![settings-linux](https://git.magicbean.dev/attachments/74d4a5a5-6b9c-4dae-9d83-264ccecd0927) **Windows with an RTX card: FSR 4 disabled, and the Prepare shaders switch gone** ![settings-windows](https://git.magicbean.dev/attachments/22da2354-3d02-4f86-88a4-244ba9a09bd5) **The Linux FSR 4 notice** ![fsr-linux-notice](https://git.magicbean.dev/attachments/14693c3d-11a9-46d5-a491-c6400244f08f) **Building Longshot v3.0.0, reading the game files at 48%, and Longshot Launcher with its version in the title bar** ![build](https://git.magicbean.dev/attachments/30b4bc30-2f6a-4d94-9ff2-4b9949b2eefc) **Show details at Debug: each line's coloured prefix and the picker's stacked swatches** ![build-log](https://git.magicbean.dev/attachments/0e5a0feb-e404-4a93-b6f1-648294cc4bcf)
fix(build): the settings offer DLSS and FSR 4 only on GPUs that run them, every build prepares shaders, and the build page names Longshot and colours the log
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 14s
5955596a08
- The DLSS and FSR 4 switches are on offer only where a card runs them (GeForce RTX; Radeon RX 6000 and newer), or where no
  card was found; Windows' cards are now read from the registry, with their names. A remembered switch for a card this PC
  lacks is left out of the build.
- The "Prepare shaders now" switch is gone: every build prepares the shaders.
- The Linux FSR 4 notice says what is supported: the build compiles FSR 4 in and the game runs it with your Vulkan FSR 4 library.
- The build's title says "Building Longshot v3.0.0", and the title bar "Longshot Launcher" with its version, small.
- Show details: each line has its level's coloured prefix, and the level picker's swatches stack.
- Read the game files moves with the unpacking's "MiB written" lines against the title's size.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat(build): on Linux, choose your Vulkan FSR 4 library and the launcher copies it into each build
Some checks failed
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
f9bca37bb7
AMD publishes its FSR 4 runtime for Windows only and Longshot can't include AMD's files, so on Linux the library is the
player's. The FSR 4 row gets an FSR 4 library row (Choose…): the file is checked (a 64-bit ELF, under 256 MB), remembered
(LauncherSettings.FsrLibraryPath), and copied into the game folder as amd_fidelityfx_upscaler_vk.so when a build with FSR 4
finishes, an update or a rebuild too (Core/FsrLibrary.cs). A copy that fails says so on the Ready page and in the log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean force-pushed fix/build-settings-ui from f9bca37bb7
Some checks failed
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
to ff3d32d909
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
2026-11-15 07:57:53 +00:00
Compare
HumanBean changed title from WIP: fix(build): DLSS and FSR 4 only on GPUs that run them, no Prepare shaders switch, Longshot in the titles, a coloured log and the read's progress to fix(build): DLSS and FSR 4 only on GPUs that run them, no Prepare shaders switch, Longshot in the titles, a coloured log and the read's progress 2026-11-15 08:01:52 +00:00
HumanBean deleted branch fix/build-settings-ui 2026-11-15 08:02:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!79
No description provided.