From: chaoskagami Date: Fri, 6 Nov 2015 11:09:05 +0000 (-0500) Subject: Add stuff? X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=3a39631cf744bb2558bd2db825d0196e43fc5e67;p=misc%2Fpatchrepo.git Add stuff? --- diff --git a/README.md b/README.md index cb19930..a7af2bf 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,8 @@ I make every effort to slap documentation at the head of every patch, so read it * nss/ * nss-3.20.1-tls_ecdhe_camellia_gcm.patch * Adds ECDHE-Camellia-GCM cipher suites to nss. +* wine/ + * wine-1.7.54-force-laa-exec.patch + * Environment var 'WINE_FORCE_LARGEADDR' can be set to force a binary to run as if the LAA flag is set. Useful for some games that need dll injection to fix otherwise. + * wine-1.7.54-mmap-higher-memory.patch + * Environment var 'WINE_HIGHER_USERSPACE_MMAP' can be set to do allocation mapping starting at a higher location. diff --git a/wine/wine-1.7.54-force-laa-exec.patch b/wine/wine-1.7.54-force-laa-exec.patch new file mode 100644 index 0000000..7dc3fed --- /dev/null +++ b/wine/wine-1.7.54-force-laa-exec.patch @@ -0,0 +1,19 @@ +This is based on a rather hacky patch. The only thing I did +was rename the env var to make it more...human readable. + +diff -ur a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c +--- a/dlls/ntdll/virtual.c 2015-10-30 09:20:44.000000000 -0400 ++++ b/dlls/ntdll/virtual.c 2015-11-02 19:28:50.920781965 -0500 +@@ -1844,8 +1844,11 @@ + void virtual_set_large_address_space(void) + { + IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ); ++ const char* force_laa_str = getenv("WINE_FORCE_LARGEADDR"); ++ int force_laa = (force_laa_str && *force_laa_str != '\0'); ++ if (force_laa) FIXME("large address aware flag forced, don't report bugs\n"); + +- if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return; ++ if (!force_laa && !(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return; + /* no large address space on win9x */ + if (NtCurrentTeb()->Peb->OSPlatformId != VER_PLATFORM_WIN32_NT) return; + diff --git a/wine/wine-1.7.54-mmap-higher-memory.patch b/wine/wine-1.7.54-mmap-higher-memory.patch new file mode 100644 index 0000000..d839754 --- /dev/null +++ b/wine/wine-1.7.54-mmap-higher-memory.patch @@ -0,0 +1,30 @@ +This is based on the patch found at + https://startux.de/gaming/9-wine/10-wine-patch-to-use-3gb-userspace + +However, it can be toggled via an environment variable named +WINE_HIGHER_USERSPACE_MMAP. + +Like some of wine-staging's settings, this has the potential to cause +odd behavior. Anything which relies on windows allocation semantics, to +be precise. It's probably a small subset of programs, but useful to +note. + +This works *very* well with Bethesda games. + +diff -ur a/libs/wine/mmap.c b/libs/wine/mmap.c +--- a/libs/wine/mmap.c 2015-10-30 09:20:44.000000000 -0400 ++++ b/libs/wine/mmap.c 2015-11-02 19:18:24.239794753 -0500 +@@ -350,6 +350,13 @@ + char * const stack_ptr = &stack; + char *user_space_limit = (char *)0x7ffe0000; + ++ char *env_high_str = getenv("WINE_HIGHER_USERSPACE_MMAP"); ++ ++ if (env_high_str != NULL && *env_high_str != '\0') { ++ user_space_limit = (char*)0xbffe0000; ++ fprintf(stderr, "fixme:libs:mmap Forced to run with higher user_space_limit, do not report bugs\n"); ++ } ++ + reserve_malloc_space( 8 * 1024 * 1024 ); + + if (!list_head( &reserved_areas )) diff --git a/wine/wine-1.7.54-opengl-hooking-allow.patch b/wine/wine-1.7.54-opengl-hooking-allow.patch new file mode 100644 index 0000000..ee26387 --- /dev/null +++ b/wine/wine-1.7.54-opengl-hooking-allow.patch @@ -0,0 +1,12 @@ +diff -ur a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c +--- a/dlls/winex11.drv/opengl.c 2015-10-30 09:20:44.000000000 -0400 ++++ b/dlls/winex11.drv/opengl.c 2015-11-03 00:57:59.585378979 -0500 +@@ -602,7 +602,7 @@ + REDIRECT( glGetString ); + #undef REDIRECT + +- pglXGetProcAddressARB = wine_dlsym(opengl_handle, "glXGetProcAddressARB", NULL, 0); ++ pglXGetProcAddressARB = wine_dlsym(RTLD_DEFAULT, "glXGetProcAddressARB", NULL, 0); + if (pglXGetProcAddressARB == NULL) { + ERR("Could not find glXGetProcAddressARB in libGL, disabling OpenGL.\n"); + goto failed;