fix(steam): guard overlay features against incomplete Steam API implementations#43
Closed
lisniuse wants to merge 4 commits into
Closed
fix(steam): guard overlay features against incomplete Steam API implementations#43lisniuse wants to merge 4 commits into
lisniuse wants to merge 4 commits into
Conversation
…mentations Wrap Steam overlay join polling, callback registration, and RunCallbacks in try-catch blocks to prevent native crashes when running with emulated Steam environments (e.g. Goldberg emulator or non-Steam game versions). - Add s_steamOverlayDisabled flag to permanently disable overlay features after the first native failure, avoiding repeated crash attempts - Guard TryPollSteamOverlayJoinFromLaunchData against crashes from SteamApps.GetLaunchCommandLine / GetLaunchQueryParam (unsupported by Goldberg emulator) - Guard TryDeferredSteamOverlayCallbackRegistration and TryRegisterSteamOverlayJoinCallback against Callback<T>.Create failures - Add safety checks to TryRunSteamCallbacks and background timer - All guards are transparent to real Steam users (no exceptions thrown on genuine Steam API)
31307f0 to
8eebde0
Compare
…eam clients Move Steam API init outside the main try block in WorkerEntry() so that init failures (SteamAPI.Init / RestartAppIfNecessary) write a bootstrap response before exiting, instead of throwing an unhandled exception that triggers a Windows crash dialog. Also update README with proper non-Steam setup instructions: - Rename steam.hdll to enable Goldberg emulator - Set EnableGoldberg: true in modcore.json - Launch via DeadCellsModding.exe directly - Document TCP/LAN limitation for non-Steam (P2P unavailable) Closes vaiserYT#42
… restart When both players die and the host triggers a run restart, the client was left stuck on the Game Over screen because the GameOver UI was never dismissed before launching the new game. - Add GameOver removal (remove/destroy/dispose) in ResetAllDownedGameOverState - Add DismissGameOverScreen helper in GameMenu - Call it from both QueueHostRestartFromDeath and QueueClientRestartFromHostSeed to ensure cleanup on both sides
…triggers restart" This reverts commit c274f95.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wrap Steam overlay join polling, callback registration, and RunCallbacks in try-catch blocks to prevent native crashes when running with emulated Steam environments (e.g. Goldberg emulator or non-Steam game versions).
Problem
When using the mod with non-Steam game versions (e.g. GOG, or cracked versions using Goldberg/Rune emulators),
SteamAPI.Init()can succeed (since basic init is emulated), but functions likeSteamApps.GetLaunchCommandLineandSteamApps.GetLaunchQueryParammay crash at the native level because the emulator doesn't fully implement them. This causes the entire game process to terminate with a "Fatal Error" immediately after font initialization.Solution
s_steamOverlayDisabledflag to permanently disable overlay features after the first native failureTryPollSteamOverlayJoinFromLaunchDatacalls toSteamApps.GetLaunchCommandLine/GetLaunchQueryParamin try-catchTryDeferredSteamOverlayCallbackRegistrationandTryRegisterSteamOverlayJoinCallbackcallback registrations in try-catchTryRunSteamCallbacksand the background pump timerAll guards are transparent to genuine Steam users -- no exceptions are thrown on a real Steam API, so the try-catch paths are never hit.
Testing
Tested on a non-Steam Dead Cells installation (v35) with Goldberg emulator and DCCM core modding. The mod previously crashed during title screen load; after this fix, the game runs normally and TCP multiplayer works as expected.