Skip to content

Commit

Permalink
fix up gameoverlayrenderer patch
Browse files Browse the repository at this point in the history
  • Loading branch information
marzent committed Jan 27, 2024
1 parent 1032af3 commit e29cb52
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ca0b95585378c144be683ceb45ef54dcc5bf9b82 Mon Sep 17 00:00:00 2001
From 89631f2bf0cd5a1dd4a075c50db2fc365442b3c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Wed, 18 Dec 2019 13:49:00 +0100
Subject: [PATCH] HACK: proton: ntdll: Strip gameoverlayrenderer.so from
Expand All @@ -13,24 +13,24 @@ modify the environment after the new process has started forking.

Link: https://github.com/ValveSoftware/Proton/issues/3316
CW-Bug-Id: #18946
Signed-off-by: Marc-Aurel Zent <marc_aurel@me.com>
---
dlls/ntdll/unix/loader.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 16c044d502e..8945d49ee35 100644
index fac93f815fd..c46f109af71 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -731,9 +731,40 @@ NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_i
@@ -729,11 +729,42 @@ NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_i
WORD machine = pe_info->machine;
ULONGLONG res_start = pe_info->base;
ULONGLONG res_end = pe_info->base + pe_info->map_size;
char preloader_reserve[64], socket_env[64];
+ const char *ld_preload = getenv( "LD_PRELOAD" );
char preloader_reserve[64], socket_env[64];

if (pe_info->image_flags & IMAGE_FLAGS_WineFakeDll) res_start = res_end = 0;
if (pe_info->image_flags & IMAGE_FLAGS_ComPlusNativeReady) machine = native_machine;
+

+ /* HACK: Unset LD_PRELOAD before executing explorer.exe to disable buggy gameoverlayrenderer.so */
+ if (ld_preload && argv[2] && !strcmp( argv[2], "C:\\windows\\system32\\explorer.exe" ) &&
+ argv[3] && !strcmp( argv[3], "/desktop" ))
Expand Down Expand Up @@ -60,9 +60,9 @@ index 16c044d502e..8945d49ee35 100644
+
+ putenv( env );
+ }
+
signal( SIGPIPE, SIG_DFL );

sprintf( socket_env, "WINESERVERSOCKET=%u", socketfd );
--
2.39.2

GitLab

0 comments on commit e29cb52

Please sign in to comment.