run: apply LARP_HOST_NAME before the menu's NVIDIA query #429

Open
github-bot wants to merge 1 commit from github-bot/gh-429 into main AGit
Owner

@⁠kadiratesdev on GitHub · 2026-12-06 00:44 UTC · original
kadiratesdev:fix/host-name-before-menu → main · +6 −3 · 1 files · 1 commits · open

LARP_HOST_NAME (#87) is applied too late: run::menu_choices now runs first and loads nvapi64.dll to read the NVIDIA shader heap. That library loads the winmm.dll beside larp.exe, and a proxy mod checks the host name in DllMain. It sees the real name (larp.exe) and disables itself, so the configured name never takes effect.

This started in 9926760 ("New look: text size, start options, controls and shader heap rows"), which called menu_choices before host_name::apply. It is in v1.1.6.

The fix applies the host name first, then reads the menu. advisor::check and mods::load_all still run only for run --execute.

Verified on an RTX 3080 Ti with a winmm.dll proxy that hooks the title under LARP_HOST_NAME=victory.exe: the proxy's hooks are installed again, matching the pre-regression build, and a full in-game session shows Turkish text from the start.

**@⁠kadiratesdev** on GitHub · 2026-12-06 00:44 UTC · [original](https://github.com/gamingwithhomie/larp/pull/429) `kadiratesdev:fix/host-name-before-menu` → `main` · +6 −3 · 1 files · 1 commits · open `LARP_HOST_NAME` (#87) is applied too late: `run::menu_choices` now runs first and loads `nvapi64.dll` to read the NVIDIA shader heap. That library loads the `winmm.dll` beside `larp.exe`, and a proxy mod checks the host name in `DllMain`. It sees the real name (`larp.exe`) and disables itself, so the configured name never takes effect. This started in 9926760 ("New look: text size, start options, controls and shader heap rows"), which called `menu_choices` before `host_name::apply`. It is in v1.1.6. The fix applies the host name first, then reads the menu. `advisor::check` and `mods::load_all` still run only for `run --execute`. Verified on an RTX 3080 Ti with a `winmm.dll` proxy that hooks the title under `LARP_HOST_NAME=victory.exe`: the proxy's hooks are installed again, matching the pre-regression build, and a full in-game session shows Turkish text from the start.
menu_choices queries nvapi64.dll, and that library loads the winmm.dll
beside larp.exe. A proxy's DllMain then reads the host name, so
LARP_HOST_NAME has to be in place first (#87).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:48:39 +00:00
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-12-06 00:44 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-12-06 00:44 UTC · [original](https://github.com/gamingwithhomie/larp/pull/429#pullrequestreview-6207217279) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Author
Owner

@⁠vanya890 on GitHub · 2026-12-06 01:08 UTC · original · approved these changes

Reviewed against the current main implementation. The ordering is correct: host_name::apply() now runs before menu_choices() can query NVAPI and load the adjacent winmm.dll proxy. The Guard remains alive through menu_choices() and mods::load_all(), while execute.then(...) preserves the non-executing bind-only path. The current main branch still has the original ordering, and the PR is cleanly mergeable. No blocking issues found.

**@⁠vanya890** on GitHub · 2026-12-06 01:08 UTC · [original](https://github.com/gamingwithhomie/larp/pull/429#pullrequestreview-6207351268) · **approved these changes** Reviewed against the current `main` implementation. The ordering is correct: `host_name::apply()` now runs before `menu_choices()` can query NVAPI and load the adjacent `winmm.dll` proxy. The `Guard` remains alive through `menu_choices()` and `mods::load_all()`, while `execute.then(...)` preserves the non-executing bind-only path. The current main branch still has the original ordering, and the PR is cleanly mergeable. No blocking issues found.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/429/head:github-bot/gh-429'
git switch 'github-bot/gh-429'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-429'
git switch 'github-bot/gh-429'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-429'
git switch 'github-bot/gh-429'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-429'
git switch 'main'
git merge --squash 'github-bot/gh-429'
git switch 'main'
git merge --ff-only 'github-bot/gh-429'
git switch 'main'
git merge 'github-bot/gh-429'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.