-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new hotfix: battlenet for fix Battle.Net segfaults (#1256)
* New hotfix patch: battlenet for Battle.Net launcher Signed-off-by: Kirill Artemev <artewar6767@gmail.com> * customization.cfg: Add option for battlenet_fix hotfix Signed-off-by: Kirill Artemev <artewar6767@gmail.com> * hotfixes: fix some moments Signed-off-by: Kirill Artemev <artewar6767@gmail.com> --------- Signed-off-by: Kirill Artemev <artewar6767@gmail.com>
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
25 changes: 25 additions & 0 deletions
25
wine-tkg-git/wine-tkg-patches/hotfixes/battlenet/battlenet.mypatch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 321e3228c6c28256bfb209efdc372b61f9c8535f Mon Sep 17 00:00:00 2001 | ||
From: Fabian Maurer <dark.shadow4@web.de> | ||
Date: Thu, 21 Dec 2023 20:09:23 +0100 | ||
Subject: [PATCH] kernelbase: Correct return value in VirtualProtect for | ||
PAGE_WRITECOPY | ||
|
||
--- | ||
dlls/kernelbase/memory.c | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c | ||
index 4f4bba9a13b..de42395b33b 100644 | ||
--- a/dlls/kernelbase/memory.c | ||
+++ b/dlls/kernelbase/memory.c | ||
@@ -481,7 +481,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH VirtualLock( void *addr, SIZE_T size ) | ||
*/ | ||
BOOL WINAPI DECLSPEC_HOTPATCH VirtualProtect( void *addr, SIZE_T size, DWORD new_prot, DWORD *old_prot ) | ||
{ | ||
- return VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot ); | ||
+ BOOL ret = VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot ); | ||
+ if (old_prot && *old_prot == PAGE_WRITECOPY) *old_prot = PAGE_READWRITE; | ||
+ return ret; | ||
} | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# Fix for battle.net launcher | ||
if [ "$_battlenet_fix" = "true" ] && ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor 65124f15acc5705eb159d5d920877f0ac4835d27 HEAD ); then | ||
_hotfixes+=("$_where"/wine-tkg-patches/hotfixes/battlenet/battlenet) | ||
warning "Hotfix: Fix for Battle.Net launcher" | ||
fi |
This file contains 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