Darner native mouse look, keyboard driving, Streamline FG backend and Linux/Proton support #89
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!89
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-89"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@r32601366 on GitHub · 2026-12-05 18:03 UTC · original
r32601366:larp-common→main· +4373 −67 · 28 files · 2 commits · closed without mergingSummary
This brings over features from Darner (also GPL) that make larp playable with mouse and keyboard and with frame generation on Linux/Proton:
crates/larp-hle/src/mousehook.rs): a 1:1 camera hook on the title's look-input consumer (look_pull), ported from Darner'smousehook.rs. It checks bytes before patching and is refused on any other build. It is on by default;LARP_NATIVE_MOUSE=0turns it off. F7 releases or takes back the mouse capture. The camera is not moved in menus, pause, the map, the F10 menu or while pipelines compile.bindings.inisets the keys (LARP_BINDINGS; the default isbindings.ini.default).crates/larp-gpu/src/slfg*):LARP_FG_BACKEND=streamline|ngx. The default isstreamlineunder Wine andngxelsewhere. Under Proton the NGX DLSS-G path created the feature but no generated frames reached the screen; Streamline works.linux/folder (setup.sh,run.sh, README with step-by-step setup), pipeline workers with a larger stack and thread priority rights that Wine accepts, a preload mode (LARP_PRELOAD=1), and the per-second frame generation stats moved out of the diagnostics-only build.How it fits with upstream's mouse support
When the native hook is active (the default on the known build),
gameinput::mouse::handle_window_messageis skipped and the mouse never drives the right stick, so there is one capture and one camera. When the hook is off (LARP_NATIVE_MOUSE=0, or an unknown build), upstream'scontrols.ini/LARP_CONTROLSpath is unchanged. DualSense code is untouched.Testing
x86_64-pc-windows-gnullvm(RUSTFLAGS="-C link-arg=-luuid"). No errors.0f03265awas start-tested only, not played: Streamline FG and Reflex load, and both the look hook and the auto-center hook are placed.Notes
LARP_MOUSE_SENSmeans radians per count for the native hook (default 0.0015) and a multiplier for upstream's path. Only one path is active at a time.0f03265a: native mouse look, bindings.ini, Streamline FG, Linux 684b7cd4fd@Kassadd on GitHub · 2026-12-05 18:11 UTC · original · edited 2026-12-05 18:13 UTC
linux/setup.shinstalls a prebuiltlarp-common.exefrom an external release — is that meant to stay?It fetches
larp-common.exe(85 MB),libc++.dll,libunwind.dll, a patched vkd3d (d3d12*.dll) and the replacement shaders from.../larp-common/releases/download/v0.2, with no pinned SHA-256. The only guard ishead -c 512 | grep -qi '<html'— that catches a sign-in page, not a replaced file. So the PR is reviewed as source, but the binary users run is not the one that was reviewed, and it stops matchingmainafter the next commit.Everything else here builds from source (
cargo build --release -p larp), andvkd3d-proton-patches.diffin the release is already auditable. The 85 MB.exeis the odd one out.Could
setup.shtake the exe instead of fetching it (LARP_COMMON_EXE=...)? #23'slinux/build.shbuilds this tree in ~48 s with cargo-xwin and pins hashes, and the twolinux/folders would stop fighting overrun.sh/setup.sh.Also:
setup.shnever installsd3dcompiler_47; without it host ray tracing does not come up (E5005: Method 'Load4' is not defined).Stopgap while the build path settles, or the intended install method?
@r32601366 on GitHub · 2026-12-05 18:47 UTC · original
Thanks, all good points. Addressed in
82b3aad:linux/assets-v0.2.sha256holds the SHA-256 of every release asset (exe,libc++.dll,libunwind.dll,d3d12*.dll,shader-replace.zip).setup.shchecks each download against it and stops on any mismatch. The<htmlcheck stays only to give a clear message when a server answers with a sign-in page.LARP_COMMON_EXE=/path/to/larp.exe ./setup.sh ...skips the exe download, and takeslibc++.dll/libunwind.dllfrom beside it when present../setup.sh --buildbuilds this tree with cargo (x86_64-pc-windows-gnullvm, llvm-mingw) and installs that. The prebuilt exe is now only the default for people without a toolchain.setup.shnow installs it into the install's own prefix with winetricks through umu (--no-d3dcompilerto skip). Checked on a fresh prefix:system32/d3dcompiler_47.dllis in place, with a native override.Both paths, the pinned download and
LARP_COMMON_EXE, were run end to end on a clean folder.On #23: agreed that two
linux/folders shouldn't compete. I'm happy to rebase onto #23 once it lands. I'd keep itsbuild.sh(cargo-xwin, pinned hashes) as the one build path and reduce this PR'slinux/to what #23 doesn't cover: the Streamline download and theLARP_FG_BACKEND/native mouse defaults in the launcher. Or I can splitlinux/out of this PR entirely if you'd rather review the input/FG code on its own. Which do you prefer?@gamingwithhomie on GitHub · 2026-12-05 18:50 UTC · original
Reviewed in detail - thank you, theres a lot of good work here (Streamline ABI layout tests, Authenticode check on the interposer, BLAKE3+byte-checked hooks). Holding merge as a single PR:
slfg::initruns at device creation even if FG is never enabled). Four features are bundled, three change defaults.MAP_DRAG_OK/MAP_ZOOM_OK/MAP_RAYCAST_OK/MAP_HELPERS_OKare loaded but never storedtrueanywhere, andwindow_messagehas twoWM_MOUSEWHEELarms (first shadows the map-wheel arm) - as shipped, map drag/zoom doesnt actually work. Compare #78, which stores them at install.crates/larp-hle/src/mousehook.rs(samelook_pull, two designs - one must be chosen), semantic conflict with #78 (same map hooks; second installer fails its byte check and silently disables), F7 collision with #86.linux/setup.shdownloads executables with no checksum/signature verification.Suggested split: (a) Streamline FG with an explicit opt-in, (b) Linux scripts + Wine fixes, (c) native mouse behind
LARP_NATIVE_MOUSE=1after choosing between this and #46s design, with the map code fixed or dropped. Thank you!github-bot referenced this pull request2026-12-05 19:01:07 +00:00
@r32601366 on GitHub · 2026-12-05 19:23 UTC · original
Thanks for the detailed review. Split as suggested, each on current main:
LARP_FG_BACKEND=streamline). Without itslfg::initis never called and nothing of Streamline is loaded. The default stays ngx everywhere, Wine included. The Darner-specific default folder is dropped.linux/folder and no prebuilt exe download: #23 covers build/setup/run.look_pullhook). The map code is dropped (that's #78's), and no F7 or other hotkey is used.Closing this one in favour of those three.
Pull request closed