Skip to content

Steam join: resolve lobby in-process, drop RestartAppIfNecessary in w… - #60

Merged
vaiserYT merged 1 commit into
vaiserYT:mainfrom
TenerexBlatta:steam-join-fix-0.5.1
Nov 9, 2026
Merged

vaiserYT merged 1 commit into
vaiserYT:mainfrom
TenerexBlatta:steam-join-fix-0.5.1

Conversation

@TenerexBlatta

Copy link
Copy Markdown
Contributor

…orker

Joining a Steam P2P lobby always spawned the separate worker process, which must load steam_api64.dll and init Steam again. On some installs that throws DllNotFoundException('steam_api64'), and when the DLL is found the worker's SteamAPI.RestartAppIfNecessary can make Steam relaunch the game, after which the real game fails "Steam init" until Steam is restarted.

  • Resolve the lobby in the game process first (TryRunJoin -> TryRunJoinInProcess), using the SteamAPI the game already initialized, like the in-process P2P host. It runs on the existing background task, never takes the pump lock or calls RunCallbacks off the main thread; the worker is only a fallback when in-process Steam is unavailable.
  • Remove RestartAppIfNecessary from the worker; set SteamAppId/SteamGameId.
  • Preload steam_api64.dll by full path in PrepareSteamNativePath.

Pull Request

Summary

Describe what this pull request changes.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Performance improvement
  • Other

Related issue

Fixes #

What was changed?

Testing

How did you test this?

  • Tested as host
  • Tested as client
  • Tested with 2 players
  • Tested revive/downed system
  • Tested enemy/rune progression
  • Not tested in-game yet

Known issues

List any problems or unfinished parts.

Checklist

  • My change is focused and not mixed with unrelated edits
  • I kept credit to the original project
  • I updated documentation if needed
  • I checked that the project still builds, if possible

…orker

Joining a Steam P2P lobby always spawned the separate worker process, which
must load steam_api64.dll and init Steam again. On some installs that throws
DllNotFoundException('steam_api64'), and when the DLL is found the worker's
SteamAPI.RestartAppIfNecessary can make Steam relaunch the game, after which
the real game fails "Steam init" until Steam is restarted.

- Resolve the lobby in the game process first (TryRunJoin ->
  TryRunJoinInProcess), using the SteamAPI the game already initialized, like
  the in-process P2P host. It runs on the existing background task, never
  takes the pump lock or calls RunCallbacks off the main thread; the worker is
  only a fallback when in-process Steam is unavailable.
- Remove RestartAppIfNecessary from the worker; set SteamAppId/SteamGameId.
- Preload steam_api64.dll by full path in PrepareSteamNativePath.
@vaiserYT
vaiserYT merged commit ad66ee5 into vaiserYT:main Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants