Skip to content

Commit 98bd367

Browse files
committed
fix: overlay disable also blocks gameoverlayrenderer at Wine's loader
The toggle previously only set DISABLE_VK_LAYER_VALVE_steam_overlay_1=1 (Vulkan layer skip) and SteamNoOverlayUIDrawing=1 (in-process draw skip). Steam still injected gameoverlayrenderer*.dll into every game; the DLL just opted out of drawing. Add WINEDLLOVERRIDES with empty load order on gameoverlayrenderer and gameoverlayrenderer64 so Wine's loader refuses to map the PE DLLs in the first place. Three differences from the prior catch-all attempt (commit 5d03235, reverted) that hung all real-Steam launches: - Use individual ';'-separated entries instead of a comma-grouped list with one trailing '='. The comma-grouped shape was the form that hung; individual entries parse unambiguously. - Drop SteamOverlayVulkanLayer / SteamOverlayVulkanLayer64 from the WINEDLLOVERRIDES list. Those are Vulkan-layer DLLs consumed by the Vulkan loader, not Wine's PE loader; the Khronos disable env var already covers that path. - Gate the WINEDLLOVERRIDES path on isLaunchRealSteam. In emu mode Goldberg replaces SteamAPI and the overlay DLL is never loaded, so the override is dead code there; gating it prevents any chance of regressing emu-mode boots. The two existing env vars stay as defense in depth.
1 parent b7cf9fd commit 98bd367

2 files changed

Lines changed: 30 additions & 6 deletions

File tree

app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3220,14 +3220,38 @@ private fun setupXEnvironment(
32203220
envVars.putAll(container.envVars)
32213221
if (!envVars.has("WINEESYNC")) envVars.put("WINEESYNC", "1")
32223222

3223-
// Disable the Steam Vulkan overlay layer via its own disable_environment
3224-
// hook when the user has opted out. This is the Khronos-canonical way to
3225-
// skip an implicit layer — the loader sees the env var and never
3226-
// initializes the layer, which avoids the race where Steam re-extracts
3227-
// the stashed layer files during client startup.
3223+
// Disable the Steam overlay end-to-end when the user opts out:
3224+
//
3225+
// 1. DISABLE_VK_LAYER_VALVE_steam_overlay_1 — Khronos-canonical
3226+
// disable hook for the Steam Vulkan implicit layer. The Vulkan
3227+
// loader sees the env var and never initializes the layer.
3228+
// (No Wine WINEDLLOVERRIDES needed for the Vulkan layer — it's
3229+
// consumed by the Vulkan loader, not Wine's PE loader.)
3230+
// 2. SteamNoOverlayUIDrawing — read by gameoverlayrenderer*.dll
3231+
// itself; tells the in-process DLL to skip drawing once it's
3232+
// already been loaded.
3233+
// 3. WINEDLLOVERRIDES with empty load order on the two
3234+
// gameoverlayrenderer PE DLLs — makes Wine's loader refuse
3235+
// to map the DLLs into the game process at all. Real-Steam
3236+
// only: in emu mode Goldberg replaces SteamAPI and the overlay
3237+
// DLL is never loaded, so the override is dead code there;
3238+
// gating it on isLaunchRealSteam also avoids any chance of
3239+
// regressing emu-mode boots.
3240+
//
3241+
// Each entry is its own `;`-separated key — comma-grouping the
3242+
// names with a single trailing `=` (the prior shape) was the form
3243+
// that hung Steam launches; individual entries parse unambiguously.
32283244
if (container.isDisableSteamOverlay) {
32293245
envVars.put("DISABLE_VK_LAYER_VALVE_steam_overlay_1", "1")
32303246
envVars.put("SteamNoOverlayUIDrawing", "1")
3247+
if (container.isLaunchRealSteam) {
3248+
val overlayOverride = "gameoverlayrenderer=;gameoverlayrenderer64="
3249+
val existing = envVars.get("WINEDLLOVERRIDES")
3250+
envVars.put(
3251+
"WINEDLLOVERRIDES",
3252+
if (existing.isEmpty()) overlayOverride else "$existing;$overlayOverride",
3253+
)
3254+
}
32313255
}
32323256

32333257
val graphicsDriverConfig = KeyValueSet(container.getGraphicsDriverConfig())

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@
679679
<string name="launch_steam_client_beta">Launch Steam Client (Beta)</string>
680680
<string name="launch_steam_client_description">Reduces performance and slows down launch\nAllows online play and fixes DRM and controller issues\nNot all games work</string>
681681
<string name="disable_steam_overlay">Disable Steam Overlay</string>
682-
<string name="disable_steam_overlay_description">Skip injecting gameoverlayrenderer64.dll\nAchievements still unlock but popups won\'t appear\nMay fix crashes on Unity/Vulkan games</string>
682+
<string name="disable_steam_overlay_description">Blocks the GameOverlayRenderer DLLs at Wine\'s loader and skips the Steam Vulkan overlay layer\nAchievements still unlock but popups won\'t appear\nMay fix crashes on Unity/Vulkan games</string>
683683
<string name="sdk_cloud_save_subdir_section">Cloud Save Bridge</string>
684684
<string name="sdk_cloud_save_subdir_section_description">For games that store cloud saves inside their install directory (e.g. Dead Cells). Leave blank unless saves aren\'t syncing. \"Use Recommended\" pulls from the Ludusavi manifest.</string>
685685
<string name="sdk_cloud_save_subdir_label">Local save subdirectory</string>

0 commit comments

Comments
 (0)