Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marzent committed Jan 28, 2024
2 parents 106856d + 275f1ed commit 2b60c23
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index fac93f815fd..c46f109af71 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -729,11 +729,42 @@ NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_i
WORD machine = pe_info->machine;
@@ -731,9 +731,40 @@ NTSTATUS exec_wineloader( char **argv, int socketfd, const pe_image_info_t *pe_i
ULONGLONG res_start = pe_info->base;
ULONGLONG res_end = pe_info->base + pe_info->map_size;
+ const char *ld_preload = getenv( "LD_PRELOAD" );
char preloader_reserve[64], socket_env[64];
+ const char *ld_preload = getenv( "LD_PRELOAD" );

if (pe_info->image_flags & IMAGE_FLAGS_WineFakeDll) res_start = res_end = 0;
if (pe_info->wine_fakedll) 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,7 +59,7 @@ index fac93f815fd..c46f109af71 100644
+
+ putenv( env );
+ }
+
signal( SIGPIPE, SIG_DFL );

sprintf( socket_env, "WINESERVERSOCKET=%u", socketfd );
Expand Down

0 comments on commit 2b60c23

Please sign in to comment.