feat: OptiScaler, off by default and turned on in Graphics: the builder places it, the game opens it, closes it on Esc and names it in logs #2985

Open
llun wants to merge 11 commits from llun/Longshot:feat/optiscaler-builder into main
Member

Summary

Players asked for OptiScaler, a GPL-3.0 mod that swaps upscalers. Until now
it only worked when a player copied it by hand as winmm.dll beside builds/default/longshot.exe, and nothing in the
game said it was there. A crash inside it read as winmm.dll+0x…, as if it were Windows', and its default keys clashed
with Longshot's: Insert opened both menus, and Page Up, Page Down and End are Longshot's menu keys.

This PR is the whole of it, the builder's side and the game's:

  • The game gets a Graphics switch (off by default, Windows only), a row that opens OptiScaler's menu, a Controls row
    for its menu key, Esc to close that menu, a log line and crash-report section naming it, and a footer line on the FPS
    counter while OptiScaler handles the frame.
  • The builder reads that switch and places OptiScaler v0.9.5's official files beside the game, unchanged and
    SHA-256-pinned, with its keys clear of Longshot's and its frame generation off. Turned off, it takes them out again,
    and sets a hand-placed copy aside.

The launcher lists the licences: LongshotLauncher#392.
No other launcher change is needed: it writes nothing.

Design: llun (ship OptiScaler's GPL/MIT parts with Longshot, off by default and turned on in the game's own menu; the
builder owns and places its files like Streamline; AMD/Intel files come from Longshot's own modules; its menu key, F5,
set in the game and never one of Longshot's; Esc closes its menu; its frame generation off; the FPS counter says when
it's in; Longshot's own upscalers named first, and no tagline).

The builder

The game's setting is the line optiscaler=1 in the profile's settings.ini. The builder reads it at each play, each
Rebuild (build --profile) and the game's Restart now. Turned on, a Windows build puts these beside longshot.exe:

Beside longshot.exe From OptiScaler's release archive License
winmm.dll OptiScaler.dll (signed by SignPath Foundation; longshot.exe imports winmm, so Windows loads it at start) GPL-3.0
fakenvapi.dll, fakenvapi.ini fakenvapi 1.4.1 MIT
OptiScaler.ini put there once; after that it belongs to OptiScaler (which saves its settings there), the game's Controls row and the player, and stays when OptiScaler is turned off GPL-3.0
data/licenses/optiscaler/ the licenses and the exact source links, from the tree (third_party/optiscaler/PROVENANCE.md)
  • Keys clear of Longshot's. When OptiScaler is placed, and before each play (outside mod-api's sandbox), its menu
    key is F5 and both frame-rate overlay keys are none. A key is rewritten to its default only when it is missing,
    auto, not a key, or one of Longshot's keys (Insert, F1, Esc, Home, Page Up, Page Down, End, F10, F11). Any other key
    is the player's and stays, so the menu key set in the game's Controls row survives.
  • No OptiScaler frame generation. On Vulkan, OptiScaler 0.9.5's only frame generation is Nukem9's dlssg-to-fsr3,
    which gives a black picture over Longshot's DLSS Frame Generation. Longshot's own FSR 3.1 and DLSS Frame Generation
    already do that work. So dlssg_to_fsr3_amd_is_better.dll is never taken or placed (a build takes out one placed
    earlier), and before each start [FrameGen] Enabled=false, FGInput=nofg, FGOutput=nofg and
    [Menu] FGShortcutKey=-1 are forced, whatever OptiScaler's menu saved. Every other line of OptiScaler.ini stays as
    it was.
  • Builder-owned, like Streamline. The files are in the game folder's note: verify checks them and --repair
    puts them back. Turned off, the files go and OptiScaler.ini stays: OptiScaler's own settings and the player's key
    are there again when it's turned on (delete the file for OptiScaler's defaults). A player's own OptiScaler (a DLL the builder
    didn't place whose version strings name OptiScaler, as winmm.dll, winhttp.dll or dbghelp.dll) is left alone
    (kept): nothing is placed beside it, and the builder's own files leave, so two copies never load. If nothing can be downloaded,
    the build goes on without OptiScaler (optiscaler_skipped) and a play tries again 10 minutes later. info lists
    the optiscaler capability and the record's state (build.optiscaler: placed, kept, skipped).
  • Off means off for a player's own copy too. With the setting off, before each play, Rebuild and Restart now, a
    DLL the builder didn't place, sitting under a name the game loads (winmm.dll, winhttp.dll or dbghelp.dll), is
    renamed to <name>.off in one rename when its version strings name OptiScaler. The name is recorded
    (longshot_build.json's optiscaler_aside). With the setting on, it is renamed back (if the name is free) and kept as
    the player's. A name in the way or a refused rename is reported (optiscaler_aside_taken, optiscaler_aside_failed)
    and never fails the play; renames the record can't be written for are taken back. A DLL that isn't OptiScaler is
    never touched.
  • Never AMD's, Intel's or Microsoft's files. The archive's FidelityFX, XeSS/XeLL and D3D12 files are not taken.
    No name Longshot places itself (amd_fidelityfx_loader_vk.dll, amd_fidelityfx_upscaler_vk.dll, libxess.dll) is
    touched: OptiScaler uses the FSR 4 and XeSS files of the modules the player chose. Every DLL sits at the folder's top
    level, which is what mod-api's sandbox grants.
  • Windows only. The Linux and Steam Deck game can't load a Windows DLL, so the setting is ignored there.
  • No profile.json key and no licence screen. The GPL and MIT need no acceptance to run, so the license texts go
    beside the files instead.

How it ships, and why. OptiScaler's files are fetched by pin, as every other third-party runtime is. On the
player's PC the builder downloads OptiScaler's own v0.9.5 release archive from GitHub once
(Optiscaler_0.9.5-final.20261116.7z, 70 MB, checked against GitHub's SHA-256). It takes the files out with
Windows' own tar, which reads a .7z, checks each against its own SHA-256, keeps them in <cache>/runtimes/ and
deletes the archive.

I didn't put them inside the release file because that doesn't fit Longshot's release design. A release's
longshot-builder carries only the tree (the repository holds no binaries; its largest file is 2.7 MB) and
tools.lock archives in Longshot's store, which only a MagicBeanAdmin Release run can upload. It would also add
26 MB to every Windows player's download, while most players never turn OptiScaler on. Fetching by pin gives the same
official bytes, checked the same way, with no admin step. The licenses and the source offer still ship in the release,
in the tree. If the team prefers the store route later, the pins and the placement stay as they are; only where the
archive comes from changes.

The game

  • Graphics → OptiScaler (Windows only), right under the Upscaler.
    • Setting: Off (default) or On, saved as optiscaler= with the other rows. The builder reads it before the game
      starts, so a change applies at the next start (Restart now).
    • Help: three short paragraphs. What it is; what it needs (the DLSS module with NVIDIA DLSS or DLAA, with
      Longshot's own FSR 3.1, DLSS, FSR 4 and XeSS named first); and the licences (OptiScaler GPL-3.0, fakenvapi MIT).
    • Its On/Off line: says whether OptiScaler is in the game. When Off, it says a copy put there by hand is renamed
      aside (winmm.dll.off; the builder does that).
  • Graphics → Open OptiScaler, shown while OptiScaler is loaded. It closes Longshot's menu (menu_close, which acts as
    Insert), then gives OptiScaler its menu key once Longshot's menu has closed, posted to the window as Esc's close is.
    Where that key is Longshot's, off, or bound to a game control, its line says to choose another in Controls.
  • OptiScaler's key comes first while OptiScaler is in the game:
    • Kept from OptiScaler while Longshot's menu is open, so its menu never opens over Longshot's: a window procedure
      above OptiScaler's drops that key's messages (the menu still reads the key's state).
    • Pressed with Longshot's menu open (anywhere but the Controls page), it closes Longshot's menu as Open OptiScaler
      does, and OptiScaler's menu opens once Longshot's has closed and the key is let go.
    • With the restart question, OptiScaler's menu waits for the answer: Later opens it; Restart now doesn't, nor does
      the game that starts again (menu_restarting).
    • No control can be bound to it: on the Controls page the key does nothing, and a binding cell keeps listening,
      its line saying the key stays OptiScaler's until another is chosen in its row and the game starts again. A control
      that had the key already (from before, or by hand) is named on the OptiScaler menu key row and on Open OptiScaler.
  • Controls → OptiScaler menu key, shown while OptiScaler is loaded.
    • Keys offered: F2–F9, Pause, Scroll Lock (foreign_dlls::offered_keys). Never Insert, F1, Esc, Home, Page Up,
      Page Down, End, F10 or F11, and never a key bound to a control.
    • What it writes: only the [Menu] ShortcutKey line of OptiScaler.ini. It writes a new copy beside it, moves it
      over the old one, and keeps the file's line endings.
    • Where the game may not write that file (mod-api's sandbox, or a read-only file), the row is locked beforehand,
      with a line saying the builder sets the key (F5) when it starts the game. The check (file_writable) opens the file
      for writing and closes it, writing nothing.
    • When it applies: OptiScaler reads the key at its start, so until the game starts again, Open OptiScaler presses
      the key OptiScaler started with.
    • No other keys: OptiScaler's frame generation and FPS overlay get no key: Longshot has its own of both.
  • Esc closes OptiScaler's open menu. While its menu is open, OptiScaler swallows the window's key presses, but not
    the keys' state.
    • How it's detected: an Esc that went down but whose press never reached the window within 80 ms was taken by
      OptiScaler's menu.
    • How it closes: the game posts OptiScaler's menu key to its own window, where OptiScaler's hook toggles the menu.
      SendInput doesn't work for this: OptiScaler 0.9.5 drops the game's SendInput while its menu is open.
    • When it applies: only with OptiScaler in the game, the window focused, and the Keyboard row letting Esc count.
  • The log and the crash report (gpu/vk/foreign_dlls.h).
    • What counts as foreign: the DLLs loaded from the game's folder that aren't Longshot's: one standing in for a
      System32 DLL, an ASI plugin, or OptiScaler under any name.
    • What's read: each DLL's version and Authenticode signer, offline, on a thread of its own (the signature check
      takes ~145 ms for OptiScaler's 26 MB). A signature Windows could neither trust nor reject reads "signature not
      checked (error …)", never "not signed".
    • Logged once, for example: report: foreign WINMM.dll (OptiScaler 0.9.5-final (90d9568), signed by SignPath Foundation, in place of Windows' own). Names, versions and signers only, never a folder.
    • Crash report: it reads that line (builder/crates/crash facts.rs) and gives it its own section, "DLLs beside
      the game that are not Longshot's".
  • The FPS counter's footer, where it shows (Dev, or with "Version and hardware at every level"), adds "Through
    OptiScaler 0.9.5" under the upscaler's line only while OptiScaler handles the frame: NVIDIA DLSS or DLAA drew it in
    gameplay, OptiScaler is loaded, and its OptiScaler.ini takes DLSS's inputs ([Inputs] EnableDlssInputs, read again
    at most every 2 s).
    • Why its own line: the footer shortens long lines from the end, so this short line is never cut. OptiScaler may
      swap the engine the line above names, which Longshot can't see, so the line names none.
    • Nothing else in the counter changes. At the title, with FSR, XeSS or no upscaler, or without OptiScaler, the
      counter is identical. With it, the footer is one line taller, and a window too short for everything drops this line
      first.
  • Docs. docs/user/optiscaler.md (new): Longshot's own upscalers first, turning it on, why its frame generation
    stays off, putting it in by hand, using it, and what to do when something goes wrong; Windows only. Also updated: the
    Graphics and Controls guide, the optiscaler= line in the switches reference, and
    build.md's OptiScaler.

Read first: builder/crates/build-driver/src/runtimes.rs (OPTISCALER_*, fetch_optiscaler, and archived_runtime,
which is Streamline's archive fetch made general), builder/crates/build-driver/src/optiscaler.rs (the setting, the
keys and the ini lines), build.rs's optiscaler_settings, play.rs (Profile::optiscaler_wanted,
RebuildReason::OptiScaler, the keys before each start); then gpu/vk/foreign_dlls.cpp, gpu/vk/menu/optiscaler.cpp,
vk_menu.cpp's menu_close and optiscaler_keys_tick call, and the footer's line 6.

Testing

Tested: Windows 11 (10.0.26300), RTX 5080, NVIDIA 621.40, Ryzen 9 7900X. Game folders built by this branch's
longshot-builder from the .nup through the job queue (DLSS module, Ocarina of Time), and this branch's runtimes over
main's base (56823e27a), through the queue.

The builder:

  • First build with the setting on: the builder downloaded the v0.9.5 archive from GitHub, took out the five files with
    System32 tar, each matching its pin, and left no archive behind. The game folder got winmm.dll, the three other
    files and data/licenses/optiscaler/. verify reported the folder intact (56 files) and counted OptiScaler.ini
    as the player's data.

  • Played: WINMM.dll from the game folder is in the game's module list. OptiScaler's own log says "OptiScaler
    v0.9.5-final (90d9568) loaded", "working as winmm.dll", Menu.ShortcutKey: 0x74, Menu.FpsShortcutKey: -1,
    Menu.FpsCycleShortcutKey: -1. It hooked Vulkan (vkQueueSubmit, vkCreateInstance and vkCreateDevice) and NGX
    (NVSDK_NGX_VULKAN_Init_ProjectID_Ext result 1), and the game ran.

  • A player's own OptiScaler (OptiScaler.dll plus one byte, so not the pinned file) put by hand as winmm.dll. With
    optiscaler=0, a Rebuild set it aside as winmm.dll.off (no build needed). With optiscaler=1, it went back as
    winmm.dll, and the update recorded optiscaler: kept with none of the builder's files placed over it. The reader
    found OptiScaler in OptiScaler.dll's version strings and not in Windows' own winmm.dll or dbghelp.dll.

  • Frame generation off (@ ec2b30550): the build placed winmm.dll, fakenvapi.dll/.ini and the licenses, with no
    dlssg_to_fsr3_amd_is_better.dll. In the game, OptiScaler's own log read FrameGen.Enabled: false,
    FrameGen.FGInput: nofg, FrameGen.FGOutput: nofg, Menu.FGShortcutKey: -1 and Menu.ShortcutKey: 0x74.

  • An update from an earlier build: the builder at b78d0f558 (before frame generation was turned off) placed OptiScaler
    with dlssg_to_fsr3_amd_is_better.dll and data/licenses/optiscaler/LICENSE-dlssg-to-fsr3.md, both on disk and in
    the note. The next build with this branch's builder logged "LICENSE-dlssg-to-fsr3.md, dlssg_to_fsr3_amd_is_better.dll
    removed", took both out of the note too, and kept the rest of OptiScaler placed. A player's own copy of that DLL
    (other bytes, not in the note) stayed through an off build and an on build, and verify listed it as not the
    builder's, left as it is.

  • Setting off (before 98812f6a0, when Off still removed the ini; no optiscaler= line; profile.json's leftover "optiscaler": true ignored): the build removed all
    eight files and OptiScaler.ini. Setting on again (optiscaler=1): the build placed them back from the cache
    (7 s, no download), with the F5/off keys written into a fresh OptiScaler.ini.

  • BeanBot's review fixes (@ 3474f9655), same profile, through the queue:

    • A player's own OptiScaler.ini (with their F7 key) there before On: a Rebuild with optiscaler=1 placed
      OptiScaler beside it and left it the player's (F7 kept; frame generation and the overlay keys forced off as for
      any). With optiscaler=0, the next Rebuild kept it and removed only the builder's files.
  • Its settings kept through Off (@ 98812f6a0, llun's decision), in the game through the queue: a play with
    optiscaler=1 placed OptiScaler and seeded its ini (F5), and the game logged report: foreign WINMM.dll (OptiScaler …). Controls → OptiScaler menu key set F6. Graphics → OptiScaler Off, then Restart Now: the builder
    removed winmm.dll, fakenvapi's files and the licenses, kept OptiScaler.ini (F6), and the restarted game had no
    OptiScaler. On, then Restart Now: OptiScaler placed again with the same ini, not reseeded (F6 kept, frame generation
    still forced off), and F6 opened OptiScaler's menu.

The game (OptiScaler 0.9.5 from its GitHub release, SHA-256 checked against GitHub's digest, copied in as winmm.dll):

  • The log line: report: foreign WINMM.dll (OptiScaler 0.9.5-final (90d9568), signed by SignPath Foundation, in place of Windows' own), from the background scan.
  • OptiScaler takes Longshot's DLSS: its own log shows NVSDK_NGX_VULKAN_CreateFeature1 … Creating new dlss upscaler.
    In its menu I switched the upscaler to FSR 3.1.6, and its overlay read "Vulkan | FSR 3.1.6 | Input: DLSS".
  • Graphics → OptiScaler: shows under the Upscaler. On saved optiscaler=1 and showed "Restart needed"; Off saved
    optiscaler=0. The help panel shows its three paragraphs, nothing cut off.
  • Open OptiScaler: closed Longshot's menu and opened OptiScaler's (F5).
  • Esc:
    • Closes it: a quick Esc tap closed OptiScaler's menu three times out of three (opened with F5 twice, and with Open
      OptiScaler once), and Longshot's menu didn't open.
    • Without OptiScaler's menu: with it closed, Esc opened Longshot's menu as usual, and the game logged no close.
  • Controls → OptiScaler menu key:
    • Insert: with the ini at auto, the row showed Insert and its line said Longshot uses it.
    • Stepping: it went F2, …, F7, each step changing only that line (no temp file left). Open OptiScaler meanwhile
      showed Insert, the key OptiScaler still ran with, and pointed to Controls. After a restart, F7 worked.
    • Taken keys: with another of OptiScaler's keys on F7 (set through a frame generation key row since removed),
      stepping skipped F7.
    • A key bound to a control: with F6 bound to Minus (its second keyboard slot) and OptiScaler's other keys off,
      stepping right from F5 went to F7, and left from F7 back to F5; the game logged "OptiScaler's menu key set to F7"
      and then "… to F5", and OptiScaler.ini read 0x76, then 0x74.
    • Its own key bound to a control: with F5 bound to Minus by hand, the row read "This key is F5, which the game's
      Minus control uses too: choose another", Open OptiScaler was locked with the same words, and stepping went F5 → F6
      (the warning gone) and back to F4, skipping F5.
    • Locked: with OptiScaler.ini read-only, the row was locked with its builder line, and stepping left the file
      unchanged.
  • OptiScaler's key first (@ a56796748):
    • Controls page: F5 there didn't open OptiScaler's menu, with or without a binding cell listening. Pressed while
      Minus's keyboard cell listened, the cell kept listening with "F5 is OptiScaler's menu key and stays its own…", and
      settings.ini kept key_minus=77,0.
    • Longshot's menu open, no restart waiting: F5 closed Longshot's menu and opened OptiScaler's ("this menu closes,
      then OptiScaler's opens", then "OptiScaler's menu opened").
    • Restart Now: with OptiScaler switched On, F5 brought the restart question with OptiScaler's menu shut. Restart
      Now restarted the game; no "opened" line in that run, and the new run started with OptiScaler's menu shut.
    • Later: switched back Off, F5 brought the question with OptiScaler's menu shut; Later closed Longshot's menu and
      opened OptiScaler's.
    • Open OptiScaler: closed Longshot's menu and opened OptiScaler's through the same path.
    • In play: F5 opened and closed OptiScaler's menu as before.
    • One start of these runs lost the GPU (VK_ERROR_DEVICE_LOST, an NVIDIA graphics exception) during the intro
      movie, before any menu opened; the same build started cleanly the four times after. Nothing this PR changes runs
      there; noted here rather than left out.
  • The FPS counter: at Dev, "Through OptiScaler 0.9.5" was absent at the title screen and with XeSS in gameplay, and
    present with DLSS in gameplay, under "Upscaling: DLSS Quality". It is whole in the narrowest case (Small, a 1280x720
    window, below Graph, version and hardware at every level).
  • OptiScaler's frame generation (before it was turned off): with Longshot's DLSS FG through NGX, Nukem's mode made a
    black picture (GPU at 100%), and turning Longshot's frame generation off brought the picture back. That's why it stays
    off.
  • Exit: the game exited cleanly with OptiScaler in.

Together, through the builder with a profile: Graphics > OptiScaler On wrote optiscaler=1, and Restart now (exit 75)
ran the builder's fast check ("OptiScaler choice changed") and an update. The game then logged the report: foreign
line above, the record said placed, and OptiScaler.ini had F5 and the other keys off. F5 opened OptiScaler's menu, and
Esc closed it while Longshot's menu stayed shut. Off with Restart now (before 98812f6a0) removed every file, its licenses and
OptiScaler.ini. No screenshots: the menu draws in the game's own font, a game file.

Game-free checks:

  • build-driver:
    • optiscaler::tests: the placed menu key is F5 and the overlay keys none, never one of Longshot's. A player's key is
      kept, and one of Longshot's, auto or unreadable goes back to its default. OptiScaler's frame generation lines and
      its key are forced off whatever they held. CRLF and BOM are kept, a missing line or [Menu] is added, a non-UTF-8
      file is left alone, and the game's optiscaler= line is read. A DLL is recognized as OptiScaler by its version
      strings alone. A player's own copy is set aside and put back, a name in the way is left alone and reported, and the
      builder's own copy or a non-OptiScaler DLL is never renamed.
    • runtimes::tests: the pins, no AMD/Intel/Microsoft file and no Longshot name. The archive is taken once and the
      settings are seeded only when missing. A player's own OptiScaler is kept. Offline, OptiScaler is left out with its
      own warning and mark and retried 10 minutes later. The tree's licenses are there, and the GPL text is byte-for-byte
      OptiScaler's.
    • play::tests: the setting changes the profile's key only while on and only on Windows, and profile.json is
      untouched. A skipped OptiScaler is retried, and its keys are settled before each start only for the builder's own
      OptiScaler. A rename aside whose record can't be written is taken back.
    • From BeanBot's review (3474f9655) and after: Off, skipped and kept builds leave OptiScaler.ini byte for byte,
      and On again keeps the player's lines and settles the forced ones without reseeding; a missing ini is seeded again
      (build::optiscaler_settings_tests); a player's OptiScaler as winhttp.dll or dbghelp.dll is kept
      alone, nothing downloaded or placed, the builder's own files out (runtimes); a non-OptiScaler DLL under those
      names, or one the builder placed, isn't taken for the player's.
  • tests/test_foreign_dlls.py (new): which modules count, the log text (no folder), the unchecked-signature text; the
    ini's keys (auto, hex, decimal, -1, other sections), the key names, the clashing and offered keys; the one-line ini
    rewrite (CRLF, a missing line, a missing [Menu]); whether OptiScaler takes DLSS's inputs; on Windows, a real scan of
    a version.dll beside the test program (found, not signed), one in another folder (not listed), the background
    start's single log line, and file_writable (a writable file, a read-only one, a missing one). The same check passes
    on Linux (WSL Ubuntu 24.04, g++), the Windows parts left out.
  • tests/test_fps_stats.cpp: the OptiScaler line's text, and that only DLSS or DLAA drawn by the engine counts.
  • cargo test -p crash the_foreign_dlls_line_is_read.
  • Updated, not weakened: test_menu_ini_keys (the new keys optiscaler and optiscaler_key in FROZEN, on purpose),
    test_settings_table, test_dlss5_menu (the rows' order), test_keyboard_menu_option, test_menu_i18n. At
    a56796748 the menu checks (test_foreign_dlls, test_menu_ini_keys, test_settings_table, test_dlss5_menu,
    test_menu_i18n, test_menu_hooks, test_menu_text_field, test_fps_stats, test_utf8_paths,
    test_keyboard_menu_option with g++) pass again; test_menu_keys fails as on main (a stale source cut).

cargo clippy -D warnings and cargo fmt --check are clean, and build-driver's 191 tests pass (at 98812f6a0). The longshot-builder
tests that fail here (6 unit tests, 3 in hot_split.rs) are this PC's Windows path-spelling and no-clang cases in tests
this PR doesn't touch. mise run test at 1300dab32 (Windows, 12 at once): 826 passed, 54 failed, 48 skipped. The same
54 checks fail on main @ 56823e27a on this PC, and none other does here: POSIX-only calls, stale source cuts and
missing tools on Windows. CI's Linux run is the reference.

Still to test:

  • Windows, AMD Radeon (RDNA 3 or 4, with FSR 4) and Intel Arc, with the DLSS module built: turn OptiScaler on in the game
    and restart. Expecting OptiScaler's menu on F5, Open OptiScaler and Esc working, the report: foreign line, and its
    upscaler list naming the game's FSR 4 / XeSS files. Whether Longshot's NVIDIA DLSS row becomes available with
    OptiScaler's NGX in place is the open question (@Beanstalk, once a BigBean approves).
  • Linux / Steam Deck: optiscaler=1 changes nothing (no files, no update, no rows) (by hand, any Linux PC).

Measurements

Verdict: nothing changes for a profile with OptiScaler off, which is the default. Turned on, it costs one 70 MB
download per PC, 26.6 MB in the game folder, and a ~145 ms signature check off the renderer's start.

Setup: Windows 11, Ryzen 9 7900X, NVMe, this PC's connection. A game folder built by this branch from the .nup with
warm caches.

Before: main @ 56823e27a After: this PR @ 98812f6a0
Build or play with OptiScaler off no OptiScaler work the same: one small read of settings.ini, nothing placed or downloaded, the profile's key unchanged (no update)
Turning it on, the first time on a PC n/a the archive's download 1.8 s and its tar extraction 2.7 s, on top of an update (the whole update took under a minute here)
Turning it on or off again (warm caches) n/a an update of 5-7 s (no download)
Game folder size n/a +26.6 MB (OptiScaler's files, its settings, the licenses), the same again in <cache>/runtimes/
The game's start with OptiScaler in n/a Windows' offline signature check of its 26 MB DLL, ~145 ms (5 runs: 143–163 ms), on a thread of its own, not waited for

Nothing per frame: the scan runs once, and the rows only do work when used. The footer's check reads OptiScaler.ini
at most every 2 s, and only while the counter's footer shows. The game's frame rate with OptiScaler loaded is
OptiScaler's own, and only for players who turn it on.

No switch is added or changed: LONGSHOT_CACHE appears only in a test's environment, and LONGSHOT_KEYS is a Rust
constant (build_driver::optiscaler::LONGSHOT_KEYS, the keys OptiScaler's may not be), not a variable.

Risks

  • Off (the default): nothing changes. No file is placed, nothing is downloaded, no update happens, no log line, no
    rows apart from the Off switch, and the counter is the same.
  • On: OptiScaler is a third-party DLL in the game's process. Crashes or rendering problems it causes are OptiScaler's,
    and the report: foreign line makes them visible in logs and crash reports. Turning it off in the game removes every
    file the builder put there at the next start.
  • Writing OptiScaler.ini: the game writes it only when the player changes the key, and only that line.
  • Under mod-api's sandbox (not on main; read from its code, not run): the game folder is never written from
    inside, so the key row is locked, and OptiScaler's own menu can't save its settings there either (they last until the
    game closes). How the sandbox
    could let it save without letting the ini pick DLLs to load is in a comment below, for mod-api's maintainer.
  • GitHub releases aren't immutable. An archive that changes no longer matches the pin and is refused
    (optiscaler_skipped, not retried at a play for that pin), and the game runs without OptiScaler.
  • A game started without the builder (no builder channel) picks up a changed setting only at its next start
    through the builder.
  • Undoing it: a revert is enough. Saves are untouched. longshot_options.ini gains optiscaler=0, which an older
    game ignores.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.
    (One new part, third_party/optiscaler/ (fakenvapi's upstream license text, unmodified, and its PROVENANCE.md with
    tree-sha256), as the third_party rule asks. No existing part changed and no binary committed. OptiScaler is GPL-3.0
    and fakenvapi is MIT, both compatible with Longshot's GPL-3.0.)

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: the game built and ran with
    llvm-mingw. Linux: foreign_dlls.cpp, menu/optiscaler.cpp and vk_menu.cpp compile with g++ on WSL Ubuntu 24.04,
    and test_foreign_dlls.py passes there; the Windows parts are under _WIN32. Paths: module paths come from
    GetModuleFileNameW, made UTF-8; file_writable opens with CreateFileW from UTF-8; the narrow ifstream and
    MoveFileExA are UTF-8 under the exe's activeCodePage UTF-8, which the game requires at its start.)
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary Players asked for [OptiScaler](https://github.com/optiscaler/OptiScaler), a GPL-3.0 mod that swaps upscalers. Until now it only worked when a player copied it by hand as `winmm.dll` beside `builds/default/longshot.exe`, and nothing in the game said it was there. A crash inside it read as `winmm.dll+0x…`, as if it were Windows', and its default keys clashed with Longshot's: Insert opened both menus, and Page Up, Page Down and End are Longshot's menu keys. This PR is the whole of it, the builder's side and the game's: - **The game** gets a Graphics switch (off by default, Windows only), a row that opens OptiScaler's menu, a Controls row for its menu key, Esc to close that menu, a log line and crash-report section naming it, and a footer line on the FPS counter while OptiScaler handles the frame. - **The builder** reads that switch and places OptiScaler v0.9.5's official files beside the game, unchanged and SHA-256-pinned, with its keys clear of Longshot's and its frame generation off. Turned off, it takes them out again, and sets a hand-placed copy aside. The launcher lists the licences: [LongshotLauncher#392](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/392). No other launcher change is needed: it writes nothing. Design: **llun** (ship OptiScaler's GPL/MIT parts with Longshot, off by default and turned on in the game's own menu; the builder owns and places its files like Streamline; AMD/Intel files come from Longshot's own modules; its menu key, F5, set in the game and never one of Longshot's; Esc closes its menu; its frame generation off; the FPS counter says when it's in; Longshot's own upscalers named first, and no tagline). ### The builder The game's setting is the line `optiscaler=1` in the profile's `settings.ini`. The builder reads it at each play, each Rebuild (`build --profile`) and the game's Restart now. Turned on, a Windows build puts these beside `longshot.exe`: | Beside `longshot.exe` | From OptiScaler's release archive | License | |---|---|---| | `winmm.dll` | `OptiScaler.dll` (signed by SignPath Foundation; longshot.exe imports winmm, so Windows loads it at start) | GPL-3.0 | | `fakenvapi.dll`, `fakenvapi.ini` | fakenvapi 1.4.1 | MIT | | `OptiScaler.ini` | put there once; after that it belongs to OptiScaler (which saves its settings there), the game's Controls row and the player, and stays when OptiScaler is turned off | GPL-3.0 | | `data/licenses/optiscaler/` | the licenses and the exact source links, from the tree (`third_party/optiscaler/PROVENANCE.md`) | | - **Keys clear of Longshot's.** When OptiScaler is placed, and before each play (outside mod-api's sandbox), its menu key is F5 and both frame-rate overlay keys are none. A key is rewritten to its default only when it is missing, `auto`, not a key, or one of Longshot's keys (Insert, F1, Esc, Home, Page Up, Page Down, End, F10, F11). Any other key is the player's and stays, so the menu key set in the game's Controls row survives. - **No OptiScaler frame generation.** On Vulkan, OptiScaler 0.9.5's only frame generation is Nukem9's dlssg-to-fsr3, which gives a black picture over Longshot's DLSS Frame Generation. Longshot's own FSR 3.1 and DLSS Frame Generation already do that work. So `dlssg_to_fsr3_amd_is_better.dll` is never taken or placed (a build takes out one placed earlier), and before each start `[FrameGen] Enabled=false`, `FGInput=nofg`, `FGOutput=nofg` and `[Menu] FGShortcutKey=-1` are forced, whatever OptiScaler's menu saved. Every other line of `OptiScaler.ini` stays as it was. - **Builder-owned, like Streamline.** The files are in the game folder's note: `verify` checks them and `--repair` puts them back. Turned off, the files go and `OptiScaler.ini` stays: OptiScaler's own settings and the player's key are there again when it's turned on (delete the file for OptiScaler's defaults). A player's own OptiScaler (a DLL the builder didn't place whose version strings name OptiScaler, as `winmm.dll`, `winhttp.dll` or `dbghelp.dll`) is left alone (`kept`): nothing is placed beside it, and the builder's own files leave, so two copies never load. If nothing can be downloaded, the build goes on without OptiScaler (`optiscaler_skipped`) and a play tries again 10 minutes later. `info` lists the `optiscaler` capability and the record's state (`build.optiscaler`: `placed`, `kept`, `skipped`). - **Off means off for a player's own copy too.** With the setting off, before each play, Rebuild and Restart now, a DLL the builder didn't place, sitting under a name the game loads (`winmm.dll`, `winhttp.dll` or `dbghelp.dll`), is renamed to `<name>.off` in one rename when its version strings name OptiScaler. The name is recorded (`longshot_build.json`'s `optiscaler_aside`). With the setting on, it is renamed back (if the name is free) and kept as the player's. A name in the way or a refused rename is reported (`optiscaler_aside_taken`, `optiscaler_aside_failed`) and never fails the play; renames the record can't be written for are taken back. A DLL that isn't OptiScaler is never touched. - **Never AMD's, Intel's or Microsoft's files.** The archive's FidelityFX, XeSS/XeLL and D3D12 files are not taken. No name Longshot places itself (`amd_fidelityfx_loader_vk.dll`, `amd_fidelityfx_upscaler_vk.dll`, `libxess.dll`) is touched: OptiScaler uses the FSR 4 and XeSS files of the modules the player chose. Every DLL sits at the folder's top level, which is what mod-api's sandbox grants. - **Windows only.** The Linux and Steam Deck game can't load a Windows DLL, so the setting is ignored there. - **No profile.json key and no licence screen.** The GPL and MIT need no acceptance to run, so the license texts go beside the files instead. **How it ships, and why.** OptiScaler's files are fetched by pin, as every other third-party runtime is. On the player's PC the builder downloads OptiScaler's own v0.9.5 release archive from GitHub once (`Optiscaler_0.9.5-final.20261116.7z`, 70 MB, checked against GitHub's SHA-256). It takes the files out with Windows' own `tar`, which reads a .7z, checks each against its own SHA-256, keeps them in `<cache>/runtimes/` and deletes the archive. I didn't put them inside the release file because that doesn't fit Longshot's release design. A release's `longshot-builder` carries only the tree (the repository holds no binaries; its largest file is 2.7 MB) and `tools.lock` archives in Longshot's store, which only a MagicBeanAdmin Release run can upload. It would also add 26 MB to every Windows player's download, while most players never turn OptiScaler on. Fetching by pin gives the same official bytes, checked the same way, with no admin step. The licenses and the source offer still ship in the release, in the tree. If the team prefers the store route later, the pins and the placement stay as they are; only where the archive comes from changes. ### The game - **Graphics → OptiScaler** (Windows only), right under the Upscaler. - **Setting:** Off (default) or On, saved as `optiscaler=` with the other rows. The builder reads it before the game starts, so a change applies at the next start (Restart now). - **Help:** three short paragraphs. What it is; what it needs (the DLSS module with NVIDIA DLSS or DLAA, with Longshot's own FSR 3.1, DLSS, FSR 4 and XeSS named first); and the licences (OptiScaler GPL-3.0, fakenvapi MIT). - **Its On/Off line:** says whether OptiScaler is in the game. When Off, it says a copy put there by hand is renamed aside (`winmm.dll.off`; the builder does that). - **Graphics → Open OptiScaler**, shown while OptiScaler is loaded. It closes Longshot's menu (`menu_close`, which acts as Insert), then gives OptiScaler its menu key once Longshot's menu has closed, posted to the window as Esc's close is. Where that key is Longshot's, off, or bound to a game control, its line says to choose another in Controls. - **OptiScaler's key comes first** while OptiScaler is in the game: - **Kept from OptiScaler while Longshot's menu is open**, so its menu never opens over Longshot's: a window procedure above OptiScaler's drops that key's messages (the menu still reads the key's state). - **Pressed with Longshot's menu open** (anywhere but the Controls page), it closes Longshot's menu as Open OptiScaler does, and OptiScaler's menu opens once Longshot's has closed and the key is let go. - **With the restart question**, OptiScaler's menu waits for the answer: Later opens it; Restart now doesn't, nor does the game that starts again (`menu_restarting`). - **No control can be bound to it:** on the Controls page the key does nothing, and a binding cell keeps listening, its line saying the key stays OptiScaler's until another is chosen in its row and the game starts again. A control that had the key already (from before, or by hand) is named on the OptiScaler menu key row and on Open OptiScaler. - **Controls → OptiScaler menu key**, shown while OptiScaler is loaded. - **Keys offered:** F2–F9, Pause, Scroll Lock (`foreign_dlls::offered_keys`). Never Insert, F1, Esc, Home, Page Up, Page Down, End, F10 or F11, and never a key bound to a control. - **What it writes:** only the `[Menu] ShortcutKey` line of `OptiScaler.ini`. It writes a new copy beside it, moves it over the old one, and keeps the file's line endings. - **Where the game may not write that file** (mod-api's sandbox, or a read-only file), the row is locked beforehand, with a line saying the builder sets the key (F5) when it starts the game. The check (`file_writable`) opens the file for writing and closes it, writing nothing. - **When it applies:** OptiScaler reads the key at its start, so until the game starts again, Open OptiScaler presses the key OptiScaler started with. - **No other keys:** OptiScaler's frame generation and FPS overlay get no key: Longshot has its own of both. - **Esc closes OptiScaler's open menu.** While its menu is open, OptiScaler swallows the window's key presses, but not the keys' state. - **How it's detected:** an Esc that went down but whose press never reached the window within 80 ms was taken by OptiScaler's menu. - **How it closes:** the game posts OptiScaler's menu key to its own window, where OptiScaler's hook toggles the menu. `SendInput` doesn't work for this: OptiScaler 0.9.5 drops the game's `SendInput` while its menu is open. - **When it applies:** only with OptiScaler in the game, the window focused, and the Keyboard row letting Esc count. - **The log and the crash report** (`gpu/vk/foreign_dlls.h`). - **What counts as foreign:** the DLLs loaded from the game's folder that aren't Longshot's: one standing in for a System32 DLL, an ASI plugin, or OptiScaler under any name. - **What's read:** each DLL's version and Authenticode signer, offline, on a thread of its own (the signature check takes ~145 ms for OptiScaler's 26 MB). A signature Windows could neither trust nor reject reads "signature not checked (error …)", never "not signed". - **Logged once,** for example: `report: foreign WINMM.dll (OptiScaler 0.9.5-final (90d9568), signed by SignPath Foundation, in place of Windows' own)`. Names, versions and signers only, never a folder. - **Crash report:** it reads that line (`builder/crates/crash` `facts.rs`) and gives it its own section, "DLLs beside the game that are not Longshot's". - **The FPS counter's footer**, where it shows (Dev, or with "Version and hardware at every level"), adds "Through OptiScaler 0.9.5" under the upscaler's line only while OptiScaler handles the frame: NVIDIA DLSS or DLAA drew it in gameplay, OptiScaler is loaded, and its `OptiScaler.ini` takes DLSS's inputs (`[Inputs] EnableDlssInputs`, read again at most every 2 s). - **Why its own line:** the footer shortens long lines from the end, so this short line is never cut. OptiScaler may swap the engine the line above names, which Longshot can't see, so the line names none. - **Nothing else in the counter changes.** At the title, with FSR, XeSS or no upscaler, or without OptiScaler, the counter is identical. With it, the footer is one line taller, and a window too short for everything drops this line first. - **Docs.** `docs/user/optiscaler.md` (new): Longshot's own upscalers first, turning it on, why its frame generation stays off, putting it in by hand, using it, and what to do when something goes wrong; Windows only. Also updated: the Graphics and Controls guide, the `optiscaler=` line in the switches reference, and [build.md's OptiScaler](docs/dev/reference/build.md#optiscaler). Read first: `builder/crates/build-driver/src/runtimes.rs` (`OPTISCALER_*`, `fetch_optiscaler`, and `archived_runtime`, which is Streamline's archive fetch made general), `builder/crates/build-driver/src/optiscaler.rs` (the setting, the keys and the ini lines), `build.rs`'s `optiscaler_settings`, `play.rs` (`Profile::optiscaler_wanted`, `RebuildReason::OptiScaler`, the keys before each start); then `gpu/vk/foreign_dlls.cpp`, `gpu/vk/menu/optiscaler.cpp`, `vk_menu.cpp`'s `menu_close` and `optiscaler_keys_tick` call, and the footer's line 6. ## Testing **Tested:** Windows 11 (10.0.26300), RTX 5080, NVIDIA 621.40, Ryzen 9 7900X. Game folders built by this branch's longshot-builder from the .nup through the job queue (DLSS module, Ocarina of Time), and this branch's runtimes over main's base (`56823e27a`), through the queue. The builder: - First build with the setting on: the builder downloaded the v0.9.5 archive from GitHub, took out the five files with System32 tar, each matching its pin, and left no archive behind. The game folder got `winmm.dll`, the three other files and `data/licenses/optiscaler/`. `verify` reported the folder intact (56 files) and counted `OptiScaler.ini` as the player's data. - Played: `WINMM.dll` from the game folder is in the game's module list. OptiScaler's own log says "OptiScaler v0.9.5-final (90d9568) loaded", "working as winmm.dll", `Menu.ShortcutKey: 0x74`, `Menu.FpsShortcutKey: -1`, `Menu.FpsCycleShortcutKey: -1`. It hooked Vulkan (vkQueueSubmit, vkCreateInstance and vkCreateDevice) and NGX (`NVSDK_NGX_VULKAN_Init_ProjectID_Ext` result 1), and the game ran. - A player's own OptiScaler (OptiScaler.dll plus one byte, so not the pinned file) put by hand as `winmm.dll`. With `optiscaler=0`, a Rebuild set it aside as `winmm.dll.off` (no build needed). With `optiscaler=1`, it went back as `winmm.dll`, and the update recorded `optiscaler: kept` with none of the builder's files placed over it. The reader found `OptiScaler` in OptiScaler.dll's version strings and not in Windows' own winmm.dll or dbghelp.dll. - Frame generation off (@ ec2b30550): the build placed `winmm.dll`, `fakenvapi.dll`/`.ini` and the licenses, with no `dlssg_to_fsr3_amd_is_better.dll`. In the game, OptiScaler's own log read `FrameGen.Enabled: false`, `FrameGen.FGInput: nofg`, `FrameGen.FGOutput: nofg`, `Menu.FGShortcutKey: -1` and `Menu.ShortcutKey: 0x74`. - An update from an earlier build: the builder at b78d0f558 (before frame generation was turned off) placed OptiScaler with `dlssg_to_fsr3_amd_is_better.dll` and `data/licenses/optiscaler/LICENSE-dlssg-to-fsr3.md`, both on disk and in the note. The next build with this branch's builder logged "LICENSE-dlssg-to-fsr3.md, dlssg_to_fsr3_amd_is_better.dll removed", took both out of the note too, and kept the rest of OptiScaler placed. A player's own copy of that DLL (other bytes, not in the note) stayed through an off build and an on build, and `verify` listed it as not the builder's, left as it is. - Setting off (before 98812f6a0, when Off still removed the ini; no `optiscaler=` line; profile.json's leftover `"optiscaler": true` ignored): the build removed all eight files and `OptiScaler.ini`. Setting on again (`optiscaler=1`): the build placed them back from the cache (7 s, no download), with the F5/off keys written into a fresh `OptiScaler.ini`. - BeanBot's review fixes (@ 3474f9655), same profile, through the queue: - **A player's own `OptiScaler.ini`** (with their F7 key) there before On: a Rebuild with `optiscaler=1` placed OptiScaler beside it and left it the player's (F7 kept; frame generation and the overlay keys forced off as for any). With `optiscaler=0`, the next Rebuild kept it and removed only the builder's files. - Its settings kept through Off (@ 98812f6a0, llun's decision), in the game through the queue: a play with `optiscaler=1` placed OptiScaler and seeded its ini (F5), and the game logged `report: foreign WINMM.dll (OptiScaler …)`. Controls → OptiScaler menu key set F6. Graphics → OptiScaler Off, then Restart Now: the builder removed `winmm.dll`, fakenvapi's files and the licenses, kept `OptiScaler.ini` (F6), and the restarted game had no OptiScaler. On, then Restart Now: OptiScaler placed again with the same ini, not reseeded (F6 kept, frame generation still forced off), and F6 opened OptiScaler's menu. The game (OptiScaler 0.9.5 from its GitHub release, SHA-256 checked against GitHub's digest, copied in as `winmm.dll`): - **The log line:** `report: foreign WINMM.dll (OptiScaler 0.9.5-final (90d9568), signed by SignPath Foundation, in place of Windows' own)`, from the background scan. - **OptiScaler takes Longshot's DLSS:** its own log shows `NVSDK_NGX_VULKAN_CreateFeature1 … Creating new dlss upscaler`. In its menu I switched the upscaler to FSR 3.1.6, and its overlay read "Vulkan | FSR 3.1.6 | Input: DLSS". - **Graphics → OptiScaler:** shows under the Upscaler. On saved `optiscaler=1` and showed "Restart needed"; Off saved `optiscaler=0`. The help panel shows its three paragraphs, nothing cut off. - **Open OptiScaler:** closed Longshot's menu and opened OptiScaler's (F5). - **Esc:** - **Closes it:** a quick Esc tap closed OptiScaler's menu three times out of three (opened with F5 twice, and with Open OptiScaler once), and Longshot's menu didn't open. - **Without OptiScaler's menu:** with it closed, Esc opened Longshot's menu as usual, and the game logged no close. - **Controls → OptiScaler menu key:** - **Insert:** with the ini at `auto`, the row showed Insert and its line said Longshot uses it. - **Stepping:** it went F2, …, F7, each step changing only that line (no temp file left). Open OptiScaler meanwhile showed Insert, the key OptiScaler still ran with, and pointed to Controls. After a restart, F7 worked. - **Taken keys:** with another of OptiScaler's keys on F7 (set through a frame generation key row since removed), stepping skipped F7. - **A key bound to a control:** with F6 bound to Minus (its second keyboard slot) and OptiScaler's other keys off, stepping right from F5 went to F7, and left from F7 back to F5; the game logged "OptiScaler's menu key set to F7" and then "… to F5", and `OptiScaler.ini` read `0x76`, then `0x74`. - **Its own key bound to a control:** with F5 bound to Minus by hand, the row read "This key is F5, which the game's Minus control uses too: choose another", Open OptiScaler was locked with the same words, and stepping went F5 → F6 (the warning gone) and back to F4, skipping F5. - **Locked:** with `OptiScaler.ini` read-only, the row was locked with its builder line, and stepping left the file unchanged. - **OptiScaler's key first** (@ a56796748): - **Controls page:** F5 there didn't open OptiScaler's menu, with or without a binding cell listening. Pressed while Minus's keyboard cell listened, the cell kept listening with "F5 is OptiScaler's menu key and stays its own…", and `settings.ini` kept `key_minus=77,0`. - **Longshot's menu open, no restart waiting:** F5 closed Longshot's menu and opened OptiScaler's ("this menu closes, then OptiScaler's opens", then "OptiScaler's menu opened"). - **Restart Now:** with OptiScaler switched On, F5 brought the restart question with OptiScaler's menu shut. Restart Now restarted the game; no "opened" line in that run, and the new run started with OptiScaler's menu shut. - **Later:** switched back Off, F5 brought the question with OptiScaler's menu shut; Later closed Longshot's menu and opened OptiScaler's. - **Open OptiScaler:** closed Longshot's menu and opened OptiScaler's through the same path. - **In play:** F5 opened and closed OptiScaler's menu as before. - **One start of these runs** lost the GPU (`VK_ERROR_DEVICE_LOST`, an NVIDIA graphics exception) during the intro movie, before any menu opened; the same build started cleanly the four times after. Nothing this PR changes runs there; noted here rather than left out. - **The FPS counter:** at Dev, "Through OptiScaler 0.9.5" was absent at the title screen and with XeSS in gameplay, and present with DLSS in gameplay, under "Upscaling: DLSS Quality". It is whole in the narrowest case (Small, a 1280x720 window, below Graph, version and hardware at every level). - **OptiScaler's frame generation** (before it was turned off): with Longshot's DLSS FG through NGX, Nukem's mode made a black picture (GPU at 100%), and turning Longshot's frame generation off brought the picture back. That's why it stays off. - **Exit:** the game exited cleanly with OptiScaler in. Together, through the builder with a profile: Graphics > OptiScaler On wrote `optiscaler=1`, and Restart now (exit 75) ran the builder's fast check ("OptiScaler choice changed") and an update. The game then logged the `report: foreign` line above, the record said `placed`, and OptiScaler.ini had F5 and the other keys off. F5 opened OptiScaler's menu, and Esc closed it while Longshot's menu stayed shut. Off with Restart now (before 98812f6a0) removed every file, its licenses and OptiScaler.ini. No screenshots: the menu draws in the game's own font, a game file. Game-free checks: - `build-driver`: - `optiscaler::tests`: the placed menu key is F5 and the overlay keys none, never one of Longshot's. A player's key is kept, and one of Longshot's, `auto` or unreadable goes back to its default. OptiScaler's frame generation lines and its key are forced off whatever they held. CRLF and BOM are kept, a missing line or `[Menu]` is added, a non-UTF-8 file is left alone, and the game's `optiscaler=` line is read. A DLL is recognized as OptiScaler by its version strings alone. A player's own copy is set aside and put back, a name in the way is left alone and reported, and the builder's own copy or a non-OptiScaler DLL is never renamed. - `runtimes::tests`: the pins, no AMD/Intel/Microsoft file and no Longshot name. The archive is taken once and the settings are seeded only when missing. A player's own OptiScaler is kept. Offline, OptiScaler is left out with its own warning and mark and retried 10 minutes later. The tree's licenses are there, and the GPL text is byte-for-byte OptiScaler's. - `play::tests`: the setting changes the profile's key only while on and only on Windows, and profile.json is untouched. A skipped OptiScaler is retried, and its keys are settled before each start only for the builder's own OptiScaler. A rename aside whose record can't be written is taken back. - From BeanBot's review (3474f9655) and after: Off, skipped and kept builds leave `OptiScaler.ini` byte for byte, and On again keeps the player's lines and settles the forced ones without reseeding; a missing ini is seeded again (`build::optiscaler_settings_tests`); a player's OptiScaler as `winhttp.dll` or `dbghelp.dll` is kept alone, nothing downloaded or placed, the builder's own files out (`runtimes`); a non-OptiScaler DLL under those names, or one the builder placed, isn't taken for the player's. - `tests/test_foreign_dlls.py` (new): which modules count, the log text (no folder), the unchecked-signature text; the ini's keys (auto, hex, decimal, -1, other sections), the key names, the clashing and offered keys; the one-line ini rewrite (CRLF, a missing line, a missing `[Menu]`); whether OptiScaler takes DLSS's inputs; on Windows, a real scan of a `version.dll` beside the test program (found, not signed), one in another folder (not listed), the background start's single log line, and `file_writable` (a writable file, a read-only one, a missing one). The same check passes on Linux (WSL Ubuntu 24.04, g++), the Windows parts left out. - `tests/test_fps_stats.cpp`: the OptiScaler line's text, and that only DLSS or DLAA drawn by the engine counts. - `cargo test -p crash the_foreign_dlls_line_is_read`. - Updated, not weakened: `test_menu_ini_keys` (the new keys `optiscaler` and `optiscaler_key` in FROZEN, on purpose), `test_settings_table`, `test_dlss5_menu` (the rows' order), `test_keyboard_menu_option`, `test_menu_i18n`. At a56796748 the menu checks (`test_foreign_dlls`, `test_menu_ini_keys`, `test_settings_table`, `test_dlss5_menu`, `test_menu_i18n`, `test_menu_hooks`, `test_menu_text_field`, `test_fps_stats`, `test_utf8_paths`, `test_keyboard_menu_option` with g++) pass again; `test_menu_keys` fails as on `main` (a stale source cut). `cargo clippy -D warnings` and `cargo fmt --check` are clean, and `build-driver`'s 191 tests pass (at 98812f6a0). The longshot-builder tests that fail here (6 unit tests, 3 in `hot_split.rs`) are this PC's Windows path-spelling and no-clang cases in tests this PR doesn't touch. `mise run test` at 1300dab32 (Windows, 12 at once): 826 passed, 54 failed, 48 skipped. The same 54 checks fail on `main` @ 56823e27a on this PC, and none other does here: POSIX-only calls, stale source cuts and missing tools on Windows. CI's Linux run is the reference. **Still to test:** - Windows, AMD Radeon (RDNA 3 or 4, with FSR 4) and Intel Arc, with the DLSS module built: turn OptiScaler on in the game and restart. Expecting OptiScaler's menu on F5, Open OptiScaler and Esc working, the `report: foreign` line, and its upscaler list naming the game's FSR 4 / XeSS files. Whether Longshot's NVIDIA DLSS row becomes available with OptiScaler's NGX in place is the open question (`@Beanstalk`, once a BigBean approves). - Linux / Steam Deck: `optiscaler=1` changes nothing (no files, no update, no rows) (by hand, any Linux PC). ## Measurements **Verdict:** nothing changes for a profile with OptiScaler off, which is the default. Turned on, it costs one 70 MB download per PC, 26.6 MB in the game folder, and a ~145 ms signature check off the renderer's start. Setup: Windows 11, Ryzen 9 7900X, NVMe, this PC's connection. A game folder built by this branch from the .nup with warm caches. | | Before: main @ 56823e27a | After: this PR @ 98812f6a0 | |---|---|---| | Build or play with OptiScaler off | no OptiScaler work | the same: one small read of settings.ini, nothing placed or downloaded, the profile's key unchanged (no update) | | Turning it on, the first time on a PC | n/a | the archive's download 1.8 s and its `tar` extraction 2.7 s, on top of an update (the whole update took under a minute here) | | Turning it on or off again (warm caches) | n/a | an update of 5-7 s (no download) | | Game folder size | n/a | +26.6 MB (OptiScaler's files, its settings, the licenses), the same again in `<cache>/runtimes/` | | The game's start with OptiScaler in | n/a | Windows' offline signature check of its 26 MB DLL, ~145 ms (5 runs: 143–163 ms), on a thread of its own, not waited for | Nothing per frame: the scan runs once, and the rows only do work when used. The footer's check reads `OptiScaler.ini` at most every 2 s, and only while the counter's footer shows. The game's frame rate with OptiScaler loaded is OptiScaler's own, and only for players who turn it on. No switch is added or changed: `LONGSHOT_CACHE` appears only in a test's environment, and `LONGSHOT_KEYS` is a Rust constant (`build_driver::optiscaler::LONGSHOT_KEYS`, the keys OptiScaler's may not be), not a variable. ## Risks - **Off (the default):** nothing changes. No file is placed, nothing is downloaded, no update happens, no log line, no rows apart from the Off switch, and the counter is the same. - **On:** OptiScaler is a third-party DLL in the game's process. Crashes or rendering problems it causes are OptiScaler's, and the `report: foreign` line makes them visible in logs and crash reports. Turning it off in the game removes every file the builder put there at the next start. - **Writing `OptiScaler.ini`:** the game writes it only when the player changes the key, and only that line. - **Under mod-api's sandbox** (not on `main`; read from its code, not run): the game folder is never written from inside, so the key row is locked, and OptiScaler's own menu can't save its settings there either (they last until the game closes). How the sandbox could let it save without letting the ini pick DLLs to load is in a comment below, for mod-api's maintainer. - **GitHub releases aren't immutable.** An archive that changes no longer matches the pin and is refused (`optiscaler_skipped`, not retried at a play for that pin), and the game runs without OptiScaler. - **A game started without the builder** (no builder channel) picks up a changed setting only at its next start through the builder. - **Undoing it:** a revert is enough. Saves are untouched. `longshot_options.ini` gains `optiscaler=0`, which an older game ignores. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. (One new part, `third_party/optiscaler/` (fakenvapi's upstream license text, unmodified, and its PROVENANCE.md with tree-sha256), as the third_party rule asks. No existing part changed and no binary committed. OptiScaler is GPL-3.0 and fakenvapi is MIT, both compatible with Longshot's GPL-3.0.) ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: the game built and ran with llvm-mingw. Linux: `foreign_dlls.cpp`, `menu/optiscaler.cpp` and `vk_menu.cpp` compile with g++ on WSL Ubuntu 24.04, and `test_foreign_dlls.py` passes there; the Windows parts are under `_WIN32`. Paths: module paths come from `GetModuleFileNameW`, made UTF-8; `file_writable` opens with `CreateFileW` from UTF-8; the narrow `ifstream` and `MoveFileExA` are UTF-8 under the exe's `activeCodePage` UTF-8, which the game requires at its start.) - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A Windows build of a profile with "optiscaler": true (build --profile <id | dir> --optiscaler on, which the
launcher writes) puts OptiScaler v0.9.5's official files beside longshot.exe as the builder's own, as
Streamline's runtime: its release archive downloaded once into the cache and checked by GitHub's SHA-256,
OptiScaler.dll (as winmm.dll), dlssg_to_fsr3_amd_is_better.dll, fakenvapi.dll and fakenvapi.ini taken out
with Windows' tar and each checked by its own, with their licenses and source links from the tree
(third_party/optiscaler, data/licenses/optiscaler). verify and --repair know them; turned off, they go.
None of AMD's, Intel's or Microsoft's files is taken: OptiScaler uses Longshot's FSR 4 and XeSS files.

OptiScaler.ini is put there once (OptiScaler saves its settings there); each build that places OptiScaler and
each play sets only its four shortcut lines to the profile's optiscaler_keys (default F7, F8, F6, F5), as
OptiScaler's own defaults (Insert, Page Up, Page Down, End) are Longshot's keys. info lists the optiscaler
capability and the record's state.

Design (ship OptiScaler's GPL/MIT parts with Longshot, the builder owning its files like Streamline, the keys
chosen in the launcher): llun.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The user's later decisions: OptiScaler is turned on in the game's own Graphics row (the settings line
optiscaler=1 in the profile's settings.ini), not by the launcher, so the builder reads that line at each
play, Rebuild and Restart now; profile.json gets no optiscaler keys and build has no --optiscaler. Its keys
are placed as F5 (menu) and F6 (frame generation), the frame rate overlay keys none; before each play a
line keeps the player's key unless it is missing, auto, not a key or one of Longshot's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat(builder): a player's own OptiScaler is set aside while the game's setting is off, and back when on
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Failing after 10s
PR description / Title and description (pull_request_target) Successful in 6s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m10s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m9s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 6m32s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 6m50s
CI / Website build and checks (pull_request) Failing after 34s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
b78d0f558a
The user's answer ("Rename them aside"): with optiscaler off, before each play, Rebuild and Restart now, a DLL
the builder did not place under a name the game loads (winmm, winhttp, dbghelp) whose version strings name
OptiScaler is renamed to <name>.off in one rename, recorded in longshot_build.json (optiscaler_aside), and
renamed back when the setting is on, then kept as the player's. A name in the way or a refused rename is said
(optiscaler_aside_taken, optiscaler_aside_failed) and never fails the play.

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

Tested in game: Windows 11 (10.0.26300), RTX 5080, this branch's longshot-builder through the job queue, Ocarina of Time with the DLSS module: with optiscaler=1 the build downloaded OptiScaler v0.9.5's archive, placed winmm.dll and its files (verify: intact), and in the game OptiScaler's log said 'v0.9.5-final (90d9568) loaded', 'working as winmm.dll', Menu.ShortcutKey 0x74 (F5), FGShortcutKey 0x75, FPS keys -1, and it hooked Vulkan and NGX while the game ran. optiscaler=0 took every file and OptiScaler.ini out; on again placed them back from the cache in 7 s. A hand-placed OptiScaler was renamed to winmm.dll.off while off and back (kept) when on. Not seen by eye: pressing F5 to open the overlay (no screen control on this run); it is in Still to test.

Tested in game: Windows 11 (10.0.26300), RTX 5080, this branch's longshot-builder through the job queue, Ocarina of Time with the DLSS module: with optiscaler=1 the build downloaded OptiScaler v0.9.5's archive, placed winmm.dll and its files (verify: intact), and in the game OptiScaler's log said 'v0.9.5-final (90d9568) loaded', 'working as winmm.dll', Menu.ShortcutKey 0x74 (F5), FGShortcutKey 0x75, FPS keys -1, and it hooked Vulkan and NGX while the game ran. optiscaler=0 took every file and OptiScaler.ini out; on again placed them back from the cache in 7 s. A hand-placed OptiScaler was renamed to winmm.dll.off while off and back (kept) when on. Not seen by eye: pressing F5 to open the overlay (no screen control on this run); it is in Still to test.
Member

Possibly related, for context:

  • PR #2748 feat(builder): DLSS FG through Streamline from its MIT headers, and its runtime for a profile that takes it — Prior builder-managed optional runtime pattern
Possibly related, for context: - PR #2748 feat(builder): DLSS FG through Streamline from its MIT headers, and its runtime for a profile that takes it — Prior builder-managed optional runtime pattern
Author
Member

Description: no switch added (LONGSHOT_CACHE is a test's environment, LONGSHOT_KEYS a Rust constant), and the tests/ checks that read the changed builder files pass unchanged.

Description: no switch added (LONGSHOT_CACHE is a test's environment, LONGSHOT_KEYS a Rust constant), and the tests/ checks that read the changed builder files pass unchanged.
llun changed title from feat(builder): OptiScaler beside the game when the game's setting turns it on, its keys clear of Longshot's to WIP: feat(builder): OptiScaler beside the game when the game's setting turns it on, its keys clear of Longshot's 2026-12-02 00:50:17 +00:00
Author
Member

Tested with the game side: a local combined build (this branch + feat/optiscaler-foreign-dlls) on Windows 11, RTX 5080. Graphics > OptiScaler On plus Restart now placed it (record placed, keys F5/F6/-1/-1), F5 opened OptiScaler's menu, and Off plus Restart now removed every file. The NVIDIA F5 item is out of Still to test.

Tested with the game side: a local combined build (this branch + feat/optiscaler-foreign-dlls) on Windows 11, RTX 5080. Graphics > OptiScaler On plus Restart now placed it (record placed, keys F5/F6/-1/-1), F5 opened OptiScaler's menu, and Off plus Restart now removed every file. The NVIDIA F5 item is out of Still to test.
feat(builder): OptiScaler's frame generation stays off: no dlssg-to-fsr3, its lines forced off before each start
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Failing after 11s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 10s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 2m57s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m42s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 7m8s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 6m57s
CI / Website build and checks (pull_request) Failing after 36s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 24m49s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
ec2b305506
The user's decision: on Vulkan OptiScaler 0.9.5's only frame generation is Nukem's dlssg-to-fsr3, which gives a
black picture over Longshot's DLSS Frame Generation, and Longshot's own FSR 3.1 and DLSS Frame Generation do that
work. The builder no longer takes or places dlssg_to_fsr3_amd_is_better.dll or its license (one placed earlier
is taken out), and before each start it sets [FrameGen] Enabled=false, FGInput=nofg, FGOutput=nofg and
[Menu] FGShortcutKey=-1, those lines alone; the menu key's rule and the FPS keys are as before.

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

OptiScaler's frame generation is now kept off (llun's decision). On Vulkan, OptiScaler 0.9.5's only frame generation is Nukem9's dlssg-to-fsr3, which gives a black picture over Longshot's DLSS Frame Generation, and Longshot's own FSR 3.1 and DLSS Frame Generation already do that work. dlssg_to_fsr3_amd_is_better.dll and its license are no longer taken or placed; a build takes out one placed earlier. Before each start, [FrameGen] Enabled=false, FGInput=nofg, FGOutput=nofg and [Menu] FGShortcutKey=-1 are forced. Ran on this PC: OptiScaler logged FrameGen.Enabled false, FGInput/FGOutput nofg, FGShortcutKey -1, menu key F5.

OptiScaler's frame generation is now kept off (llun's decision). On Vulkan, OptiScaler 0.9.5's only frame generation is Nukem9's dlssg-to-fsr3, which gives a black picture over Longshot's DLSS Frame Generation, and Longshot's own FSR 3.1 and DLSS Frame Generation already do that work. dlssg_to_fsr3_amd_is_better.dll and its license are no longer taken or placed; a build takes out one placed earlier. Before each start, [FrameGen] Enabled=false, FGInput=nofg, FGOutput=nofg and [Menu] FGShortcutKey=-1 are forced. Ran on this PC: OptiScaler logged FrameGen.Enabled false, FGInput/FGOutput nofg, FGShortcutKey -1, menu key F5.
Author
Member

Tested the update path for the dropped frame generation on this PC. A game folder built by the builder before this change (b78d0f558) had dlssg_to_fsr3_amd_is_better.dll and LICENSE-dlssg-to-fsr3.md placed and noted. The next build with this branch's builder removed both (log: "LICENSE-dlssg-to-fsr3.md, dlssg_to_fsr3_amd_is_better.dll removed"), dropped them from the note, and kept OptiScaler placed. A player's own copy of the DLL (other bytes, not noted) stayed through off and on builds; verify lists it as not the builder's.

Tested the update path for the dropped frame generation on this PC. A game folder built by the builder before this change (b78d0f558) had dlssg_to_fsr3_amd_is_better.dll and LICENSE-dlssg-to-fsr3.md placed and noted. The next build with this branch's builder removed both (log: "LICENSE-dlssg-to-fsr3.md, dlssg_to_fsr3_amd_is_better.dll removed"), dropped them from the note, and kept OptiScaler placed. A player's own copy of the DLL (other bytes, not noted) stayed through off and on builds; verify lists it as not the builder's.
feat(vk): OptiScaler in the game: a Graphics switch, its menu and key, Esc to close it, and logs that name it
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Failing after 9s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 14s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m6s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 3m55s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m57s
CI / Website build and checks (pull_request) Failing after 29s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m13s
PR description / Title and description (pull_request_target) Successful in 5s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 20m23s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
1300dab323
Players asked for OptiScaler. The builder ships it pinned and places it from the game's own switch (Longshot#2985); this
is the game's side. The design is the user's: off by default, turned on in Graphics, its keys in the game, never one of
Longshot's, Esc closing its menu, its frame generation off, the FPS counter saying it is in, Longshot's own upscalers named
first and plain wording.

- gpu/vk/foreign_dlls.h: the DLLs loaded from the game's folder that are not Longshot's (one in place of a System32 DLL,
  an ASI plugin, OptiScaler under any name), with version and Authenticode signer (offline; "signature not checked" when
  Windows could neither trust nor reject it), scanned once on a thread of its own and logged as "report: foreign ..."
  (names, versions, signers; never a folder). The crash report gives them a section of their own, so a crash at
  winmm.dll+0x... reads as OptiScaler's, not Windows'.
- Graphics > OptiScaler (Windows), after the Upscaler: Off (default) or On, saved as optiscaler=; the builder reads it
  before the game starts, so it applies at the next start (Restart now). Its help: what it is, what it needs (the DLSS
  module with DLSS or DLAA; Longshot's own FSR 3.1, DLSS, FSR 4 and XeSS first), the licences (OptiScaler GPL-3.0,
  fakenvapi MIT). Its On/Off line says whether it is in the game and, Off, that a copy put there by hand is renamed aside.
- Graphics > Open OptiScaler, shown while OptiScaler is loaded: closes this menu (menu_close, as Insert) and presses
  OptiScaler's menu key; where that key is Longshot's or off, its line says to choose another in Controls.
- Controls > OptiScaler menu key, shown while it is loaded: F2 to F9, Pause or Scroll Lock (never Insert, F1, Esc, Home,
  Page Up, Page Down, End, F10, F11, nor a key bound to a control), its [Menu] ShortcutKey line of OptiScaler.ini only,
  written beside it and moved over it; it works after a restart, and until then Open OptiScaler presses the key OptiScaler
  started with. The builder places F5. Where the game may not write the ini (mod-api's sandbox, a read-only file), the
  row is locked beforehand with a line saying the builder sets the key (file_writable: opened for writing, nothing
  written). OptiScaler's frame generation and FPS overlay keys stay off: Longshot has its own,
  and Nukem's frame generation, OptiScaler's only one on Vulkan, gave a black picture.
- Esc closes OptiScaler's open menu: OptiScaler takes the window's key presses while its menu is open but not the keys'
  state, so an Esc that went down and whose press never reached the window within 80 ms is one its menu took; its menu key
  is posted to the window, where OptiScaler's hook toggles it (SendInput: dropped by OptiScaler while its menu is open).
- The FPS counter's footer, where it shows (Dev, or with Version and hardware at every level), adds "Through OptiScaler
  0.9.5" under the upscaler's line while OptiScaler is in the path of the frame: drawn by DLSS or DLAA in gameplay, with
  OptiScaler loaded and taking DLSS's inputs (its ini's EnableDlssInputs). Its own short line, which the footer's
  shortening never cuts; it names no upscaler (OptiScaler exposes none it picked); nothing else of the counter changes.
- docs/user/optiscaler.md (turning it on, by hand, using it, Windows only), the Graphics and Controls guide, the options
  file's optiscaler= line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
llun changed title from WIP: feat(builder): OptiScaler beside the game when the game's setting turns it on, its keys clear of Longshot's to WIP: feat: OptiScaler, off by default and turned on in Graphics: the builder places it, the game opens it, closes it on Esc and names it in logs 2026-12-02 02:25:14 +00:00
Author
Member

For mod-api's sandbox: OptiScaler's settings, and which DLLs they can load

A handoff for mod-api's maintainer (the sandbox's author), from this PR's work. Nothing here changes mod-api; this PR
targets main, which has no sandbox. llun asked for it to be written up and left to the maintainer.

Where it stands

This PR ships OptiScaler (off by default; the game's Graphics → OptiScaler turns it on, and the builder places it as
winmm.dll beside longshot.exe, with fakenvapi.dll/.ini and OptiScaler.ini, all at the folder's top level).

Under mod-api's sandbox, as origin/mod-api stands (e132adfa0), read from the code (not run under mod-api):

  • It should load. The game folder's top-level DLLs are granted read and run (0x1200a9 includes FILE_EXECUTE).
  • Its settings don't last. sandbox_windows/plan.rs grants the game folder Read only ("the game folder (never
    written)"); the single-file writes (Access::FileWrite) are the user folder's USER_FILES. OptiScaler runs in the
    game's process, so its own menu's Save of OptiScaler.ini is refused, and changes last until the game closes. The
    game's Controls → OptiScaler menu key row sees it can't write the file and locks itself, saying the builder sets the
    key. The builder, outside the sandbox, still rewrites the key and frame-generation lines before each start.

That is safe as it is. The rest is for if mod-api wants OptiScaler's Save to work.

Why a write grant on OptiScaler.ini alone is not enough

OptiScaler's signature (SignPath Foundation) and the builder's SHA-256 pin vouch for winmm.dll. They say nothing about
OptiScaler.ini, which is plain text that tells that genuine DLL what else to load. In 0.9.5's ini:

  • about 17 path lines naming DLLs it loads: OptiDllPath, NvngxPath, NvngxDlssPath, NvapiPath, FfxDx12Path,
    FfxDx12SRPath, FfxDx12FGPath, FfxDx12RRPath, FfxDx12RCPath, FfxVkPath, XeSSPath, XeFGPath, XeLLPath,
    XeSSDx11Path, NvngxFeaturePath (and TTFFontPath, a font);
  • [Plugins]: Path, LoadAsiPlugins, LateAsiPluginsDelay, LoadSpecialK, LoadReshade;
  • OverrideNvapiDll.

Access::Write is 0x1301bf, which includes FILE_EXECUTE (0x20), and Access::Read (0x1200a9) does too. So
with the ini writable, code in the container could write a DLL into a folder it may write (its caches, logs), point a
path line or [Plugins] Path at it, and have the signed OptiScaler load it at every later start: from a mod's script
to native code in the container, lasting across starts.

What would close that, for every loader and not only OptiScaler

  1. No image the container wrote can load. sandbox_windows.rs sets one mitigation today
    (EXTENSION_POINT_DISABLE, 1 << 32). Add, in the same PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY value (values
    from MinGW's winbase.h):
    • PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_ON (1 << 56): the container runs at low
      integrity, so files it creates should carry the Low label, and Windows then refuses to map them as images. To
      confirm by test: a DLL written from inside the container, then LoadLibrary'd, is refused; the builder's and the
      player's own DLLs (medium label) still load.
    • PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_ON (1 << 52): nothing loads from a network
      share.
    • Not IMAGE_LOAD_PREFER_SYSTEM32 (1 << 60): it would load System32's winmm.dll before the game folder's,
      so OptiScaler (and any proxy-DLL mod a player put there) would stop loading.
  2. Optionally, no execute on written folders. Drop 0x20 from Access::Write's mask for files (0x13019f).
    Careful: on a folder, 0x20 is FILE_TRAVERSE. The container's token may not bypass traverse checks, so this may
    need a separate inherit-only ACE for files, or be left out with 1 in place.
    To check first: nothing legitimate maps an image from a written folder (driver shader caches are data, and the
    mods are read-only grants).

With 1 in place, a grant on OptiScaler.ini becomes low-risk:

  1. Grant OptiScaler.ini alone, written in place (Access::FileWrite: no DELETE, no rename), and only when the
    builder placed OptiScaler (longshot_build.json's optiscaler: placed). Its Save and the game's key row then work
    under the sandbox. Every other refusal stays, with a test for the new grant beside the_masks_and_the_names.
  2. On main, in the builder (a follow-up to this PR, if 3 goes ahead): before each start, keep a …Path line only
    if it names a file at the game folder's top level whose SHA-256 is one the builder placed (its note: Longshot's
    DLSS/FSR 4/XeSS module DLLs, OptiScaler's pins); anything else goes back to auto with a warning. Under the sandbox,
    the [Plugins] lines and OverrideNvapiDll are forced off. The builder already forces the frame-generation and key
    lines the same way (build-driver/src/optiscaler.rs, settle), and OptiScaler reads these lines at its start,
    after the builder has run. A rule on the key's name (…Path) keeps working when a later OptiScaler adds new paths.
    To check: that OptiScaler doesn't re-read its path lines from the file mid-run.

1 is worth having whatever is decided about OptiScaler: it stops any planted DLL, whoever points at it.

## For mod-api's sandbox: OptiScaler's settings, and which DLLs they can load A handoff for mod-api's maintainer (the sandbox's author), from this PR's work. Nothing here changes mod-api; this PR targets `main`, which has no sandbox. llun asked for it to be written up and left to the maintainer. ### Where it stands This PR ships OptiScaler (off by default; the game's Graphics → OptiScaler turns it on, and the builder places it as `winmm.dll` beside `longshot.exe`, with `fakenvapi.dll`/`.ini` and `OptiScaler.ini`, all at the folder's top level). Under mod-api's sandbox, as `origin/mod-api` stands (`e132adfa0`), read from the code (not run under mod-api): - **It should load.** The game folder's top-level DLLs are granted read and run (`0x1200a9` includes `FILE_EXECUTE`). - **Its settings don't last.** `sandbox_windows/plan.rs` grants the game folder Read only ("the game folder (never written)"); the single-file writes (`Access::FileWrite`) are the user folder's `USER_FILES`. OptiScaler runs in the game's process, so its own menu's Save of `OptiScaler.ini` is refused, and changes last until the game closes. The game's Controls → OptiScaler menu key row sees it can't write the file and locks itself, saying the builder sets the key. The builder, outside the sandbox, still rewrites the key and frame-generation lines before each start. That is safe as it is. The rest is for if mod-api wants OptiScaler's Save to work. ### Why a write grant on `OptiScaler.ini` alone is not enough OptiScaler's signature (SignPath Foundation) and the builder's SHA-256 pin vouch for `winmm.dll`. They say nothing about `OptiScaler.ini`, which is plain text that tells that genuine DLL what else to load. In 0.9.5's ini: - about 17 path lines naming DLLs it loads: `OptiDllPath`, `NvngxPath`, `NvngxDlssPath`, `NvapiPath`, `FfxDx12Path`, `FfxDx12SRPath`, `FfxDx12FGPath`, `FfxDx12RRPath`, `FfxDx12RCPath`, `FfxVkPath`, `XeSSPath`, `XeFGPath`, `XeLLPath`, `XeSSDx11Path`, `NvngxFeaturePath` (and `TTFFontPath`, a font); - `[Plugins]`: `Path`, `LoadAsiPlugins`, `LateAsiPluginsDelay`, `LoadSpecialK`, `LoadReshade`; - `OverrideNvapiDll`. `Access::Write` is `0x1301bf`, which includes `FILE_EXECUTE` (`0x20`), and `Access::Read` (`0x1200a9`) does too. So with the ini writable, code in the container could write a DLL into a folder it may write (its caches, logs), point a path line or `[Plugins] Path` at it, and have the signed OptiScaler load it at every later start: from a mod's script to native code in the container, lasting across starts. ### What would close that, for every loader and not only OptiScaler 1. **No image the container wrote can load.** `sandbox_windows.rs` sets one mitigation today (`EXTENSION_POINT_DISABLE`, `1 << 32`). Add, in the same `PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY` value (values from MinGW's `winbase.h`): - `PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_ON` (`1 << 56`): the container runs at low integrity, so files it creates should carry the Low label, and Windows then refuses to map them as images. To confirm by test: a DLL written from inside the container, then `LoadLibrary`'d, is refused; the builder's and the player's own DLLs (medium label) still load. - `PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_ON` (`1 << 52`): nothing loads from a network share. - **Not** `IMAGE_LOAD_PREFER_SYSTEM32` (`1 << 60`): it would load System32's `winmm.dll` before the game folder's, so OptiScaler (and any proxy-DLL mod a player put there) would stop loading. 2. **Optionally, no execute on written folders.** Drop `0x20` from `Access::Write`'s mask for files (`0x13019f`). Careful: on a folder, `0x20` is `FILE_TRAVERSE`. The container's token may not bypass traverse checks, so this may need a separate inherit-only ACE for files, or be left out with 1 in place. To check first: nothing legitimate maps an image from a written folder (driver shader caches are data, and the mods are read-only grants). With 1 in place, a grant on `OptiScaler.ini` becomes low-risk: 3. **Grant `OptiScaler.ini` alone, written in place** (`Access::FileWrite`: no DELETE, no rename), and only when the builder placed OptiScaler (`longshot_build.json`'s `optiscaler: placed`). Its Save and the game's key row then work under the sandbox. Every other refusal stays, with a test for the new grant beside `the_masks_and_the_names`. 4. **On `main`, in the builder (a follow-up to this PR, if 3 goes ahead):** before each start, keep a `…Path` line only if it names a file at the game folder's top level whose SHA-256 is one the builder placed (its note: Longshot's DLSS/FSR 4/XeSS module DLLs, OptiScaler's pins); anything else goes back to `auto` with a warning. Under the sandbox, the `[Plugins]` lines and `OverrideNvapiDll` are forced off. The builder already forces the frame-generation and key lines the same way (`build-driver/src/optiscaler.rs`, `settle`), and OptiScaler reads these lines at its start, after the builder has run. A rule on the key's name (`…Path`) keeps working when a later OptiScaler adds new paths. To check: that OptiScaler doesn't re-read its path lines from the file mid-run. 1 is worth having whatever is decided about OptiScaler: it stops any planted DLL, whoever points at it.
llun changed title from WIP: feat: OptiScaler, off by default and turned on in Graphics: the builder places it, the game opens it, closes it on Esc and names it in logs to feat: OptiScaler, off by default and turned on in Graphics: the builder places it, the game opens it, closes it on Esc and names it in logs 2026-12-02 02:27:12 +00:00
BeanBot left a comment

Recommendation: Request changes. Turning OptiScaler off can delete a player’s existing settings, and restoring a hand-placed copy under another supported proxy name can load two copies. The menu also mishandles restart confirmation and Windows paths containing non-ASCII characters.

The change adds an opt-in Windows integration for OptiScaler, including builder placement, menu controls and crash-report identification. The reported NVIDIA run shows the main path working, but ownership and menu error cases need fixes.

Blocking (4): must change before merging.

  1. L1 builder/crates/build-driver/src/build.rs:346: Removing OptiScaler deletes its settings even when the builder did not create them. (more on the line) Do: Record whether the builder created the ini and only remove it when that record establishes ownership; preserve pre-existing settings.
  2. L2 builder/crates/build-driver/src/runtimes.rs:882: The ownership check only looks at the builder's destination names, not the other proxy names supported by the restore path. (more on the line) Do: Detect an existing player OptiScaler under every supported proxy name before placing any builder-owned copy, and retain it as kept.
  3. L3 gpu/vk/menu/optiscaler.cpp:197: The OptiScaler key is sent on a timer even when the requested menu close opens a restart question. (more on the line) Do: Send the key only after Longshot's menu has actually closed, and cancel or defer the action while the restart question is pending.
  4. L4 gpu/vk/menu/optiscaler.cpp:276: The ini path is UTF-8, but the file streams and MoveFileExA use Windows narrow-path handling. (more on the line) Do: Convert the UTF-8 path to a wide path and use wide-capable file operations for reads, temporary writes, replacement and deletion, including the footer's ini read.

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

  • L5 builder/crates/build-driver/src/play.rs:1060: A successful rename is not undone when writing its record fails. (more on the line) Do: Make the record and rename recoverable together, for example by rolling back the rename on record failure or recording intent before it.
  • L6 tests/test_foreign_dlls.py:180: The Windows test derives a C compiler by rewriting the C++ compiler name and ignores CC. (more on the line) Do: Pass the selected C compiler from the test runner and use it directly for the C DLLs.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L7: The Windows integration has only a reported NVIDIA run; its intended use with the other vendors has not been exercised. When: A player enables OptiScaler on an AMD or Intel Windows system and depends on the DLSS input interception and selected replacement upscaler working on that driver. Do: Run the enable, restart, upscaler selection, menu and disable paths on representative AMD and Intel Windows systems and record the results.

@fix can do L1, L2, L3, L4, L5 and L6.

Checks: Still running: 11 checks.

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

Does it help: Yes for the tested feature path: the author reports placement, DLSS input interception, menu opening and removal on Windows 11 with an RTX 5080. Other supported Windows GPU configurations have not been shown working.

Other systems: The integration changes Windows startup, game-folder ownership and input handling. Linux ignores the setting; AMD and Intel Windows paths remain untested in the supplied evidence.

Switches: The saved Graphics option optiscaler defaults to 0 (Off), an appropriate opt-in default for a third-party mod. The switch reference is updated.

Reviewed: 1300dab323 against 56823e27a1: Read the repository instructions and contribution rules, commit messages, the new OptiScaler builder and renderer implementations, and the relevant startup, menu and ownership changes. Skimmed the remaining diffs, documentation, tests and provenance; did not read every changed file or all surrounding code in full.; nothing run (a code review).

Checked and fine:

  • The reported NVIDIA run exercises placement, the menu, Esc, and removal.
  • The listed commits include AI-assistance trailers.
  • The new foreign-DLL result is published with release/acquire synchronization.

Testing: No commands that build, run tests or execute project code were run. The supplied CI checks are still running.

Overlaps and merge order: Not established from the available offline checkout.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Turning OptiScaler off can delete a player’s existing settings, and restoring a hand-placed copy under another supported proxy name can load two copies. The menu also mishandles restart confirmation and Windows paths containing non-ASCII characters. The change adds an opt-in Windows integration for OptiScaler, including builder placement, menu controls and crash-report identification. The reported NVIDIA run shows the main path working, but ownership and menu error cases need fixes. **Blocking (4)**: must change before merging. 1. **L1** `builder/crates/build-driver/src/build.rs:346`: Removing OptiScaler deletes its settings even when the builder did not create them. (more on the line) **Do:** Record whether the builder created the ini and only remove it when that record establishes ownership; preserve pre-existing settings. 2. **L2** `builder/crates/build-driver/src/runtimes.rs:882`: The ownership check only looks at the builder's destination names, not the other proxy names supported by the restore path. (more on the line) **Do:** Detect an existing player OptiScaler under every supported proxy name before placing any builder-owned copy, and retain it as kept. 3. **L3** `gpu/vk/menu/optiscaler.cpp:197`: The OptiScaler key is sent on a timer even when the requested menu close opens a restart question. (more on the line) **Do:** Send the key only after Longshot's menu has actually closed, and cancel or defer the action while the restart question is pending. 4. **L4** `gpu/vk/menu/optiscaler.cpp:276`: The ini path is UTF-8, but the file streams and MoveFileExA use Windows narrow-path handling. (more on the line) **Do:** Convert the UTF-8 path to a wide path and use wide-capable file operations for reads, temporary writes, replacement and deletion, including the footer's ini read. **Should fix (2)**: not blocking, but worth doing before merging. - **L5** `builder/crates/build-driver/src/play.rs:1060`: A successful rename is not undone when writing its record fails. (more on the line) **Do:** Make the record and rename recoverable together, for example by rolling back the rename on record failure or recording intent before it. - **L6** `tests/test_foreign_dlls.py:180`: The Windows test derives a C compiler by rewriting the C++ compiler name and ignores CC. (more on the line) **Do:** Pass the selected C compiler from the test runner and use it directly for the C DLLs. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L7**: The Windows integration has only a reported NVIDIA run; its intended use with the other vendors has not been exercised. *When:* A player enables OptiScaler on an AMD or Intel Windows system and depends on the DLSS input interception and selected replacement upscaler working on that driver. **Do:** Run the enable, restart, upscaler selection, menu and disable paths on representative AMD and Intel Windows systems and record the results. `@fix` can do L1, L2, L3, L4, L5 and L6. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the tested feature path: the author reports placement, DLSS input interception, menu opening and removal on Windows 11 with an RTX 5080. Other supported Windows GPU configurations have not been shown working. **Other systems:** The integration changes Windows startup, game-folder ownership and input handling. Linux ignores the setting; AMD and Intel Windows paths remain untested in the supplied evidence. **Switches:** The saved Graphics option optiscaler defaults to 0 (Off), an appropriate opt-in default for a third-party mod. The switch reference is updated. **Reviewed:** 1300dab32315 against 56823e27a13a: Read the repository instructions and contribution rules, commit messages, the new OptiScaler builder and renderer implementations, and the relevant startup, menu and ownership changes. Skimmed the remaining diffs, documentation, tests and provenance; did not read every changed file or all surrounding code in full.; nothing run (a code review). **Checked and fine:** - The reported NVIDIA run exercises placement, the menu, Esc, and removal. - The listed commits include AI-assistance trailers. - The new foreign-DLL result is published with release/acquire synchronization. **Testing:** No commands that build, run tests or execute project code were run. The supplied CI checks are still running. **Overlaps and merge order:** Not established from the available offline checkout. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -326,0 +343,4 @@
r.log(format!("OptiScaler's shortcut keys could not be set ({why})"));
}
} else if was == Some(runtimes::SL_PLACED) && !runtimes::streamline_stays(fetched.optiscaler) {
match std::fs::remove_file(&ini) {
Member

L1 (blocking): Removing OptiScaler deletes its settings even when the builder did not create them.

When: A player already has an OptiScaler.ini but no conflicting DLL. Placement preserves that file, records OptiScaler as placed, and the next Off build removes the player's existing settings.

Do: Record whether the builder created the ini and only remove it when that record establishes ownership; preserve pre-existing settings.

**L1** (blocking): Removing OptiScaler deletes its settings even when the builder did not create them. *When:* A player already has an OptiScaler.ini but no conflicting DLL. Placement preserves that file, records OptiScaler as placed, and the next Off build removes the player's existing settings. **Do:** Record whether the builder created the ini and only remove it when that record establishes ownership; preserve pre-existing settings.
@ -988,0 +1057,4 @@
crate::optiscaler::set_aside(&crate::layout::game_folder(folder), on, &rec.optiscaler_aside);
if aside != rec.optiscaler_aside {
rec.optiscaler_aside = aside;
if let Err(e) = rec.write(folder) {
Member

L5 (should fix): A successful rename is not undone when writing its record fails.

When: If winmm.dll is renamed to winmm.dll.off but the record cannot be written, a later start has no recorded name to restore when the setting is turned on. The player's copy remains disabled.

Do: Make the record and rename recoverable together, for example by rolling back the rename on record failure or recording intent before it.

**L5** (should fix): A successful rename is not undone when writing its record fails. *When:* If winmm.dll is renamed to winmm.dll.off but the record cannot be written, a later start has no recorded name to restore when the setting is turned on. The player's copy remains disabled. **Do:** Make the record and rename recoverable together, for example by rolling back the rename on record failure or recording intent before it.
@ -691,2 +879,4 @@
unzip: impl FnMut(&Path, &[&str], &Path) -> std::result::Result<(), String>,
r: &Reporter,
) -> &'static str {
let dests: Vec<PathBuf> = files.iter().map(|f| out.join(f.dest)).collect();
Member

L2 (blocking): The ownership check only looks at the builder's destination names, not the other proxy names supported by the restore path.

When: A hand-placed OptiScaler as winhttp.dll is restored when the setting turns on. The build sees no conflicting winmm.dll and installs its own copy there, so both proxy DLLs load instead of keeping the player's copy alone.

Do: Detect an existing player OptiScaler under every supported proxy name before placing any builder-owned copy, and retain it as kept.

**L2** (blocking): The ownership check only looks at the builder's destination names, not the other proxy names supported by the restore path. *When:* A hand-placed OptiScaler as winhttp.dll is restored when the setting turns on. The build sees no conflicting winmm.dll and installs its own copy there, so both proxy DLLs load instead of keeping the player's copy alone. **Do:** Detect an existing player OptiScaler under every supported proxy name before placing any builder-owned copy, and retain it as kept.
@ -0,0 +194,4 @@
void open() {
if (open_locked()) return;
menu_close();
press_menu_key(live_key(kMenu), 150);
Member

L3 (blocking): The OptiScaler key is sent on a timer even when the requested menu close opens a restart question.

When: With a restart-requiring setting changed, choosing Open OptiScaler makes menu_tick show the restart prompt instead of closing Longshot's menu. The timer nevertheless opens OptiScaler over that prompt, leaving both menus active.

Do: Send the key only after Longshot's menu has actually closed, and cancel or defer the action while the restart question is pending.

**L3** (blocking): The OptiScaler key is sent on a timer even when the requested menu close opens a restart question. *When:* With a restart-requiring setting changed, choosing Open OptiScaler makes menu_tick show the restart prompt instead of closing Longshot's menu. The timer nevertheless opens OptiScaler over that prompt, leaving both menus active. **Do:** Send the key only after Longshot's menu has actually closed, and cancel or defer the action while the restart question is pending.
@ -0,0 +273,4 @@
ok = (bool)out.flush();
}
#ifdef _WIN32
ok = ok && MoveFileExA(temp.c_str(), path.c_str(), MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);
Member

L4 (blocking): The ini path is UTF-8, but the file streams and MoveFileExA use Windows narrow-path handling.

When: When the game folder contains characters outside the Windows active code page, the builder can place OptiScaler and the wide writable check can succeed, but the game cannot reliably read or replace its ini. The key row and Open OptiScaler then use the wrong default or fail to save.

Do: Convert the UTF-8 path to a wide path and use wide-capable file operations for reads, temporary writes, replacement and deletion, including the footer's ini read.

**L4** (blocking): The ini path is UTF-8, but the file streams and MoveFileExA use Windows narrow-path handling. *When:* When the game folder contains characters outside the Windows active code page, the builder can place OptiScaler and the wide writable check can succeed, but the game cannot reliably read or replace its ini. The key row and Open OptiScaler then use the wrong default or fail to save. **Do:** Convert the UTF-8 path to a wide path and use wide-capable file operations for reads, temporary writes, replacement and deletion, including the footer's ini read.
@ -0,0 +177,4 @@
# (two empty DLLs: one named as Windows' version.dll beside the program, one in another folder)
dll = t / "empty.c"
dll.write_text("int longshot_foreign_dll_test(void) { return 1; }\n", encoding="utf-8")
cc = args.cxx.replace("clang++", "clang").replace("g++", "gcc")
Member

L6 (should fix): The Windows test derives a C compiler by rewriting the C++ compiler name and ignores CC.

When: With CXX set to a differently named wrapper or cross compiler and CC set to the working C compiler, the test invokes the unchanged CXX name for the DLL builds instead of CC, which can fail or use the wrong toolchain.

Do: Pass the selected C compiler from the test runner and use it directly for the C DLLs.

**L6** (should fix): The Windows test derives a C compiler by rewriting the C++ compiler name and ignores CC. *When:* With CXX set to a differently named wrapper or cross compiler and CC set to the working C compiler, the test invokes the unchanged CXX name for the DLL builds instead of CC, which can fail or use the wrong toolchain. **Do:** Pass the selected C compiler from the test runner and use it directly for the C DLLs.
Author
Member

Tested the bound-key skip on this PC (Windows 11, RTX 5080, runtimes of this head through the queue): with F6 bound to a game control (Minus, second keyboard slot) and OptiScaler's other keys off, Controls → OptiScaler menu key stepped F5 → F7 and back F7 → F5, skipping F6 both ways. The game logged each write, and OptiScaler.ini read 0x76, then 0x74. Moved from Still to test into Tested.

Tested the bound-key skip on this PC (Windows 11, RTX 5080, runtimes of this head through the queue): with F6 bound to a game control (Minus, second keyboard slot) and OptiScaler's other keys off, Controls → OptiScaler menu key stepped F5 → F7 and back F7 → F5, skipping F6 both ways. The game logged each write, and OptiScaler.ini read 0x76, then 0x74. Moved from Still to test into Tested.
feat(vk): OptiScaler's menu key comes first: no control takes it, and its menu opens only once Longshot's has closed
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Failing after 10s
PR description / Title and description (pull_request_target) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
a56796748f
Design: llun.

- No control can be bound to OptiScaler's menu key while OptiScaler is in the game: the Controls page keeps listening
  and its help line says the key stays OptiScaler's until another is chosen in its row (and the game starts again).
  A control that had the key already (from before, or by hand) is named on the OptiScaler menu key row and on Open
  OptiScaler, which locks until another key is chosen.
- While Longshot's menu is open, the key is kept from OptiScaler (a window procedure above OptiScaler's drops its
  messages; the menu still reads the key's state). On the Controls page it does nothing. Elsewhere it closes Longshot's
  menu as Open OptiScaler does, and OptiScaler's menu opens once Longshot's has closed and the key is let go.
- With the restart question, OptiScaler's menu waits for the answer: Later opens it; Restart now does not, nor does the
  game that starts again (menu_restarting). Open OptiScaler takes the same path, its key posted to the window as Esc's
  close already is, instead of SendInput.
- The write-refused line names the launcher's builder, as the locked line does.

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

New commit a56796748 (llun's design): OptiScaler's menu key comes first while OptiScaler is in the game. No control can be bound to it (the Controls page keeps listening and says why), and a control that had it already is named on the key row and on Open OptiScaler. While Longshot's menu is open the key is kept from OptiScaler. Pressed there, it closes Longshot's menu and OptiScaler's opens once Longshot's has closed. With the restart question it waits: Later opens it, Restart Now doesn't (nor in the game that starts again). Open OptiScaler takes the same path. Tested in the game on this PC; details are in the description's Testing.

New commit a56796748 (llun's design): OptiScaler's menu key comes first while OptiScaler is in the game. No control can be bound to it (the Controls page keeps listening and says why), and a control that had it already is named on the key row and on Open OptiScaler. While Longshot's menu is open the key is kept from OptiScaler. Pressed there, it closes Longshot's menu and OptiScaler's opens once Longshot's has closed. With the restart question it waits: Later opens it, Restart Now doesn't (nor in the game that starts again). Open OptiScaler takes the same path. Tested in the game on this PC; details are in the description's Testing.
test(vk): the foreign-DLL check's Windows DLLs built with the runner's C compiler (--cc), not one guessed from --cxx
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b4bb369582
BeanBot's review (L6): the check rewrote the C++ compiler's name into a C compiler's and ignored CC. It now takes
--cc {cc} from the test runner, as the other checks with C parts do, and builds its two DLLs with it.

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

Answers to BeanBot's review (of 1300dab32):

  • L1, L2, L5: confirmed against the code. All three are real. Fixes are coming in the builder (the seeded ini recorded and only that one removed; a player's OptiScaler found under every proxy name; the renames rolled back when the record can't be written), each with a test. I'll reply here when they're pushed.
  • L3: fixed in a56796748, pushed before this review was read. Open OptiScaler (and OptiScaler's key with Longshot's menu open) no longer presses on a timer. OptiScaler's key is kept from it while Longshot's menu is open, and it's given to OptiScaler only once the menu has actually closed. With the restart question, it waits: Later opens OptiScaler's menu; Restart Now cancels it, and the game that starts again has nothing pending. Tested in the game (Testing has each path).
  • L4: no change, because the narrow calls are UTF-8 in every game that runs. longshot.exe's manifest sets activeCodePage UTF-8 (tests/test_utf8_paths.py checks it), so the CRT's narrow file calls and MoveFileExA take UTF-8 paths. Where Windows doesn't apply it (before 1903), host/hos_main.c's narrow_paths_ok refuses to start the game unless the path is plain ASCII. The ini's folder comes from GetModuleFileNameW, made UTF-8. So there's no running game where the path holds characters outside the code page. The same holds for the footer's ini read.
  • L6: fixed in b4bb36958. The check takes --cc {cc} from the runner, as the other checks with C parts do. It passes on Windows (clang) and Linux (gcc).
  • L7: already in Still to test: AMD and Intel on Windows through the Test Farm, once a BigBean approves.
Answers to BeanBot's review (of 1300dab32): - **L1, L2, L5:** confirmed against the code. All three are real. Fixes are coming in the builder (the seeded ini recorded and only that one removed; a player's OptiScaler found under every proxy name; the renames rolled back when the record can't be written), each with a test. I'll reply here when they're pushed. - **L3:** fixed in a56796748, pushed before this review was read. Open OptiScaler (and OptiScaler's key with Longshot's menu open) no longer presses on a timer. OptiScaler's key is kept from it while Longshot's menu is open, and it's given to OptiScaler only once the menu has actually closed. With the restart question, it waits: Later opens OptiScaler's menu; Restart Now cancels it, and the game that starts again has nothing pending. Tested in the game (Testing has each path). - **L4:** no change, because the narrow calls are UTF-8 in every game that runs. `longshot.exe`'s manifest sets `activeCodePage` UTF-8 (`tests/test_utf8_paths.py` checks it), so the CRT's narrow file calls and `MoveFileExA` take UTF-8 paths. Where Windows doesn't apply it (before 1903), `host/hos_main.c`'s `narrow_paths_ok` refuses to start the game unless the path is plain ASCII. The ini's folder comes from `GetModuleFileNameW`, made UTF-8. So there's no running game where the path holds characters outside the code page. The same holds for the footer's ini read. - **L6:** fixed in b4bb36958. The check takes `--cc {cc}` from the runner, as the other checks with C parts do. It passes on Windows (clang) and Linux (gcc). - **L7:** already in Still to test: AMD and Intel on Windows through the Test Farm, once a BigBean approves.
fix(builder): OptiScaler's review: a player's settings kept, their copy under any proxy name kept alone, renames undone when unrecorded
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
3474f9655d
BeanBot's review of #2985:
- L1: an Off build removed OptiScaler.ini whenever OptiScaler had been placed, though a player's own settings
  file already there is never the builder's. The record now says whether the builder put it there
  (optiscaler_ini), and only that one goes.
- L2: a player's OptiScaler under winhttp.dll or dbghelp.dll (a name the game loads, which set_aside puts
  back) was not seen, so the builder placed its own winmm.dll beside it and both loaded. It is now kept
  alone, and the builder's own OptiScaler files go.
- L5: a rename aside or back whose record could not be written was left in place with nothing to say
  where the player's copy is. Those renames are now taken back, said.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
llun left a comment

Builder points of BeanBot's review (issuecomment-96456) L1, L2 and L5 are fixed in 3474f9655, each with a build-driver test. build-driver's 191 tests pass, and clippy and fmt are clean. Replies are on the lines.

Builder points of BeanBot's review (issuecomment-96456) L1, L2 and L5 are fixed in 3474f9655, each with a build-driver test. build-driver's 191 tests pass, and clippy and fmt are clean. Replies are on the lines.
@ -326,0 +350,4 @@
return ours;
}
if was == Some(runtimes::SL_PLACED) && !runtimes::streamline_stays(fetched.optiscaler) {
if !seeded {
Author
Member

L1: fixed in 3474f9655. The record now says whether the builder put OptiScaler.ini there (optiscaler_ini: set when the seed is copied in, kept while that file is still there). An Off build removes the ini only then; one that was there before OptiScaler was placed is the player's and stays (logged). Test: build::optiscaler_settings_tests::an_off_build_takes_out_only_the_settings_the_builder_put_there.

**L1**: fixed in 3474f9655. The record now says whether the builder put OptiScaler.ini there (`optiscaler_ini`: set when the seed is copied in, kept while that file is still there). An Off build removes the ini only then; one that was there before OptiScaler was placed is the player's and stays (logged). Test: `build::optiscaler_settings_tests::an_off_build_takes_out_only_the_settings_the_builder_put_there`.
@ -988,0 +1074,4 @@
"the game folder's record could not be written ({e}): your OptiScaler is left where it was"
),
});
said.extend(crate::optiscaler::undo(&moved));
Author
Member

L5: fixed in 3474f9655. set_aside_moving returns the renames it made. When the record can't be written, optiscaler::undo renames them back (last first) and says so (optiscaler_aside_failed), so no copy is left aside without a record of where it is. Test: play::tests::a_rename_aside_that_cannot_be_recorded_is_taken_back (failing write, both ways).

**L5**: fixed in 3474f9655. `set_aside_moving` returns the renames it made. When the record can't be written, `optiscaler::undo` renames them back (last first) and says so (`optiscaler_aside_failed`), so no copy is left aside without a record of where it is. Test: `play::tests::a_rename_aside_that_cannot_be_recorded_is_taken_back` (failing write, both ways).
@ -681,0 +839,4 @@
}
// (a player's own OptiScaler under any name the game loads, winhttp.dll or dbghelp.dll as well as winmm.dll: kept
// alone, none of the builder's placed beside it, so two never load)
let theirs = players_optiscaler(out);
Author
Member

L2: fixed in 3474f9655. Before placing anything, players_optiscaler checks every optiscaler::PROXY_NAMES name besides the builder's own (winhttp.dll, dbghelp.dll). A DLL the builder didn't put there whose version strings name OptiScaler is kept alone (kept, nothing downloaded), and Fetched::optiscaler_out makes the build take the builder's own OptiScaler files out, so an earlier placed winmm.dll doesn't load beside it. Test: runtimes::tests::a_players_optiscaler_under_any_name_the_game_loads_is_kept_alone.

**L2**: fixed in 3474f9655. Before placing anything, `players_optiscaler` checks every `optiscaler::PROXY_NAMES` name besides the builder's own (`winhttp.dll`, `dbghelp.dll`). A DLL the builder didn't put there whose version strings name OptiScaler is kept alone (`kept`, nothing downloaded), and `Fetched::optiscaler_out` makes the build take the builder's own OptiScaler files out, so an earlier placed `winmm.dll` doesn't load beside it. Test: `runtimes::tests::a_players_optiscaler_under_any_name_the_game_loads_is_kept_alone`.
Author
Member

Ran BeanBot's builder fixes (3474f9655) on this PC through the queue. Normal path: On placed OptiScaler and seeded its ini (record optiscaler_ini true); Graphics → OptiScaler Off plus Restart Now removed every file, the licenses and the seeded ini. L1: a player's own OptiScaler.ini there before On was kept as theirs (their F7 key kept), and an Off Rebuild logged it kept and removed only the builder's files. Details are in Testing.

Ran BeanBot's builder fixes (3474f9655) on this PC through the queue. Normal path: On placed OptiScaler and seeded its ini (record optiscaler_ini true); Graphics → OptiScaler Off plus Restart Now removed every file, the licenses and the seeded ini. L1: a player's own OptiScaler.ini there before On was kept as theirs (their F7 key kept), and an Off Rebuild logged it kept and removed only the builder's files. Details are in Testing.
feat(builder): OptiScaler.ini outlives Off, so OptiScaler's settings and the player's key are there when it is on again
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 12s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
98812f6a00
llun's decision ("Yes, keep it"): turning OptiScaler off no longer deletes OptiScaler.ini, seeded or not; its
other files still go. Turned on again, the kept file is used as it is, its settled lines (frame generation off,
keys clear of Longshot's) set as at every start. The record's optiscaler_ini, now read by nothing, is dropped.
The user guide says how to have OptiScaler's defaults back: delete OptiScaler.ini.

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

OptiScaler.ini is now kept when OptiScaler is turned off (98812f6a0, llun's decision), so OptiScaler's own settings and the key chosen in Controls are there again when it's turned on; deleting the file brings back OptiScaler's defaults. Run in the game through the queue: On seeded the ini (F5); Controls set F6; Off plus Restart Now removed the DLLs and licenses and kept the ini; On plus Restart Now placed OptiScaler again with the same ini (F6, frame generation still forced off), and F6 opened OptiScaler's menu. build-driver's 191 tests pass.

OptiScaler.ini is now kept when OptiScaler is turned off (98812f6a0, llun's decision), so OptiScaler's own settings and the key chosen in Controls are there again when it's turned on; deleting the file brings back OptiScaler's defaults. Run in the game through the queue: On seeded the ini (F5); Controls set F6; Off plus Restart Now removed the DLLs and licenses and kept the ini; On plus Restart Now placed OptiScaler again with the same ini (F6, frame generation still forced off), and F6 opened OptiScaler's menu. build-driver's 191 tests pass.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The reported Windows NVIDIA run shows the feature working, and the code fixes address the reviewed defects. AMD and Intel Windows integration runs and the pending CI results are still needed. Recommend approval; not approved on the forge.

Adds an off-by-default Windows OptiScaler integration, including builder-managed files, menu controls, logging and documentation. It preserves the player's settings across disabling and reenabling it, at the cost of additional builder and input-handling complexity.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L7: The Windows integration has only a reported NVIDIA run; its intended use with the other vendors has not been exercised. When: A player enables OptiScaler on an AMD or Intel Windows system and depends on the DLSS input interception and selected replacement upscaler working on that driver. Do: Run the enable, restart, upscaler selection, menu and disable paths on representative AMD and Intel Windows systems and record the results.

Since the last review (on 1300dab323)
Resolved: L1 (Removing OptiScaler deletes its settings even when the builder did not create them.); L2 (The ownership check only looks at the builder's destination names, not the other proxy nam…); L3 (The OptiScaler key is sent on a timer even when the requested menu close opens a restart q…); L5 (A successful rename is not undone when writing its record fails.); L6 (The Windows test derives a C compiler by rewriting the C++ compiler name and ignores CC.)
Withdrawn (it was wrong): L4 (The ini path is UTF-8, but the file streams and MoveFileExA use Windows narrow-path handli…)
Still open: L7 (The Windows integration has only a reported NVIDIA run; its intended use with the other ve…)

Checks: Still running: 11 checks.

Also noticed (1; not asked for, not blocking)
  • The build.rs comment near the removal list still says settings placed by the builder are removed, although the settings now survive removal.
More: does it help, other systems, switches, what was read

Does it help: Yes for the feature on the reported Windows 11 RTX 5080 run: the author reports that OptiScaler loaded, took DLSS inputs, and its menu and restart paths worked. This is not a performance change; no performance gain is claimed or measured.

Other systems: The integration affects Windows builder placement, proxy DLL loading, menu input and NVIDIA DLSS routing; Linux ignores the setting. AMD and Intel Windows paths remain untested in the supplied reports.

Switches: Adds the Windows Graphics OptiScaler setting, saved as optiscaler=, default off. The opt-in default is appropriate for a third-party mod; the switch reference and user guides are updated.

Reviewed: 98812f6a00 against 56823e27a1: Read AGENTS.md, CONTRIBUTING.md, the pull request template, commit list, the changes to the ledger-related code and surrounding rename and path handling. The larger base diff and remaining changed files were not read in full; the supplied test reports were skimmed. docs/review-checklist.md was absent.; nothing run (a code review).

Checked and fine:

  • The reported on/off/on run retained the selected F6 key and kept frame generation disabled.
  • The rename rollback is attempted in reverse order and reports a failed rollback.

Testing: No commands from the project were run. The author reports Windows NVIDIA game and builder testing; all listed CI checks are still running.

Overlaps and merge order: LongshotLauncher#392 supplies the licence listing; its merge status is not provided.


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

**Recommendation: Approve.** The code is ready: only testing is left. The reported Windows NVIDIA run shows the feature working, and the code fixes address the reviewed defects. AMD and Intel Windows integration runs and the pending CI results are still needed. Recommend approval; not approved on the forge. Adds an off-by-default Windows OptiScaler integration, including builder-managed files, menu controls, logging and documentation. It preserves the player's settings across disabling and reenabling it, at the cost of additional builder and input-handling complexity. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L7**: The Windows integration has only a reported NVIDIA run; its intended use with the other vendors has not been exercised. *When:* A player enables OptiScaler on an AMD or Intel Windows system and depends on the DLSS input interception and selected replacement upscaler working on that driver. **Do:** Run the enable, restart, upscaler selection, menu and disable paths on representative AMD and Intel Windows systems and record the results. **Since the last review** (on 1300dab32315) Resolved: L1 (Removing OptiScaler deletes its settings even when the builder did not create them.); L2 (The ownership check only looks at the builder's destination names, not the other proxy nam…); L3 (The OptiScaler key is sent on a timer even when the requested menu close opens a restart q…); L5 (A successful rename is not undone when writing its record fails.); L6 (The Windows test derives a C compiler by rewriting the C++ compiler name and ignores CC.) Withdrawn (it was wrong): L4 (The ini path is UTF-8, but the file streams and MoveFileExA use Windows narrow-path handli…) Still open: L7 (The Windows integration has only a reported NVIDIA run; its intended use with the other ve…) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The build.rs comment near the removal list still says settings placed by the builder are removed, although the settings now survive removal. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the feature on the reported Windows 11 RTX 5080 run: the author reports that OptiScaler loaded, took DLSS inputs, and its menu and restart paths worked. This is not a performance change; no performance gain is claimed or measured. **Other systems:** The integration affects Windows builder placement, proxy DLL loading, menu input and NVIDIA DLSS routing; Linux ignores the setting. AMD and Intel Windows paths remain untested in the supplied reports. **Switches:** Adds the Windows Graphics OptiScaler setting, saved as optiscaler=, default off. The opt-in default is appropriate for a third-party mod; the switch reference and user guides are updated. **Reviewed:** 98812f6a0068 against 56823e27a13a: Read AGENTS.md, CONTRIBUTING.md, the pull request template, commit list, the changes to the ledger-related code and surrounding rename and path handling. The larger base diff and remaining changed files were not read in full; the supplied test reports were skimmed. docs/review-checklist.md was absent.; nothing run (a code review). **Checked and fine:** - The reported on/off/on run retained the selected F6 key and kept frame generation disabled. - The rename rollback is attempted in reverse order and reports a failed rollback. **Testing:** No commands from the project were run. The author reports Windows NVIDIA game and builder testing; all listed CI checks are still running. **Overlaps and merge order:** LongshotLauncher#392 supplies the licence listing; its merge status is not provided. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
docs(builder): the removal list's comment says OptiScaler.ini stays when OptiScaler is turned off
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 11s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 4m26s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m22s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m21s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m31s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 23m55s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 39m17s
30b3c3ef5c
It still said the settings the builder put there go with OptiScaler's files, which 98812f6a0 changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 11s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 4m26s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m22s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m21s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m31s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 23m55s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 39m17s
This pull request has changes conflicting with the target branch.
  • builder/crates/build-driver/src/build.rs
  • builder/crates/build-driver/src/folder.rs
  • builder/crates/build-driver/src/play.rs
  • builder/crates/build-driver/src/verify.rs
  • builder/crates/longshot-builder/src/info.rs
  • docs/dev/reference/build-events.md
  • docs/dev/reference/build.md
  • docs/dev/reference/switches.md
  • docs/user/graphics-and-controls.md
  • gpu/vk/menu_module.h
  • gpu/vk/settings/optiscaler.cpp
  • gpu/vk/settings/optiscaler.h
  • gpu/vk/vk_menu.cpp
  • gpu/vk/vk_menu.h
View 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.
git fetch -u 'feat/optiscaler-builder:llun-feat/optiscaler-builder'
git switch 'llun-feat/optiscaler-builder'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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/Longshot!2985
No description provided.