Compare commits

..

8 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
a1bf11e38a Release v5.0-rc4 2020-01-04 10:38:31 +11:00
Alistair Leslie-Hughes
703c84ce70 Added comctl32-version_6 2020-01-03 18:23:08 +11:00
Alistair Leslie-Hughes
b79e576574 Updated winepulse-PulseAudio_Support patchset 2020-01-03 18:23:08 +11:00
Zebediah Figura
db1f94bae4 libs-Unicode_Collation: Patch dlls/kernelbase/collation.c too. 2019-12-31 19:18:22 -06:00
Alistair Leslie-Hughes
0f52b315d6 Disable ntoskrnl-safedisc-2 patchset
https://bugs.winehq.org/show_bug.cgi?id=48341
https://bugs.winehq.org/show_bug.cgi?id=48379
2019-12-31 09:09:18 +11:00
Paul Gofman
ce3fc5723d Added ntdll-User_shared_data_fields patchset 2019-12-30 14:31:01 +03:00
Paul Gofman
595f2f9860 Added ntdll-Syscall_Emulation patchset 2019-12-30 13:46:05 +03:00
Alistair Leslie-Hughes
c01051f313 Updated ntdll-ThreadHideFromDebugger patchset 2019-12-30 11:18:46 +11:00
12 changed files with 724 additions and 123 deletions

View File

@@ -0,0 +1,57 @@
From ad23e816eb724d81032306f8ac6d4faa96ccaf4a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 12 Nov 2019 18:13:20 +0800
Subject: [PATCH] comctl32: Bump version to 6.0.
An application that I have here checks comctl32.dll version information
and refuses to run, changing DLL version to 6.0 makes it run.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/comctl32.h | 2 +-
dlls/comctl32/comctl32.rc | 2 +-
include/commctrl.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
index 78e97983381..42b434a96d9 100644
--- a/dlls/comctl32/comctl32.h
+++ b/dlls/comctl32/comctl32.h
@@ -192,7 +192,7 @@ INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
-#define COMCTL32_VERSION_MINOR 81
+#define COMCTL32_VERSION_MINOR 0
/* Our internal stack structure of the window procedures to subclass */
typedef struct _SUBCLASSPROCS {
diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc
index c9aa1ba6253..be6e2425193 100644
--- a/dlls/comctl32/comctl32.rc
+++ b/dlls/comctl32/comctl32.rc
@@ -114,7 +114,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
#define WINE_FILENAME_STR "comctl32.dll"
#define WINE_FILEVERSION COMCTL32_VERSION, COMCTL32_VERSION_MINOR, 4704, 1100
-#define WINE_FILEVERSION_STR "5.81"
+#define WINE_FILEVERSION_STR "6.00.4704.1100"
#define WINE_PRODUCTVERSION WINE_FILEVERSION
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSION_STR
diff --git a/include/commctrl.h b/include/commctrl.h
index 700b335fbb7..029a4b45457 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -51,7 +51,7 @@ enum _LI_METRIC
HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
-#define COMCTL32_VERSION 5 /* dll version */
+#define COMCTL32_VERSION 6 /* dll version */
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
--
2.24.1

View File

@@ -1,18 +1,19 @@
From 374ad574cfb7f7cdfcb8534effa83efa02d59bb0 Mon Sep 17 00:00:00 2001
From b1b0fe600eb400b8a7ba8f03614ebb92b76b989a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dtimoshkov@codeweavers.com>
Date: Mon, 28 Jul 2003 07:39:25 -0500
Subject: [PATCH] libs: Fix most problems with CompareString.
---
dlls/kernel32/tests/locale.c | 9 +++----
libs/port/collation.c | 60 ++++++++++++++++++++++----------------------
2 files changed, 34 insertions(+), 35 deletions(-)
dlls/kernel32/tests/locale.c | 9 +++---
dlls/kernelbase/collation.c | 60 ++++++++++++++++++------------------
libs/port/collation.c | 60 ++++++++++++++++++------------------
3 files changed, 64 insertions(+), 65 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index cf781e5..bba3664 100644
index c8cc90479..2455cc58e 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1963,13 +1963,13 @@ static void test_CompareStringA(void)
@@ -1948,13 +1948,13 @@ static void test_CompareStringA(void)
todo_wine ok(ret != CSTR_EQUAL, "\\2 vs \\1 expected unequal\n");
ret = CompareStringA(lcid, NORM_IGNORECASE | LOCALE_USE_CP_ACP, "#", -1, ".", -1);
@@ -29,7 +30,7 @@ index cf781e5..bba3664 100644
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
@@ -6026,6 +6026,5 @@ START_TEST(locale)
@@ -6337,6 +6337,5 @@ START_TEST(locale)
test_SetThreadUILanguage();
test_NormalizeString();
test_SpecialCasing();
@@ -37,8 +38,138 @@ index cf781e5..bba3664 100644
- if (0) test_sorting();
+ test_sorting();
}
diff --git a/dlls/kernelbase/collation.c b/dlls/kernelbase/collation.c
index f56cf02c2..d4f15c396 100644
--- a/dlls/kernelbase/collation.c
+++ b/dlls/kernelbase/collation.c
@@ -77,34 +77,34 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x00000000, 0x02010111, 0x02020111, 0x02030111, 0x02040111, 0x02050111, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x02090111, 0x024b0111, 0x02700111, 0x02a90111, 0x09e00111, 0x02aa0111, 0x02a70111, 0x02690111,
- 0x027a0111, 0x027b0111, 0x02a20111, 0x039f0111, 0x022d0111, 0x02210111, 0x02550111, 0x02a40111,
- 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111,
- 0x0a130111, 0x0a140111, 0x02370111, 0x02350111, 0x03a30111, 0x03a40111, 0x03a50111, 0x024e0111,
- 0x02a10111, 0x0a150151, 0x0a290141, 0x0a3d0151, 0x0a490151, 0x0a650151, 0x0a910151, 0x0a990151,
+ 0x01290111, 0x020c0111, 0x020d0111, 0x020f0111, 0x02100111, 0x02140111, 0x02190111, 0x01200111,
+ 0x021b0111, 0x022d0111, 0x02350111, 0x02a70111, 0x02370111, 0x01210111, 0x024b0111, 0x024c0111,
+ 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0181, 0x0a100111, 0x0a110111, 0x0a120111,
+ 0x0a130111, 0x0a140111, 0x024e0111, 0x024f0111, 0x02a90111, 0x02aa0111, 0x030a0111, 0x02550111,
+ 0x025f0111, 0x0a150151, 0x0a290141, 0x0a3d0151, 0x0a490151, 0x0a650151, 0x0a910151, 0x0a990151,
0x0ab90151, 0x0ad30161, 0x0ae70141, 0x0af70141, 0x0b030161, 0x0b2b0151, 0x0b330151, 0x0b4b0161,
0x0b670141, 0x0b730141, 0x0b7f0141, 0x0ba70151, 0x0bbf0151, 0x0bd70141, 0x0bef0151, 0x0bfb0141,
- 0x0c030151, 0x0c070141, 0x0c130141, 0x027c0111, 0x02a60111, 0x027d0111, 0x020f0111, 0x021b0111,
- 0x020c0111, 0x0a150111, 0x0a290111, 0x0a3d0111, 0x0a490111, 0x0a650111, 0x0a910111, 0x0a990111,
+ 0x0c030151, 0x0c070141, 0x0c130141, 0x02700111, 0x02780111, 0x02790111, 0x027a0111, 0x027b0111,
+ 0x027c0111, 0x0a150111, 0x0a290111, 0x0a3d0111, 0x0a490111, 0x0a650111, 0x0a910111, 0x0a990111,
0x0ab90111, 0x0ad30111, 0x0ae70111, 0x0af70111, 0x0b030111, 0x0b2b0111, 0x0b330111, 0x0b4b0111,
0x0b670111, 0x0b730111, 0x0b7f0111, 0x0ba70111, 0x0bbf0111, 0x0bd70111, 0x0bef0111, 0x0bfb0111,
- 0x0c030111, 0x0c070111, 0x0c130111, 0x027e0111, 0x03a70111, 0x027f0111, 0x03aa0111, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02060111, 0x00000000, 0x00000000,
+ 0x0c030111, 0x0c070111, 0x0c130111, 0x027d0111, 0x027e0111, 0x027f0111, 0x029c0111, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x02090141, 0x024c0111, 0x09df0111, 0x09e10111, 0x09de0111, 0x09e20111, 0x03a80111, 0x029c0111,
- 0x02140111, 0x029f0111, 0x0a150181, 0x02780111, 0x03a60111, 0x02200111, 0x02a00111, 0x02100111,
- 0x030a0111, 0x03a00111, 0x0a0d0151, 0x0a0e0151, 0x020d0111, 0x0c9f0121, 0x029d0111, 0x025f0111,
- 0x02190111, 0x0a0c0151, 0x0b4b01a1, 0x02790111, 0x0a0c0171, 0x0a0c0171, 0x0a0e0171, 0x024f0111,
+ 0x01290121, 0x029d0111, 0x03a40111, 0x03a50111, 0x03a60111, 0x03a70111, 0x029f0111, 0x03a80111,
+ 0x02a00111, 0x03aa0111, 0x0a150181, 0x03a00111, 0x09de0111, 0x01220111, 0x09df0111, 0x02a10111,
+ 0x09e00111, 0x039f0111, 0x0a0d0151, 0x0a0e0151, 0x02a20111, 0x09e10111, 0x09e20111, 0x09ef0111,
+ 0x02a40111, 0x0a0c0151, 0x0b4b01a1, 0x03a10111, 0x0a0c0171, 0x0a0c0171, 0x0a0c0171, 0x02a60111,
0x0a150151, 0x0a150151, 0x0a150151, 0x0a150151, 0x0a150151, 0x0a150151, 0x0a190121, 0x0a3d0151,
0x0a650151, 0x0a650151, 0x0a650151, 0x0a650151, 0x0ad30161, 0x0ad30161, 0x0ad30161, 0x0ad30161,
0x0a5d0121, 0x0b330151, 0x0b4b0161, 0x0b4b0161, 0x0b4b0161, 0x0b4b0161, 0x0b4b0161, 0x03a20111,
- 0x0b530121, 0x0bd70141, 0x0bd70141, 0x0bd70141, 0x0bd70141, 0x0c070141, 0x0c3b0121, 0x0ba70131,
+ 0x0b530121, 0x0bd70141, 0x0bd70141, 0x0bd70141, 0x0bd70141, 0x0c070141, 0x0bd40121, 0x0ba70131,
0x0a150111, 0x0a150111, 0x0a150111, 0x0a150111, 0x0a150111, 0x0a150111, 0x0a190111, 0x0a3d0111,
0x0a650111, 0x0a650111, 0x0a650111, 0x0a650111, 0x0ad30111, 0x0ad30111, 0x0ad30111, 0x0ad30111,
- 0x0a5d0111, 0x0b330111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x03a10111,
- 0x0b530111, 0x0bd70111, 0x0bd70111, 0x0bd70111, 0x0bd70111, 0x0c070111, 0x0c3b0111, 0x0c070111,
+ 0x0a5d0111, 0x0b330111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x03a30111,
+ 0x0b530111, 0x0bd70111, 0x0bd70111, 0x0bd70111, 0x0bd70111, 0x0c070111, 0x0bd40111, 0x0c070111,
/* 0x0100 .. 0x01ff */
0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a3d0151, 0x0a3d0111,
0x0a3d0151, 0x0a3d0111, 0x0a3d0151, 0x0a3d0111, 0x0a3d0151, 0x0a3d0111, 0x0a490151, 0x0a490111,
@@ -191,7 +191,7 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x020d0111, 0x02140111, 0x0c910121, 0x025f0111,
0x0c950131, 0x0c990121, 0x0c9b0121, 0xffffffff, 0x0ca20121, 0xffffffff, 0x0ca80121, 0x0cac0121,
0x0c9b0111, 0x0c910121, 0x0c920131, 0x0c930121, 0x0c940121, 0x0c950131, 0x0c980121, 0x0c990121,
- 0x0c9a0131, 0x0c9b0121, 0x0c9d0131, 0x0c9e0121, 0x0c9f0131, 0x0ca00121, 0x0ca10121, 0x0ca20121,
+ 0x0c9a0131, 0x0c9b0121, 0x0c9d0131, 0x0c9e0121, 0x0c9f0121, 0x0ca00121, 0x0ca10121, 0x0ca20121,
0x0ca30131, 0x0ca50131, 0xffffffff, 0x0ca60131, 0x0ca70121, 0x0ca80121, 0x0ca90131, 0x0caa0121,
0x0cab0121, 0x0cac0121, 0x0c9b0121, 0x0ca80121, 0x0c910111, 0x0c950111, 0x0c990111, 0x0c9b0111,
0x0ca80111, 0x0c910111, 0x0c920111, 0x0c930111, 0x0c940111, 0x0c950111, 0x0c980111, 0x0c990111,
@@ -931,12 +931,12 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0xffffffff, 0xffffffff, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0xffffffff, 0x0cac0111, 0x0cac0111,
0x0ca20121, 0x0ca20121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x020d0111, 0x02180111, 0xffffffff,
/* 0x2000 .. 0x20ff */
- 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090141,
- 0x02090131, 0x02090131, 0x02090131, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x02090121, 0x02090121, 0x02090121, 0x02090121, 0x02090121, 0x02090121, 0x02090121, 0x02090131,
+ 0x02090121, 0x02090121, 0x02090121, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x02250111, 0x02250121, 0x02260111, 0x02270111, 0x02280111, 0x02290111, 0x03a90111, 0x021c0111,
0x026a0111, 0x026b0111, 0x026c0111, 0x026d0111, 0x02710111, 0x02720111, 0x02730111, 0x02740111,
0x02ae0111, 0x02af0111, 0x02b00111, 0x02b10111, 0x02550131, 0x02550131, 0x02550131, 0x02b20111,
- 0x02070111, 0x02080111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02090141,
+ 0x02070111, 0x02080111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02090131,
0x02ac0111, 0x02ad0111, 0x02b60111, 0x02b60121, 0x02b60121, 0x02b70111, 0x02b70121, 0x02b70121,
0x02b90111, 0x026e0111, 0x026f0111, 0x02ba0111, 0x024b0131, 0x02540111, 0x02110111, 0x02bb0111,
0x02bc0111, 0x02bd0111, 0x02be0111, 0x02b30111, 0x02a50111, 0x02860111, 0x02870111, 0xffffffff,
@@ -1294,7 +1294,7 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x09a90111, 0x09aa0111, 0x09ab0111, 0x09ac0111, 0x09ad0111, 0x09ae0111, 0x09af0111, 0x09b00111,
0x09b10111, 0x09b20111, 0x09b30111, 0x09b40111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
/* 0x3000 .. 0x30ff */
- 0x02090121, 0x02340111, 0x025e0111, 0x02b80111, 0x09b50111, 0x09d70111, 0x192c0111, 0x0a0b0111,
+ 0x02090111, 0x02340111, 0x025e0111, 0x02b80111, 0x09b50111, 0x09d70111, 0x192c0111, 0x0a0b0111,
0x02880111, 0x02890111, 0x028a0111, 0x028b0111, 0x028c0111, 0x028d0111, 0x028e0111, 0x028f0111,
0x02900111, 0x02910111, 0x09b60111, 0x09b70111, 0x02920111, 0x02930111, 0x02940111, 0x02950111,
0x02960111, 0x02970111, 0x02980111, 0x02990111, 0x022a0111, 0x02750111, 0x02760111, 0x02770111,
@@ -1409,14 +1409,14 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131,
0x0a0d0131, 0x0ab901a1, 0x0a490191, 0x0a1501a1, 0x0a290181, 0x0b4b01b1, 0x0b670181, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffffff, 0xfb400151, 0xfb400151, 0xfb400151, 0xfb400151, 0xfb400151,
- 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0af70171, 0x0af70181, 0x0b2b01b1, 0x0a990181,
- 0x0a3d01a1, 0x0af70171, 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0c9f0141, 0x0b2b01a1, 0x0af70171,
- 0x0ab901b1, 0x0af70171, 0x0b2b01b1, 0x0a990181, 0x0bbf01a1, 0x0c9f0141, 0x0b2b01a1, 0x0a490191,
- 0x0af70171, 0x0a910191, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0a3d01a1, 0x0af70171, 0x0b2b01a1,
+ 0x0b670181, 0x0b3301b1, 0x0c9f0131, 0x0b2b01a1, 0x0af70171, 0x0af70181, 0x0b2b01b1, 0x0a990181,
+ 0x0a3d01a1, 0x0af70171, 0x0b670181, 0x0b3301b1, 0x0c9f0131, 0x0c9f0131, 0x0b2b01a1, 0x0af70171,
+ 0x0ab901b1, 0x0af70171, 0x0b2b01b1, 0x0a990181, 0x0bbf01a1, 0x0c9f0131, 0x0b2b01a1, 0x0a490191,
+ 0x0af70171, 0x0a910191, 0x0b3301b1, 0x0c9f0131, 0x0b2b01a1, 0x0a3d01a1, 0x0af70171, 0x0b2b01a1,
0x0a3d01a1, 0x0b2b01a1, 0x0af70171, 0x0b2b01a1, 0x0a3d01a1, 0x0b2b01a1, 0x0af70171, 0x0b2b01a1,
0x0b2b01a1, 0x0b670191, 0x0af70171, 0x0b2b01b1, 0x0a990181, 0x0b7f01a1, 0x0b7f01a1, 0x0b7f01a1,
- 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1,
- 0x0af70171, 0x0b2b01b1, 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0af70171, 0x0b2b01b1,
+ 0x0b670181, 0x0b3301b1, 0x0c9f0131, 0x0b2b01a1, 0x0b670181, 0x0b3301b1, 0x0c9f0131, 0x0b2b01a1,
+ 0x0af70171, 0x0b2b01b1, 0x0b670181, 0x0b3301b1, 0x0c9f0131, 0x0b2b01a1, 0x0af70171, 0x0b2b01b1,
0x0af70171, 0x0b2b01b1, 0x0a150191, 0x0a290191, 0x0a3d01a1, 0x0a3d01a1, 0x0a3d01b1, 0x0a3d01b1,
0x0a490191, 0x0a990181, 0x0ab901a1, 0x0ab901b1, 0x0ad301b1, 0x0af70181, 0x0af70181, 0x0af70171,
0x0b0301c1, 0x0b0301c1, 0x0b0301c1, 0x0b0301c1, 0x0b2b01a1, 0x0b2b01a1, 0x0b2b01a1, 0x0b670191,
@@ -1603,7 +1603,7 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0xffffffff, 0x02110121, 0x02110121, 0x02110121, 0x02110121, 0x021b0131, 0x021b0131, 0x021b0131,
0x022d0131, 0x02340121, 0x02550141, 0xffffffff, 0x02350131, 0x02370131, 0x024e0141, 0x024b0141,
0x02280121, 0x027a0141, 0x027b0131, 0x027e0131, 0x027f0131, 0x02920121, 0x02930121, 0x02a90131,
- 0x02a70131, 0x02a20131, 0x039f0141, 0x02210131, 0x03a30131, 0x03a50131, 0x03a40131, 0xffffffff,
+ 0x02a70131, 0x02a20131, 0x039f0141, 0x02210121, 0x03a30131, 0x03a50131, 0x03a40131, 0xffffffff,
0x02a60131, 0x09e00131, 0x02aa0131, 0x02a10131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0x00006831, 0x00006821, 0x00006921, 0xffffffff, 0x00006a21, 0xffffffff, 0x00006b31, 0x00006b21,
0x00006c31, 0x00006c21, 0x00006d31, 0x00006d21, 0x00006e31, 0x00006e21, 0x00006f31, 0x00006f21,
@@ -1624,8 +1624,8 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x0f480141, 0x0f490161, 0x0f490151, 0x0f490131, 0x0f490141, 0x0f2d0151, 0x0f2d0141, 0x0f2d0151,
0x0f2d0141, 0x0f2d0151, 0x0f2d0141, 0x0f2d0151, 0x0f2d0141, 0xffffffff, 0xffffffff, 0x00000000,
/* 0xff00 .. 0xffff */
- 0xffffffff, 0x024b0121, 0x02700121, 0x02a90121, 0x09e00121, 0x02aa0121, 0x02a70121, 0x02690121,
- 0x027a0121, 0x027b0121, 0x02a20121, 0x039f0121, 0x022d0121, 0x02210121, 0x02550121, 0x02a40121,
+ 0xffffffff, 0x024b0121, 0x02700121, 0x02a90121, 0x09e00121, 0x02aa0121, 0x02a70121, 0x02690111,
+ 0x027a0121, 0x027b0121, 0x02a20121, 0x039f0121, 0x022d0121, 0x02210111, 0x02550121, 0x02a40121,
0x0a0b0121, 0x0a0c0121, 0x0a0d0121, 0x0a0e0121, 0x0a0f0121, 0x0a100121, 0x0a110121, 0x0a120121,
0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121,
0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161,
diff --git a/libs/port/collation.c b/libs/port/collation.c
index 2d990d8..290fa98 100644
index f56cf02c2..d4f15c396 100644
--- a/libs/port/collation.c
+++ b/libs/port/collation.c
@@ -77,34 +77,34 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
@@ -168,5 +299,5 @@ index 2d990d8..290fa98 100644
0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121,
0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161,
--
1.9.1
2.24.0

View File

@@ -0,0 +1,189 @@
From 608b46ac43e9b4de89282850ac8e4010e1df0af1 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 30 Dec 2019 13:27:53 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
The patch assigns the range of syscall numbers which does not
overlap with native syscalls and assumes these numbers are
used in the applications (i. e., that the applications
get the number from syscall thunks). Linux specific Seccomp
is used for trapping syscalls.
---
configure.ac | 1 +
dlls/ntdll/signal_x86_64.c | 85 ++++++++++++++++++++++++++++++++++++++
tools/winebuild/spec32.c | 9 +++-
3 files changed, 93 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index c437da7db4..98cdf1ec84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,6 +483,7 @@ AC_CHECK_HEADERS(\
linux/joystick.h \
linux/major.h \
linux/param.h \
+ linux/seccomp.h \
linux/serial.h \
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 6cde57a0c5..ff11b7fa8d 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -59,6 +59,13 @@
# include <mach/mach.h>
#endif
+#if defined(HAVE_LINUX_FILTER_H) && defined(HAVE_LINUX_SECCOMP_H) && defined(HAVE_SYS_PRCTL_H)
+#define HAVE_SECCOMP 1
+# include <linux/filter.h>
+# include <linux/seccomp.h>
+# include <sys/prctl.h>
+#endif
+
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
@@ -3097,6 +3104,38 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext )
restore_context( &context, ucontext );
}
+extern unsigned int __wine_nb_syscalls;
+
+#ifdef HAVE_SECCOMP
+static void sigsys_handler( int signal, siginfo_t *siginfo, void *sigcontext )
+{
+ unsigned int thunk_ret_offset;
+ ucontext_t *ctx = sigcontext;
+ unsigned int syscall_nr;
+ void ***rsp;
+
+ WARN("SIGSYS, rax %#llx.\n", ctx->uc_mcontext.gregs[REG_RAX]);
+
+ syscall_nr = ctx->uc_mcontext.gregs[REG_RAX] - 0xf000;
+ if (syscall_nr >= __wine_nb_syscalls)
+ {
+ ERR("Syscall %u is undefined.\n", syscall_nr);
+ return;
+ }
+
+ rsp = (void ***)&ctx->uc_mcontext.gregs[REG_RSP];
+ *rsp -= 1;
+
+#ifdef __APPLE__
+ thunk_ret_offset = 0xb;
+#else
+ thunk_ret_offset = 0xc;
+#endif
+
+ **rsp = (void *)(ctx->uc_mcontext.gregs[REG_RIP] + thunk_ret_offset);
+ ctx->uc_mcontext.gregs[REG_RIP] = (ULONG64)__wine_syscall_dispatcher;
+}
+#endif
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
@@ -3267,6 +3306,49 @@ void signal_init_thread( TEB *teb )
#endif
}
+static void install_bpf(struct sigaction *sig_act)
+{
+#ifdef HAVE_SECCOMP
+ static struct sock_filter filter[] =
+ {
+ BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
+ (offsetof(struct seccomp_data, nr))),
+ BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0xf000, 0, 1),
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_TRAP),
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
+ };
+ struct sock_fprog prog;
+
+ memset(&prog, 0, sizeof(prog));
+ prog.len = ARRAY_SIZE(filter);
+ prog.filter = filter;
+
+ if (prctl(PR_GET_SECCOMP, 0, NULL, 0, 0) != 2)
+ {
+ if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0))
+ {
+ perror("prctl(PR_SET_NO_NEW_PRIVS, ...)");
+ exit(1);
+ }
+
+ if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0))
+ {
+ perror("prctl(PR_SET_SECCOMP, ...)");
+ exit(1);
+ }
+ }
+ else
+ {
+ TRACE("Seccomp filters already installed.\n");
+ }
+
+ sig_act->sa_sigaction = sigsys_handler;
+ sigaction(SIGSYS, sig_act, NULL);
+#else
+ WARN("Built without seccomp.\n");
+#endif
+}
+
/**********************************************************************
* signal_init_process
*/
@@ -3299,6 +3381,9 @@ void signal_init_process(void)
sig_act.sa_sigaction = trap_handler;
if (sigaction( SIGTRAP, &sig_act, NULL ) == -1) goto error;
#endif
+
+ install_bpf(&sig_act);
+
return;
error:
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 05f5be6e48..4454f56c0b 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -531,7 +531,7 @@ static void output_syscall_thunks_x64( DLLSPEC *spec )
output_cfi( ".cfi_startproc" );
output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* mov r10, rcx */
output( "\t.byte 0xb8\n" ); /* mov eax, SYSCALL */
- output( "\t.long %d\n", i );
+ output( "\t.long %d\n", i + 0xf000 );
output( "\t.byte 0xf6,0x04,0x25,0x08,0x03,0xfe,0x7f,0x01\n" ); /* test byte ptr [0x7ffe0308], 1 */
output( "\t.byte 0x75,0x03\n" ); /* jne (over syscall) */
output( "\t.byte 0x0f,0x05\n" ); /* syscall */
@@ -576,6 +576,9 @@ static void output_syscall_thunks_x64( DLLSPEC *spec )
output( "\t.byte %d\n", max(get_args_size(odp), 32) - 32 );
}
+ output( "%s\n", asm_globl("__wine_nb_syscalls") );
+ output( "\t.long %u\n", spec->nb_syscalls );
+
output( "\n/* syscall dispatcher */\n\n" );
output( "\t.text\n" );
output( "\t.align %d\n", get_alignment(16) );
@@ -601,6 +604,8 @@ static void output_syscall_thunks_x64( DLLSPEC *spec )
else
output( "\tsubq $0xc,0x8(%%rbp)\n" );
+ output( "\tsub $0xf000,%%rax\n" );
+
/* copy over any arguments on the stack */
output( "\tleaq 0x38(%%rbp),%%rsi\n" );
if (UsePIC)
@@ -1233,7 +1238,7 @@ static void create_stub_exports_text_x64( DLLSPEC *spec )
align_output_rva( 16, 16 );
put_label( odp->link_name );
put_byte( 0x4c ); put_byte( 0x8b ); put_byte( 0xd1 ); /* mov r10, rcx */
- put_byte( 0xb8 ); put_dword( i ); /* mov eax, SYSCALL */
+ put_byte( 0xb8 ); put_dword( i + 0xf000 ); /* mov eax, SYSCALL */
put_byte( 0xf6 ); put_byte( 0x04 ); put_byte( 0x25 ); /* test byte ptr [0x7ffe0308], 1 */
put_byte( 0x08 ); put_byte( 0x03 ); put_byte( 0xfe );
put_byte( 0x7f ); put_byte( 0x01 );
--
2.24.1

View File

@@ -0,0 +1,2 @@
Fixes: [48291] Detroit: Become Human crashes on launch
Depends: winebuild-Fake_Dlls

View File

@@ -16,7 +16,7 @@ index b913326f796..840b8ffd0b1 100644
}
return status;
+ case ThreadHideFromDebugger:
+ if (length != sizeof(char)) return STATUS_INFO_LENGTH_MISMATCH;
+ if (length != sizeof(BOOLEAN)) return STATUS_INFO_LENGTH_MISMATCH;
+ *(BOOLEAN *)data = TRUE;
+ if (ret_len) *ret_len = sizeof(BOOLEAN);
+ return STATUS_SUCCESS;

View File

@@ -0,0 +1,35 @@
From 43fa5b9a922859b4bf4698c2336de125ae9b5c94 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 30 Dec 2019 13:33:46 +0300
Subject: [PATCH] ntdll: Fill NumberOfPhysicalPages field in user shared data
area.
---
dlls/ntdll/loader.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index f2f86ea5a8..5db716089c 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4453,6 +4453,7 @@ void __wine_process_init(void)
RTL_USER_PROCESS_PARAMETERS *params;
ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
WINE_MODREF *wm, *wow64cpu_wm;
+ SYSTEM_BASIC_INFORMATION sbi;
NTSTATUS status;
ANSI_STRING func_name;
UNICODE_STRING nt_name;
@@ -4571,6 +4572,9 @@ void __wine_process_init(void)
elevate_process(); /* FIXME: the process exists with a wrong token for a short time */
}
+ virtual_get_system_info(&sbi);
+ user_shared_data->NumberOfPhysicalPages = sbi.MmNumberOfPhysicalPages;
+
/* the main exe needs to be the first in the load order list */
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
--
2.24.1

View File

@@ -0,0 +1,86 @@
From 741e66e7ed773dffc5c5b7f44439f7786adc6c3a Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 30 Dec 2019 13:36:12 +0300
Subject: [PATCH] ntdll: Detect more processor features on Intel CPU.
---
dlls/ntdll/nt.c | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 524e39144b..d39e487842 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1172,6 +1172,7 @@ static inline BOOL have_sse_daz_mode(void)
static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
{
unsigned int regs[4], regs2[4];
+ BOOL amd_or_intel = FALSE;
#if defined(__i386__)
info->Architecture = PROCESSOR_ARCHITECTURE_INTEL;
@@ -1183,6 +1184,8 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info->FeatureSet = CPU_FEATURE_VME | CPU_FEATURE_X86 | CPU_FEATURE_PGE;
info->Level = 3;
+ user_shared_data->ProcessorFeatures[PF_RDWRFSGSBASE_AVAILABLE] = TRUE;
+
if (!have_cpuid()) return;
do_cpuid(0x00000000, regs); /* get standard cpuid level and vendor name */
@@ -1227,15 +1230,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info->Revision |= ((regs2[0] >> 4 ) & 0xf) << 8; /* model */
info->Revision |= regs2[0] & 0xf; /* stepping */
- do_cpuid(0x80000000, regs); /* get vendor cpuid level */
- if (regs[0] >= 0x80000001)
- {
- do_cpuid(0x80000001, regs2); /* get vendor features */
- user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 2) & 1;
- user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
- user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] >> 31) & 1;
- if (regs2[3] >> 31) info->FeatureSet |= CPU_FEATURE_3DNOW;
- }
+ amd_or_intel = TRUE;
}
else if (regs[1] == GENU && regs[3] == INEI && regs[2] == NTEL)
{
@@ -1250,12 +1245,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
if(regs2[3] & (1 << 21)) info->FeatureSet |= CPU_FEATURE_DS;
user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 5) & 1;
- do_cpuid(0x80000000, regs); /* get vendor cpuid level */
- if (regs[0] >= 0x80000001)
- {
- do_cpuid(0x80000001, regs2); /* get vendor features */
- user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
- }
+ amd_or_intel = TRUE;
}
else
{
@@ -1265,6 +1255,21 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info->Revision = ((regs2[0] >> 4 ) & 0xf) << 8; /* model */
info->Revision |= regs2[0] & 0xf; /* stepping */
}
+
+ if (amd_or_intel)
+ {
+ do_cpuid(0x80000000, regs); /* get vendor cpuid level */
+ if (regs[0] >= 0x80000001)
+ {
+ do_cpuid(0x80000001, regs2); /* get vendor features */
+ user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 2) & 1;
+ user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
+ user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] >> 31) & 1;
+ user_shared_data->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = (regs2[3] >> 27) & 1;
+ if (regs2[3] >> 31) info->FeatureSet |= CPU_FEATURE_3DNOW;
+ if ((regs2[3] >> 27) & 1) info->FeatureSet |= CPU_FEATURE_TSC;
+ }
+ }
}
}
--
2.24.1

View File

@@ -0,0 +1,4 @@
Fixes: [48386] Some CPU features are not reported for Intel CPU (Detroit: Become Human is affected)
Fixes: [48387] User shared data area should have NumberOfPhysicalPages field filled in (used by Detroit: Become Human)
Depends: wow64cpu-Wow64Transition

View File

@@ -1 +1,2 @@
Fixes: [30155] Improve support for SafeDisc v2.05.030
Disabled: True

View File

@@ -52,13 +52,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "fa97cbdf14883fb301dcc0a5264369f8ed184182"
echo "0747fd29d8f429a3421207b52eabe11cfcdf877d"
}
# Show version information
version()
{
echo "Wine Staging 5.0-rc3"
echo "Wine Staging 5.0-rc4"
echo "Copyright (C) 2014-2019 the Wine Staging project authors."
echo "Copyright (C) 2018-2019 Alistair Leslie-Hughes"
echo ""
@@ -97,6 +97,7 @@ patch_enable_all ()
enable_combase_GetRestrictedErrorInfo="$1"
enable_comctl32_Listview_DrawItem="$1"
enable_comctl32_alpha_bitmaps="$1"
enable_comctl32_version_6="$1"
enable_comctrl_rebar_capture="$1"
enable_comdlg32_lpstrFileTitle="$1"
enable_configure_Absolute_RPATH="$1"
@@ -217,6 +218,7 @@ patch_enable_all ()
enable_ntdll_Serial_Port_Detection="$1"
enable_ntdll_Signal_Handler="$1"
enable_ntdll_Status_Mapping="$1"
enable_ntdll_Syscall_Emulation="$1"
enable_ntdll_SystemExtendedProcessInformation="$1"
enable_ntdll_SystemInterruptInformation="$1"
enable_ntdll_SystemModuleInformation="$1"
@@ -225,6 +227,7 @@ patch_enable_all ()
enable_ntdll_ThreadTime="$1"
enable_ntdll_Threading="$1"
enable_ntdll_User_Shared_Data="$1"
enable_ntdll_User_shared_data_fields="$1"
enable_ntdll_WRITECOPY="$1"
enable_ntdll_Wait_User_APC="$1"
enable_ntdll_Zero_mod_name="$1"
@@ -233,7 +236,6 @@ patch_enable_all ()
enable_ntdll_set_full_cpu_context="$1"
enable_ntdll_x86_64_SegDs="$1"
enable_ntoskrnl_Stubs="$1"
enable_ntoskrnl_safedisc_2="$1"
enable_nvapi_Stub_DLL="$1"
enable_nvcuda_CUDA_Support="$1"
enable_nvcuvid_CUDA_Video_Support="$1"
@@ -424,6 +426,9 @@ patch_enable ()
comctl32-alpha-bitmaps)
enable_comctl32_alpha_bitmaps="$2"
;;
comctl32-version_6)
enable_comctl32_version_6="$2"
;;
comctrl-rebar-capture)
enable_comctrl_rebar_capture="$2"
;;
@@ -784,6 +789,9 @@ patch_enable ()
ntdll-Status_Mapping)
enable_ntdll_Status_Mapping="$2"
;;
ntdll-Syscall_Emulation)
enable_ntdll_Syscall_Emulation="$2"
;;
ntdll-SystemExtendedProcessInformation)
enable_ntdll_SystemExtendedProcessInformation="$2"
;;
@@ -808,6 +816,9 @@ patch_enable ()
ntdll-User_Shared_Data)
enable_ntdll_User_Shared_Data="$2"
;;
ntdll-User_shared_data_fields)
enable_ntdll_User_shared_data_fields="$2"
;;
ntdll-WRITECOPY)
enable_ntdll_WRITECOPY="$2"
;;
@@ -832,9 +843,6 @@ patch_enable ()
ntoskrnl-Stubs)
enable_ntoskrnl_Stubs="$2"
;;
ntoskrnl-safedisc-2)
enable_ntoskrnl_safedisc_2="$2"
;;
nvapi-Stub_DLL)
enable_nvapi_Stub_DLL="$2"
;;
@@ -1623,13 +1631,6 @@ if test "$enable_ws2_32_TransmitFile" -eq 1; then
enable_server_Desktop_Refcount=1
fi
if test "$enable_wow64cpu_Wow64Transition" -eq 1; then
if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
abort "Patchset advapi32-Token_Integrity_Level disabled, but wow64cpu-Wow64Transition depends on that."
fi
enable_advapi32_Token_Integrity_Level=1
fi
if test "$enable_winex11_WM_WINDOWPOSCHANGING" -eq 1; then
if test "$enable_winex11__NET_ACTIVE_WINDOW" -gt 1; then
abort "Patchset winex11-_NET_ACTIVE_WINDOW disabled, but winex11-WM_WINDOWPOSCHANGING depends on that."
@@ -1804,6 +1805,27 @@ if test "$enable_nvcuvid_CUDA_Video_Support" -eq 1; then
enable_nvapi_Stub_DLL=1
fi
if test "$enable_ntdll_User_shared_data_fields" -eq 1; then
if test "$enable_wow64cpu_Wow64Transition" -gt 1; then
abort "Patchset wow64cpu-Wow64Transition disabled, but ntdll-User_shared_data_fields depends on that."
fi
enable_wow64cpu_Wow64Transition=1
fi
if test "$enable_wow64cpu_Wow64Transition" -eq 1; then
if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
abort "Patchset advapi32-Token_Integrity_Level disabled, but wow64cpu-Wow64Transition depends on that."
fi
enable_advapi32_Token_Integrity_Level=1
fi
if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
if test "$enable_winebuild_Fake_Dlls" -gt 1; then
abort "Patchset winebuild-Fake_Dlls disabled, but ntdll-Syscall_Emulation depends on that."
fi
enable_winebuild_Fake_Dlls=1
fi
if test "$enable_ntdll_Signal_Handler" -eq 1; then
if test "$enable_ntdll_WRITECOPY" -gt 1; then
abort "Patchset ntdll-WRITECOPY disabled, but ntdll-Signal_Handler depends on that."
@@ -2398,6 +2420,18 @@ if test "$enable_comctl32_alpha_bitmaps" -eq 1; then
) >> "$patchlist"
fi
# Patchset comctl32-version_6
# |
# | Modified files:
# | * dlls/comctl32/comctl32.h, dlls/comctl32/comctl32.rc, include/commctrl.h
# |
if test "$enable_comctl32_version_6" -eq 1; then
patch_apply comctl32-version_6/0001-comctl32-Bump-version-to-6.0.patch
(
printf '%s\n' '+ { "Dmitry Timoshkov", "comctl32: Bump version to 6.0.", 1 },';
) >> "$patchlist"
fi
# Patchset comctrl-rebar-capture
# |
# | This patchset fixes the following Wine bugs:
@@ -4489,7 +4523,7 @@ fi
# | * [#32490] Graphical issues in Inquisitor
# |
# | Modified files:
# | * dlls/kernel32/tests/locale.c, libs/port/collation.c
# | * dlls/kernel32/tests/locale.c, dlls/kernelbase/collation.c, libs/port/collation.c
# |
if test "$enable_libs_Unicode_Collation" -eq 1; then
patch_apply libs-Unicode_Collation/0001-libs-Fix-most-problems-with-CompareString.patch
@@ -5195,6 +5229,25 @@ if test "$enable_ntdll_Status_Mapping" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-Syscall_Emulation
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports,
# | ntdll-User_Shared_Data, winebuild-Fake_Dlls
# |
# | This patchset fixes the following Wine bugs:
# | * [#48291] Detroit: Become Human crashes on launch
# |
# | Modified files:
# | * configure.ac, dlls/ntdll/signal_x86_64.c, tools/winebuild/spec32.c
# |
if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
patch_apply ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
(
printf '%s\n' '+ { "Paul Gofman", "ntdll: Support x86_64 syscall emulation.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-SystemExtendedProcessInformation
# |
# | This patchset fixes the following Wine bugs:
@@ -5263,6 +5316,48 @@ if test "$enable_ntdll_ThreadHideFromDebugger" -eq 1; then
) >> "$patchlist"
fi
# Patchset wow64cpu-Wow64Transition
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level
# |
# | This patchset fixes the following Wine bugs:
# | * [#45567] League of Legends 8.12+ fails to start a game (anticheat engine, validation of WoW64 syscall dispatcher)
# |
# | Modified files:
# | * configure, configure.ac, dlls/ntdll/loader.c, dlls/ntdll/ntdll.spec, dlls/wow64cpu/Makefile.in,
# | dlls/wow64cpu/wow64cpu.spec, dlls/wow64cpu/wow64cpu_main.c
# |
if test "$enable_wow64cpu_Wow64Transition" -eq 1; then
patch_apply wow64cpu-Wow64Transition/0001-wow64cpu-Add-stub-dll.patch
patch_apply wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch
(
printf '%s\n' '+ { "Zebediah Figura", "wow64cpu: Add stub dll.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "ntdll: Add a stub implementation of Wow64Transition.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-User_shared_data_fields
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, wow64cpu-Wow64Transition
# |
# | This patchset fixes the following Wine bugs:
# | * [#48386] Some CPU features are not reported for Intel CPU (Detroit: Become Human is affected)
# | * [#48387] User shared data area should have NumberOfPhysicalPages field filled in (used by Detroit: Become Human)
# |
# | Modified files:
# | * dlls/ntdll/loader.c, dlls/ntdll/nt.c
# |
if test "$enable_ntdll_User_shared_data_fields" -eq 1; then
patch_apply ntdll-User_shared_data_fields/0001-ntdll-Fill-NumberOfPhysicalPages-field-in-user-share.patch
patch_apply ntdll-User_shared_data_fields/0002-ntdll-Detect-more-processor-features-on-Intel-CPU.patch
(
printf '%s\n' '+ { "Paul Gofman", "ntdll: Fill NumberOfPhysicalPages field in user shared data area.", 1 },';
printf '%s\n' '+ { "Paul Gofman", "ntdll: Detect more processor features on Intel CPU.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Zero_mod_name
# |
# | Modified files:
@@ -5348,25 +5443,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntoskrnl-safedisc-2
# |
# | This patchset fixes the following Wine bugs:
# | * [#30155] Improve support for SafeDisc v2.05.030
# |
# | Modified files:
# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/tests/ntoskrnl.c, server/device.c
# |
if test "$enable_ntoskrnl_safedisc_2" -eq 1; then
patch_apply ntoskrnl-safedisc-2/0001-ntoskrnl.exe-Return-driver-dispatch-result-to-caller.patch
patch_apply ntoskrnl-safedisc-2/0002-ntoskrnl.exe-Always-copy-the-buffer-for-non-METHOD_B.patch
patch_apply ntoskrnl-safedisc-2/0003-server-Delay-completing-a-synchronous-IRP.patch
(
printf '%s\n' '+ { "Chip Davis", "ntoskrnl.exe: Return driver dispatch result to caller.", 1 },';
printf '%s\n' '+ { "Chip Davis", "ntoskrnl.exe: Always copy the buffer for non-METHOD_BUFFERED ioctls.", 1 },';
printf '%s\n' '+ { "Chip Davis", "server: Delay completing a synchronous IRP.", 1 },';
) >> "$patchlist"
fi
# Patchset nvcuvid-CUDA_Video_Support
# |
# | This patchset has the following (direct or indirect) dependencies:
@@ -7568,27 +7644,6 @@ if test "$enable_wintrust_WTHelperGetProvCertFromChain" -eq 1; then
) >> "$patchlist"
fi
# Patchset wow64cpu-Wow64Transition
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level
# |
# | This patchset fixes the following Wine bugs:
# | * [#45567] League of Legends 8.12+ fails to start a game (anticheat engine, validation of WoW64 syscall dispatcher)
# |
# | Modified files:
# | * configure, configure.ac, dlls/ntdll/loader.c, dlls/ntdll/ntdll.spec, dlls/wow64cpu/Makefile.in,
# | dlls/wow64cpu/wow64cpu.spec, dlls/wow64cpu/wow64cpu_main.c
# |
if test "$enable_wow64cpu_Wow64Transition" -eq 1; then
patch_apply wow64cpu-Wow64Transition/0001-wow64cpu-Add-stub-dll.patch
patch_apply wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch
(
printf '%s\n' '+ { "Zebediah Figura", "wow64cpu: Add stub dll.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "ntdll: Add a stub implementation of Wow64Transition.", 1 },';
) >> "$patchlist"
fi
# Patchset wpcap-Dynamic_Linking
# |
# | Modified files:

View File

@@ -1,14 +1,14 @@
From 019c6b0afd77f665c8a79a85f0154bb5342d2a43 Mon Sep 17 00:00:00 2001
From 27c55ba097430b8e245b2e0d2f2077580196ba0c Mon Sep 17 00:00:00 2001
From: Andrew Eikum <aeikum@codeweavers.com>
Date: Fri, 1 Jun 2018 14:43:01 -0500
Date: Fri, 3 Jan 2020 18:14:03 +1100
Subject: [PATCH] winepulse: Don't rely on pulseaudio callbacks for timing
---
dlls/winepulse.drv/mmdevdrv.c | 500 ++++++++++++++++------------------
1 file changed, 232 insertions(+), 268 deletions(-)
dlls/winepulse.drv/mmdevdrv.c | 521 +++++++++++++++-------------------
1 file changed, 236 insertions(+), 285 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index 64b65182d83..43cdcdbae4c 100644
index ef9fc34e405..7d6327d2fe8 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -172,13 +172,16 @@ struct ACImpl {
@@ -31,7 +31,47 @@ index 64b65182d83..43cdcdbae4c 100644
pa_stream *stream;
pa_sample_spec ss;
@@ -790,107 +793,69 @@ static void pulse_attr_update(pa_stream *s, void *user) {
@@ -704,18 +707,7 @@ static void silence_buffer(pa_sample_format_t format, BYTE *buffer, UINT32 bytes
memset(buffer, format == PA_SAMPLE_U8 ? 0x80 : 0, bytes);
}
-static void pulse_free_noop(void *buf)
-{
-}
-
-enum write_buffer_flags
-{
- WINEPULSE_WRITE_NOFREE = 0x01,
- WINEPULSE_WRITE_SILENT = 0x02
-};
-
-static int write_buffer(const ACImpl *This, BYTE *buffer, UINT32 bytes,
- enum write_buffer_flags flags)
+static int write_buffer(const ACImpl *This, BYTE *buffer, UINT32 bytes)
{
float vol[PA_CHANNELS_MAX];
BOOL adjust = FALSE;
@@ -723,7 +715,7 @@ static int write_buffer(const ACImpl *This, BYTE *buffer, UINT32 bytes,
BYTE *end;
if (!bytes) return 0;
- if (This->session->mute || (flags & WINEPULSE_WRITE_SILENT))
+ if (This->session->mute)
{
silence_buffer(This->ss.format, buffer, bytes);
goto write;
@@ -850,9 +842,7 @@ static int write_buffer(const ACImpl *This, BYTE *buffer, UINT32 bytes,
}
write:
- return pa_stream_write(This->stream, buffer, bytes,
- (flags & WINEPULSE_WRITE_NOFREE) ? pulse_free_noop : NULL,
- 0, PA_SEEK_RELATIVE);
+ return pa_stream_write(This->stream, buffer, bytes, NULL, 0, PA_SEEK_RELATIVE);
}
static void dump_attr(const pa_buffer_attr *attr) {
@@ -875,107 +865,69 @@ static void pulse_attr_update(pa_stream *s, void *user) {
dump_attr(attr);
}
@@ -80,14 +120,7 @@ index 64b65182d83..43cdcdbae4c 100644
- if(This->lcl_offs_bytes + bytes > This->bufsize_bytes){
- to_write = This->bufsize_bytes - This->lcl_offs_bytes;
- TRACE("writing small chunk of %u bytes\n", to_write);
+ if(This->just_underran){
+ /* prebuffer with silence if needed */
+ if(This->pa_held_bytes < bytes){
+ to_write = bytes - This->pa_held_bytes;
+ TRACE("prebuffering %u frames of silence\n",
+ (int)(to_write / pa_frame_size(&This->ss)));
+ buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, to_write);
write_buffer(This, buf, to_write, 0);
- write_buffer(This, buf, to_write, 0);
- This->held_bytes -= to_write;
- to_write = bytes - to_write;
- This->lcl_offs_bytes = 0;
@@ -110,6 +143,14 @@ index 64b65182d83..43cdcdbae4c 100644
- return;
-
- assert(oldpad > This->pad);
+ if(This->just_underran){
+ /* prebuffer with silence if needed */
+ if(This->pa_held_bytes < bytes){
+ to_write = bytes - This->pa_held_bytes;
+ TRACE("prebuffering %u frames of silence\n",
+ (int)(to_write / pa_frame_size(&This->ss)));
+ buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, to_write);
+ pa_stream_write(This->stream, buf, to_write, NULL, 0, PA_SEEK_RELATIVE);
+ HeapFree(GetProcessHeap(), 0, buf);
+ }
@@ -129,7 +170,7 @@ index 64b65182d83..43cdcdbae4c 100644
+ if(This->pa_offs_bytes + bytes > This->real_bufsize_bytes){
+ to_write = This->real_bufsize_bytes - This->pa_offs_bytes;
+ TRACE("writing small chunk of %u bytes\n", to_write);
+ pa_stream_write(This->stream, buf, to_write, NULL, 0, PA_SEEK_RELATIVE);
+ write_buffer(This, buf, to_write);
+ This->pa_held_bytes -= to_write;
+ to_write = bytes - to_write;
+ This->pa_offs_bytes = 0;
@@ -141,7 +182,7 @@ index 64b65182d83..43cdcdbae4c 100644
-{
- WARN("Underflow\n");
+ TRACE("writing main chunk of %u bytes\n", to_write);
+ pa_stream_write(This->stream, buf, to_write, NULL, 0, PA_SEEK_RELATIVE);
+ write_buffer(This, buf, to_write);
+ This->pa_offs_bytes += to_write;
+ This->pa_offs_bytes %= This->real_bufsize_bytes;
+ This->pa_held_bytes -= to_write;
@@ -180,7 +221,7 @@ index 64b65182d83..43cdcdbae4c 100644
if (!(p = (ACPacket*)list_head(&This->packet_free_head))) {
p = (ACPacket*)list_head(&This->packet_filled_head);
if (!p->discont) {
@@ -898,11 +863,8 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
@@ -983,11 +935,8 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
next->discont = 1;
} else
p = (ACPacket*)list_tail(&This->packet_filled_head);
@@ -193,7 +234,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
QueryPerformanceCounter(&stamp);
QueryPerformanceFrequency(&freq);
@@ -923,12 +885,14 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
@@ -1008,12 +957,14 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
This->peek_ofs += copy;
if(This->peek_len == This->peek_ofs)
This->peek_len = 0;
@@ -211,7 +252,7 @@ index 64b65182d83..43cdcdbae4c 100644
dst += copy;
rem -= copy;
@@ -940,7 +904,11 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
@@ -1025,7 +976,11 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
This->peek_buffer_len = src_len;
}
@@ -224,7 +265,7 @@ index 64b65182d83..43cdcdbae4c 100644
This->peek_len = src_len - copy;
This->peek_ofs = 0;
}
@@ -949,21 +917,18 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
@@ -1034,21 +989,18 @@ static void pulse_rd_loop(ACImpl *This, size_t bytes)
}
}
@@ -249,7 +290,7 @@ index 64b65182d83..43cdcdbae4c 100644
copy = rem;
if (copy > src_len)
@@ -982,23 +947,95 @@ static void pulse_rd_drop(ACImpl *This, size_t bytes)
@@ -1067,23 +1019,95 @@ static void pulse_rd_drop(ACImpl *This, size_t bytes)
}
}
@@ -339,13 +380,13 @@ index 64b65182d83..43cdcdbae4c 100644
+
+ if (This->event)
+ SetEvent(This->event);
+
+ TRACE("%p after update, adv usec: %d, held: %u, delay: %u\n",
+ This, (int)adv_usec,
+ (int)(This->held_bytes/ pa_frame_size(&This->ss)), delay);
- if (This->event)
- SetEvent(This->event);
+ TRACE("%p after update, adv usec: %d, held: %u, delay: %u\n",
+ This, (int)adv_usec,
+ (int)(This->held_bytes/ pa_frame_size(&This->ss)), delay);
+
+ pthread_mutex_unlock(&pulse_lock);
+ }
+
@@ -353,7 +394,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
@@ -1027,15 +1064,16 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
@@ -1112,15 +1136,16 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
/* PulseAudio will fill in correct values */
attr.minreq = attr.fragsize = period_bytes;
@@ -373,7 +414,7 @@ index 64b65182d83..43cdcdbae4c 100644
if (ret < 0) {
WARN("Returns %i\n", ret);
return AUDCLNT_E_ENDPOINT_CREATE_FAILED;
@@ -1046,11 +1084,9 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
@@ -1131,11 +1156,9 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
return AUDCLNT_E_ENDPOINT_CREATE_FAILED;
if (This->dataflow == eRender) {
@@ -386,7 +427,7 @@ index 64b65182d83..43cdcdbae4c 100644
return S_OK;
}
@@ -1185,6 +1221,11 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
@@ -1270,6 +1293,11 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
TRACE("(%p) Refcount now %u\n", This, ref);
if (!ref) {
if (This->stream) {
@@ -398,7 +439,7 @@ index 64b65182d83..43cdcdbae4c 100644
pthread_mutex_lock(&pulse_lock);
if (PA_STREAM_IS_GOOD(pa_stream_get_state(This->stream))) {
pa_stream_disconnect(This->stream);
@@ -1480,7 +1521,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
@@ -1565,7 +1593,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
{
ACImpl *This = impl_from_IAudioClient(iface);
HRESULT hr = S_OK;
@@ -407,17 +448,14 @@ index 64b65182d83..43cdcdbae4c 100644
TRACE("(%p)->(%x, %x, %s, %s, %p, %s)\n", This, mode, flags,
wine_dbgstr_longlong(duration), wine_dbgstr_longlong(period), fmt, debugstr_guid(sessionguid));
@@ -1525,38 +1566,19 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
@@ -1610,38 +1638,19 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
if (FAILED(hr))
goto exit;
- if (mode == AUDCLNT_SHAREMODE_SHARED) {
- REFERENCE_TIME def = pulse_def_period[This->dataflow == eCapture];
- REFERENCE_TIME min = pulse_min_period[This->dataflow == eCapture];
+ period = pulse_def_period[This->dataflow == eCapture];
+ if (duration < 3 * period)
+ duration = 3 * period;
-
- /* Switch to low latency mode if below 2 default periods,
- * which is 20 ms by default, this will increase the amount
- * of interrupts but allows very low latency. In dsound I
@@ -430,7 +468,10 @@ index 64b65182d83..43cdcdbae4c 100644
- period = def;
- if (duration < 2 * period)
- duration = 2 * period;
-
+ period = pulse_def_period[This->dataflow == eCapture];
+ if (duration < 3 * period)
+ duration = 3 * period;
- /* Uh oh, really low latency requested.. */
- if (duration <= 2 * period)
- period /= 2;
@@ -454,7 +495,7 @@ index 64b65182d83..43cdcdbae4c 100644
if (SUCCEEDED(hr)) {
UINT32 unalign;
const pa_buffer_attr *attr = pa_stream_get_buffer_attr(This->stream);
@@ -1564,39 +1586,34 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
@@ -1649,39 +1658,34 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
/* Update frames according to new size */
dump_attr(attr);
if (This->dataflow == eRender) {
@@ -507,7 +548,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
}
}
@@ -1661,12 +1678,12 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
@@ -1746,12 +1750,12 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
attr = pa_stream_get_buffer_attr(This->stream);
if (This->dataflow == eRender){
lat = attr->minreq / pa_frame_size(&This->ss);
@@ -521,7 +562,7 @@ index 64b65182d83..43cdcdbae4c 100644
pthread_mutex_unlock(&pulse_lock);
TRACE("Latency: %u ms\n", (DWORD)(*latency / 10000));
return S_OK;
@@ -1674,7 +1691,7 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
@@ -1759,7 +1763,7 @@ static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient *iface,
static void ACImpl_GetRenderPad(ACImpl *This, UINT32 *out)
{
@@ -530,7 +571,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
static void ACImpl_GetCapturePad(ACImpl *This, UINT32 *out)
@@ -1686,7 +1703,7 @@ static void ACImpl_GetCapturePad(ACImpl *This, UINT32 *out)
@@ -1771,7 +1775,7 @@ static void ACImpl_GetCapturePad(ACImpl *This, UINT32 *out)
list_remove(&packet->entry);
}
if (out)
@@ -539,7 +580,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient *iface,
@@ -1932,6 +1949,8 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
@@ -2017,6 +2021,8 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
return AUDCLNT_E_NOT_STOPPED;
}
@@ -548,7 +589,7 @@ index 64b65182d83..43cdcdbae4c 100644
if (pa_stream_is_corked(This->stream)) {
o = pa_stream_cork(This->stream, 0, pulse_op_cb, &success);
if (o) {
@@ -1946,8 +1965,10 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
@@ -2031,8 +2037,10 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
if (SUCCEEDED(hr)) {
This->started = TRUE;
@@ -561,7 +602,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
pthread_mutex_unlock(&pulse_lock);
return hr;
@@ -2019,7 +2040,7 @@ static HRESULT WINAPI AudioClient_Reset(IAudioClient *iface)
@@ -2104,7 +2112,7 @@ static HRESULT WINAPI AudioClient_Reset(IAudioClient *iface)
if (This->dataflow == eRender) {
/* If there is still data in the render buffer it needs to be removed from the server */
int success = 0;
@@ -570,7 +611,7 @@ index 64b65182d83..43cdcdbae4c 100644
pa_operation *o = pa_stream_flush(This->stream, pulse_op_cb, &success);
if (o) {
while(pa_operation_get_state(o) == PA_OPERATION_RUNNING)
@@ -2027,14 +2048,14 @@ static HRESULT WINAPI AudioClient_Reset(IAudioClient *iface)
@@ -2112,14 +2120,14 @@ static HRESULT WINAPI AudioClient_Reset(IAudioClient *iface)
pa_operation_unref(o);
}
}
@@ -590,7 +631,7 @@ index 64b65182d83..43cdcdbae4c 100644
if ((p = This->locked_ptr)) {
This->locked_ptr = NULL;
@@ -2200,10 +2221,9 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
@@ -2285,10 +2293,9 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
UINT32 frames, BYTE **data)
{
ACImpl *This = impl_from_IAudioRenderClient(iface);
@@ -603,7 +644,7 @@ index 64b65182d83..43cdcdbae4c 100644
TRACE("(%p)->(%u, %p)\n", This, frames, data);
@@ -2222,37 +2242,19 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
@@ -2307,37 +2314,19 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
return S_OK;
}
@@ -649,7 +690,7 @@ index 64b65182d83..43cdcdbae4c 100644
}
silence_buffer(This->ss.format, *data, bytes);
@@ -2264,12 +2266,13 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
@@ -2349,12 +2338,13 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
static void pulse_wrap_buffer(ACImpl *This, BYTE *buffer, UINT32 written_bytes)
{
@@ -666,7 +707,7 @@ index 64b65182d83..43cdcdbae4c 100644
memcpy(This->local_buffer, buffer + chunk_bytes,
written_bytes - chunk_bytes);
}
@@ -2280,88 +2283,42 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
@@ -2365,88 +2355,42 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
{
ACImpl *This = impl_from_IAudioRenderClient(iface);
UINT32 written_bytes = written_frames * pa_frame_size(&This->ss);
@@ -729,20 +770,20 @@ index 64b65182d83..43cdcdbae4c 100644
-
- }else{
- enum write_buffer_flags wr_flags = 0;
-
- if (flags & AUDCLNT_BUFFERFLAGS_SILENT) wr_flags |= WINEPULSE_WRITE_SILENT;
- if (!This->locked_ptr) wr_flags |= WINEPULSE_WRITE_NOFREE;
+ if(This->locked >= 0)
+ buffer = This->local_buffer + (This->lcl_offs_bytes + This->held_bytes) % This->real_bufsize_bytes;
+ else
+ buffer = This->tmp_buffer;
- write_buffer(This, This->locked_ptr ? This->locked_ptr : This->tmp_buffer, written_bytes, wr_flags);
- This->pad += written_bytes;
- }
- if (flags & AUDCLNT_BUFFERFLAGS_SILENT) wr_flags |= WINEPULSE_WRITE_SILENT;
- if (!This->locked_ptr) wr_flags |= WINEPULSE_WRITE_NOFREE;
+ if(flags & AUDCLNT_BUFFERFLAGS_SILENT)
+ silence_buffer(This->ss.format, buffer, written_bytes);
- write_buffer(This, This->locked_ptr ? This->locked_ptr : This->tmp_buffer, written_bytes, wr_flags);
- This->pad += written_bytes;
- }
-
- if (!pa_stream_is_corked(This->stream)) {
- int success;
- pa_operation *o;
@@ -771,7 +812,7 @@ index 64b65182d83..43cdcdbae4c 100644
return S_OK;
}
@@ -2433,13 +2390,13 @@ static HRESULT WINAPI AudioCaptureClient_GetBuffer(IAudioCaptureClient *iface,
@@ -2523,13 +2467,13 @@ static HRESULT WINAPI AudioCaptureClient_GetBuffer(IAudioCaptureClient *iface,
ACImpl_GetCapturePad(This, NULL);
if ((packet = This->locked_ptr)) {
@@ -787,7 +828,7 @@ index 64b65182d83..43cdcdbae4c 100644
else
*devpos = This->clock_written / pa_frame_size(&This->ss);
}
@@ -2473,11 +2430,11 @@ static HRESULT WINAPI AudioCaptureClient_ReleaseBuffer(
@@ -2563,11 +2507,11 @@ static HRESULT WINAPI AudioCaptureClient_ReleaseBuffer(
if (done) {
ACPacket *packet = This->locked_ptr;
This->locked_ptr = NULL;
@@ -802,7 +843,7 @@ index 64b65182d83..43cdcdbae4c 100644
list_add_tail(&This->packet_free_head, &packet->entry);
}
This->locked = 0;
@@ -2497,7 +2454,7 @@ static HRESULT WINAPI AudioCaptureClient_GetNextPacketSize(
@@ -2587,7 +2531,7 @@ static HRESULT WINAPI AudioCaptureClient_GetNextPacketSize(
pthread_mutex_lock(&pulse_lock);
ACImpl_GetCapturePad(This, NULL);
if (This->locked_ptr)
@@ -811,7 +852,7 @@ index 64b65182d83..43cdcdbae4c 100644
else
*frames = 0;
pthread_mutex_unlock(&pulse_lock);
@@ -2589,7 +2546,14 @@ static HRESULT WINAPI AudioClock_GetPosition(IAudioClock *iface, UINT64 *pos,
@@ -2679,7 +2623,14 @@ static HRESULT WINAPI AudioClock_GetPosition(IAudioClock *iface, UINT64 *pos,
return hr;
}
@@ -828,5 +869,5 @@ index 64b65182d83..43cdcdbae4c 100644
if (This->share == AUDCLNT_SHAREMODE_EXCLUSIVE)
*pos /= pa_frame_size(&This->ss);
--
2.20.1
2.24.1

View File

@@ -1 +1 @@
Wine Staging 5.0-rc3
Wine Staging 5.0-rc4