Compare commits

...

98 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
8f579c4eed Release v7.0-rc2 2021-12-18 18:59:04 +11:00
Alistair Leslie-Hughes
278310cf80 Rebase against 2f5f8b4bd4cb5771223d1ee96a55002d18ad01eb. 2021-12-18 18:45:43 +11:00
Alistair Leslie-Hughes
544f90dacc Release v7.0-rc1 2021-12-11 19:10:05 +11:00
Alistair Leslie-Hughes
9937bf0463 Rebase against 533616d23f9832596e41f839356830c7679df930. 2021-12-11 17:41:22 +11:00
Alistair Leslie-Hughes
155e98e765 Rebase against f69d4a865f926aa5c4a9c55cfe4d2dbc10746e5c. 2021-12-10 11:34:32 +11:00
Alistair Leslie-Hughes
2653c32b45 Rebase against b495ff5cc8088af66d6d4f186f82231043e45a95. 2021-12-09 09:49:58 +11:00
Alistair Leslie-Hughes
a2fcffc18e Rebase against 835dfaab023175028161974c5cd8585b77df101c. 2021-12-07 14:08:29 +11:00
Alistair Leslie-Hughes
82e4617d86 Release v6.23 2021-12-05 08:04:40 +11:00
Alistair Leslie-Hughes
24753f8756 Updated ntdll-Junction_Points patchset 2021-12-04 21:03:09 +11:00
Alistair Leslie-Hughes
0ed3e9c774 Rebase against 3f6102080e632b9f4d8a97c0f0b1231fbd8e759b. 2021-12-04 19:40:00 +11:00
Alistair Leslie-Hughes
61c3c024a2 Rebase against 27584c14497163dc2a15a9e8db9ddd40d3a516f8. 2021-12-03 11:06:11 +11:00
Alistair Leslie-Hughes
7f17af3a42 Rebase against 6282718c73bdf1648f18764c51671a57cef3c526. 2021-12-02 11:04:55 +11:00
Alistair Leslie-Hughes
4c51f4f5f6 Rebase against c0ea1ad37d3343c403d80ee18bf0d90c2699148b. 2021-12-01 10:27:42 +11:00
Alistair Leslie-Hughes
3b7c98ebf1 Another fix for macos builds 2021-11-30 20:35:23 +11:00
Alistair Leslie-Hughes
2056903cdf Fix ntdll-Serial_Port_Detection patchset 2021-11-30 12:33:31 +11:00
Alistair Leslie-Hughes
65ca056d29 Rebase against f374e9ccc8c9b9933520d006b879495bde4e7bb3. 2021-11-30 10:55:25 +11:00
Alistair Leslie-Hughes
edb3417124 Rebase against f03933fbb73152c7a54383fba411a611af7aaa55. 2021-11-27 17:36:06 +11:00
Alistair Leslie-Hughes
7655d14b6a Rebase against 67d0509f2f523935b0f4dbd3a713125252b37627. 2021-11-26 12:49:39 +11:00
Alistair Leslie-Hughes
61120ad0dd Rebase against 5e42498e634abda051aa59a3faeb2cf10469b1a6. 2021-11-25 10:17:52 +11:00
Alistair Leslie-Hughes
915b0a246f Rebase against 28c35689d2d9193cbf7ce5f523fecbaf377ae273. 2021-11-24 09:39:42 +11:00
Alistair Leslie-Hughes
68918863dc Rebase against b5b77ed6acad6a20bd4c5bfc98cfce178eef1d0c. 2021-11-23 11:32:46 +11:00
Alistair Leslie-Hughes
a703038b94 Release v6.22 2021-11-21 08:26:58 +11:00
Alistair Leslie-Hughes
643f96ec62 Rebase against 986254d6c17ee1e5fb3aed6effcf2766bf1e787e. 2021-11-21 08:00:35 +11:00
Zebediah Figura
d3d93cfa0d Rebase against 32fb017d4a22be38ca271bf387e466e958601355. 2021-11-18 18:07:35 -06:00
Alistair Leslie-Hughes
7e42d0ac1a Rebase against 161d61481f5d5ab8ee0b6237853af830e992afb1. 2021-11-18 11:20:26 +11:00
Alistair Leslie-Hughes
0ee2ac8499 Rebase against b65ef71fc0a7044557e0ba530e3b95497644867c. 2021-11-17 11:06:37 +11:00
Alistair Leslie-Hughes
a9aa06c58e Updated dinput-joy-mappings patchset 2021-11-13 19:00:48 +11:00
Alistair Leslie-Hughes
97b65c93c2 Rebase against be0684dad50ffbc93b3ded4fbfebf1d1e4690589. 2021-11-13 18:52:13 +11:00
Zebediah Figura
310f4c498b winex11-_NET_ACTIVE_WINDOW, winex11-WM_WINDOWPOSCHANGING: Rebase and re-enable. 2021-11-12 01:08:55 -06:00
Zebediah Figura
ad41ee0c01 winex11-CandidateWindowPos: Rebase and re-enable. 2021-11-12 01:08:36 -06:00
Zebediah Figura
45230b51db ntdll-NtAlertThreadByThreadId: Avoid spurious wakeups by performing the comparison inside of the futex queue spinlock.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50680
2021-11-12 00:25:58 -06:00
Alistair Leslie-Hughes
b090c12d6d Rebase against 3dbce69fd4cc8f4802479939d2cf50905b79f5a3. 2021-11-12 11:01:25 +11:00
Alistair Leslie-Hughes
55c5bac511 Rebase against 97d6cfd7059fbe55fdd24a04e8d9133848328d4e. 2021-11-11 09:08:04 +11:00
Zebediah Figura
c165d96d23 Rebase against 6a072b98c100f38a61fad00b6c96c86b3445efac. 2021-11-10 00:33:41 -06:00
Alistair Leslie-Hughes
63c3baa9e5 Release v6.21 2021-11-06 16:46:38 +11:00
Alistair Leslie-Hughes
980a476c49 Rebase against 20f1a677b664b3d0d3dc038ffb9ab4f4e4aa6274. 2021-11-06 16:17:10 +11:00
Alistair Leslie-Hughes
120e2d362f Added configure-dwarf4 patchset
This patchset is to allow general testing before it's being submitted upstream.
2021-11-05 07:57:56 +11:00
Alistair Leslie-Hughes
df26057ddf Added shell32-registry-lookup-app patchset 2021-11-04 21:06:02 +11:00
Alistair Leslie-Hughes
fa3a80f5af Re-enable ntdll-ForceBottomUpAlloc 2021-11-04 20:56:04 +11:00
Alistair Leslie-Hughes
00ab8180c0 Rebase against 46367d1ecc8a016ab7c7af9ec107e33c6d46fc26. 2021-11-04 15:04:50 +11:00
Alistair Leslie-Hughes
fe634350d2 Rebase against 0b79e2caa6f224fc0da672886c07f4f32dda4682. 2021-11-02 12:07:45 +11:00
Alistair Leslie-Hughes
b10ac7d8ac Rebase against 5f93c683ab0163cb34482fe18549cf249b8b074b. 2021-10-30 18:14:25 +11:00
Alistair Leslie-Hughes
56fd61a713 Updated user32-rawinput-mouse-experimental patchset 2021-10-29 21:37:16 +11:00
Alistair Leslie-Hughes
c9c7130f3c Updated user32-rawinput-mouse patchset 2021-10-28 19:37:27 +11:00
Zebediah Figura
5f113860f5 Rebase against 80a30625a70343cf6f38d80d02f640d684e27e6d. 2021-10-27 17:05:11 -05:00
Zebediah Figura
9a5667dba1 Rebase against e73bb07ff59d0d0b7925df3d642299689275b0a8. 2021-10-26 21:50:30 -05:00
Zebediah Figura
1295604add Rebase against ababea0fd7036ab13ec17d31afbd584c39f62696. 2021-10-26 00:04:29 -05:00
Alistair Leslie-Hughes
3fb6eb99a7 Release v6.20 2021-10-23 09:02:51 +11:00
Alistair Leslie-Hughes
2677a11f41 Rebase against faf645d01632e4cf7ef056a86a675a12df39a80e. 2021-10-23 09:00:13 +11:00
Alistair Leslie-Hughes
6fd31b354c Rebase against fdc2d415b0dd5c12c83156bd41161ff135d25105. 2021-10-22 11:53:53 +11:00
Zebediah Figura
4eaa5b69b8 ntdll-NtAlertThreadByThreadId: Make Win32 futexes fair.
Resident Evil 8 depends on this.
2021-10-20 22:25:15 -05:00
Alistair Leslie-Hughes
feb91195ff Rebase against f712a98d12d091c5437159a291857dfb9f0cea7c. 2021-10-21 09:41:51 +11:00
Alistair Leslie-Hughes
164b361be6 Rebase against 530c1839603bd3caa1b9d17fe458b5bd341ccfc9. 2021-10-19 10:42:04 +11:00
Zebediah Figura
6bc16f96f7 Rebase against 0925a730272ed0c97f64c3365ebe542401f60d7c. 2021-10-17 00:03:09 -05:00
Alistair Leslie-Hughes
688eeca0be Rebase against 6d307e2a647e71c21106feb0d62e371b3e55ab38. 2021-10-14 08:51:40 +11:00
Alistair Leslie-Hughes
1af920f698 Rebase against 50f889fd19d329bef7c001f9eafd1030fc1e3a56. 2021-10-13 09:41:59 +11:00
Alistair Leslie-Hughes
f3fd4a3903 Remove re-implemented dinput patchsets
The HID code for handling devices, make it possible to remove some
of the existing patchset.
2021-10-12 11:52:05 +11:00
Alistair Leslie-Hughes
56a387bf1d Restore change after rebase 2021-10-12 10:39:18 +11:00
Alistair Leslie-Hughes
c7f16e15e7 Rebase against dfeded6460ce067fe1c0540306c2964a170bed2a. 2021-10-12 09:22:48 +11:00
Zebediah Figura
5e9626af6c eventfd_synchronization: Include unistd.h in files using close(2).
Something on Linux pulls this in, but not on Mac.
2021-10-10 12:38:19 -05:00
Alistair Leslie-Hughes
d1ea5ced2b Release v6.19 2021-10-09 16:02:56 +11:00
Alistair Leslie-Hughes
8174243203 Reenabled mfplat patchset 2021-10-09 14:02:26 +11:00
Zebediah Figura
9e1a4bdb73 Rebase against 7554bd4b41a1429517eb86fd20dbe813cdd0550a. 2021-10-08 18:19:30 -05:00
Alistair Leslie-Hughes
dbf2d00a9b Restore iphlpapi-System_Ping
Changes upstream, means this need to be fixed another way.
2021-10-07 13:16:17 +11:00
Alistair Leslie-Hughes
c61d12592b Rebase against 3660176e09bc02e71586b4cf42f58c9498481af6. 2021-10-07 09:15:30 +11:00
Alistair Leslie-Hughes
7750a01cea Rebase against ed38d12833bb1957a915ac63128957dacf2bc245. 2021-10-06 09:30:42 +11:00
Alistair Leslie-Hughes
e41287e81a Rebase against 5a8dcb062793fbb68997e1b54ebc2666a2b2834d. 2021-10-05 08:55:24 +11:00
Alistair Leslie-Hughes
4d66e1bf6b Rebase against a87abdbe85779adf6a2a7897bd88984587880693. 2021-10-02 12:00:05 +10:00
Alistair Leslie-Hughes
c4535e89f7 Rebase against aa629c4c7225166f4ee46476d98702df2e142711. 2021-10-01 09:31:24 +10:00
Alistair Leslie-Hughes
7f9b324dea Rebase against 08b01d8271fe15c7680a957778d506221d7d94eb. 2021-09-30 10:41:59 +10:00
Alistair Leslie-Hughes
d8c1599a49 Rebase against bcdb28a563d43f2aebe28f457497bb36f59a50ea. 2021-09-29 09:12:17 +10:00
Alistair Leslie-Hughes
47a1fa55d6 Updated sapi-iteration-tokens patchset
Make the tests pass (GetId).
Stop new crash in "Beneath a Steel Sky".
2021-09-28 14:42:43 +10:00
Alistair Leslie-Hughes
0ff86943ed Rebase against de7adacedbdd78fd1ed8ee0986a78670e11a60bc. 2021-09-28 08:59:28 +10:00
Alistair Leslie-Hughes
f8851f16b0 Release v6.18 2021-09-25 12:45:22 +10:00
Alistair Leslie-Hughes
7ed2565d7e Disable ntdll-Heap_Improvements patchset
This patchset is causing causing an issue with upstream.
Currently disable for release.

https://bugs.winehq.org/show_bug.cgi?id=51777
2021-09-25 08:54:09 +10:00
Zebediah Figura
013f32ceeb Rebase against 2660cd9fcbb23897b041c43bcac1dc2a7aa3c01f. 2021-09-24 17:12:28 -05:00
Zebediah Figura
5f6802dae2 Rebase against 6b724c3dd8d1ae83e90d4e7e9ec191016fabc7d0. 2021-09-23 16:27:13 -05:00
Alistair Leslie-Hughes
8a2658a2ce Updated wininet-handle-403-error patchset 2021-09-23 10:40:09 +10:00
Alistair Leslie-Hughes
aae6c7b961 Rebase against 9f6e39e8b945466180080d470e1272ba4f807b3a. 2021-09-23 08:26:37 +10:00
Alistair Leslie-Hughes
100f108822 Added sapi-iteration-tokens patchset 2021-09-22 19:02:18 +10:00
Alistair Leslie-Hughes
640f5f7d0a Rebase against e482605548b124a7863f6b09395b3a850ae741cc. 2021-09-22 08:28:32 +10:00
Alistair Leslie-Hughes
a1db1dfc16 Rebase against 975d0632a19efd41338cb73a97f1b0bdbe7bc0cc. 2021-09-21 11:58:46 +10:00
Zebediah Figura
2771ab8cee ntdll-Zero_mod_name: Remove patch.
After examining the code several times I'm convinced that, according to the C
specification, it shouldn't have any effect.

That said, it's supposed to be for Cygwin, and bug 47812 describes a rather
insane thing that Cygwin does with the stack. If Cygwin is accessing overwritten
stack memory, then it seems reasonable that something like this patch set has an
effect.

Bug 47812 is fixed now, though, so let's remove this patch.
2021-09-19 21:29:06 -05:00
Alistair Leslie-Hughes
fc40539f6d Re-enable mfplat-streaming-support
We had reverted the current upstream winegreamer commits to allow
mfplat-streaming-support to be used within staging.  Hopefully the
patchset in question will be upstream shortly.
2021-09-19 13:13:18 +10:00
Zebediah Figura
fdcc8bec48 Rebase against 16e73be10d940c9c04101a47687a6f8a385c2b0f. 2021-09-17 17:45:25 -05:00
Alistair Leslie-Hughes
3a06c15dd2 Added sapi-ISpObjectToken-CreateInstance patchset 2021-09-17 14:17:46 +10:00
Alistair Leslie-Hughes
e7c298c616 Added wininet-handle-403-error patchset 2021-09-17 13:30:00 +10:00
Alistair Leslie-Hughes
7b01b9eb20 Added fltmgr.sys-FltBuildDefaultSecurityDescriptor patchset 2021-09-17 13:30:00 +10:00
Alistair Leslie-Hughes
afb9dcf2a5 Rebase against 8547aac2dcfcae9060d0a630c9f80af7bcaf19b4. 2021-09-17 12:40:50 +10:00
Alistair Leslie-Hughes
d918a0ca3f Rebase against f232252951fec637758f6b2c4eeda1c0e0650310. 2021-09-16 09:35:15 +10:00
Zebediah Figura
ad56d6b3d3 Rebase against b5e17b669a90d961a93f6092ebc3736ff8ca9cd6. 2021-09-14 21:44:56 -05:00
Alistair Leslie-Hughes
5f19a81589 Release v6.17 2021-09-11 08:54:34 +10:00
Alistair Leslie-Hughes
1033d3990b Rebase against a8583acae9548e6340d8400ec7710136cd061ab2. 2021-09-11 08:22:10 +10:00
Alistair Leslie-Hughes
a896148be0 Rebase against 0b7f8373e3593ca8e5261d4486f1d04092a15653. 2021-09-10 08:12:17 +10:00
Zebediah Figura
ef11bb63ce Rebase against 63737942a06183f6b2e7fa8f95a07c918c9bf29b. 2021-09-07 21:47:35 -05:00
Alistair Leslie-Hughes
f3b03ce5a1 Rebase against 8b9f1e12841298591387e2b7590191610a37986e. 2021-09-04 08:24:36 +10:00
Paul Gofman
4b48df5032 Updated wined3d-zero-inf-shaders patchset.
Fix by Matteo Bruni <mbruni@codeweavers.com>.
2021-08-31 22:57:55 +03:00
Zebediah Figura
24319dc308 Rebase against 21c4a25437969696cbf5ffecee191ba8302bb2dd. 2021-08-30 22:26:36 -05:00
223 changed files with 4102 additions and 10418 deletions

View File

@@ -1,4 +1,4 @@
From 7784b62bd2b64aabd6bfef9ef39ac4f3e8c55c77 Mon Sep 17 00:00:00 2001
From eb21fcc668da85977bc86b6105f3830cb26c93e6 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 8 Jun 2021 08:56:40 +1000
Subject: [PATCH] bcrypt: Stop compile error when HAVE_GNUTLS_CIPHER_INIT not
@@ -20,21 +20,21 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 37a80bdc062..64825f5b99b 100644
index d7b4499c692..11596d5f7ac 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -25,9 +25,10 @@
@@ -24,9 +24,10 @@
#include "config.h"
#include "wine/port.h"
+#include <stdarg.h>
+
#ifdef HAVE_GNUTLS_CIPHER_INIT
-#include <stdarg.h>
#include <stdlib.h>
#include <assert.h>
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#include <sys/types.h>
--
2.30.2
2.33.0

View File

@@ -1,17 +1,17 @@
From 990050ed436283fb820d4fe64b08dda3ac7ea9e2 Mon Sep 17 00:00:00 2001
From 34109c1adac6293a87db004d60d342faeb33fcfe Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 8 Jun 2021 09:34:28 +1000
Subject: [PATCH 2/2] d3d10: Avoid implicit cast of interface pointer.
Subject: [PATCH] d3d10: Avoid implicit cast of interface pointer.
---
dlls/d3d10/effect.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 86ef50aac01..060fb69ce3e 100644
index 3b4050460a0..b03ed2d6c89 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -126,7 +126,7 @@ static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D1
@@ -147,7 +147,7 @@ static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D1
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectShaderVariable(ID3D10EffectShaderVariable *iface)
{
@@ -19,8 +19,8 @@ index 86ef50aac01..060fb69ce3e 100644
+ return CONTAINING_RECORD((ID3D10EffectVariable*)iface, struct d3d10_effect_variable, ID3D10EffectVariable_iface);
}
struct d3d10_effect_state_property_info
@@ -4665,7 +4665,7 @@ static void read_variable_array_from_buffer(struct d3d10_effect_variable *variab
static struct d3d10_effect_variable * d3d10_array_get_element(struct d3d10_effect_variable *v,
@@ -4876,7 +4876,7 @@ static void read_variable_array_from_buffer(struct d3d10_effect_variable *variab
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectScalarVariable(ID3D10EffectScalarVariable *iface)
{
@@ -29,7 +29,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
@@ -5001,7 +5001,7 @@ static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_
@@ -5212,7 +5212,7 @@ static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVectorVariable(ID3D10EffectVectorVariable *iface)
{
@@ -38,7 +38,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
@@ -5488,7 +5488,7 @@ static void read_matrix_variable_array_from_buffer(struct d3d10_effect_variable
@@ -5699,7 +5699,7 @@ static void read_matrix_variable_array_from_buffer(struct d3d10_effect_variable
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectMatrixVariable(ID3D10EffectMatrixVariable *iface)
{
@@ -47,7 +47,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
@@ -5995,7 +5995,7 @@ static void set_shader_resource_variable(ID3D10ShaderResourceView **src, ID3D10S
@@ -6222,7 +6222,7 @@ static void set_shader_resource_variable(ID3D10ShaderResourceView **src, ID3D10S
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectShaderResourceVariable(
ID3D10EffectShaderResourceVariable *iface)
{
@@ -57,5 +57,5 @@ index 86ef50aac01..060fb69ce3e 100644
static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
--
2.30.2
2.33.0

View File

@@ -1,4 +1,4 @@
From 916189d1cdf149f16867870121171e20f129da9f Mon Sep 17 00:00:00 2001
From 36b4dbb687232d783cc3203da1dee4a797606ba7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:44:31 +0200
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
1 file changed, 15 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3339596944a..1d435f88755 100644
index 255d5afef79..00add6728cc 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
@@ -20,7 +20,7 @@ index 3339596944a..1d435f88755 100644
#ifdef _WIN64
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
@@ -3373,6 +3374,7 @@ void WINAPI LdrShutdownProcess(void)
@@ -3536,6 +3537,7 @@ void WINAPI LdrShutdownProcess(void)
process_detach();
}
@@ -28,7 +28,7 @@ index 3339596944a..1d435f88755 100644
/******************************************************************
* RtlExitUserProcess (NTDLL.@)
@@ -3783,6 +3785,9 @@ static void init_wow64( CONTEXT *context )
@@ -3955,6 +3957,9 @@ static void release_address_space(void)
*/
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
{
@@ -36,9 +36,9 @@ index 3339596944a..1d435f88755 100644
+ UNICODE_STRING staging_event_string;
+ HANDLE staging_event;
static int attach_done;
int i;
NTSTATUS status;
@@ -3869,6 +3874,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
ULONG_PTR cookie;
@@ -4041,6 +4046,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
#endif
@@ -56,5 +56,5 @@ index 3339596944a..1d435f88755 100644
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
RtlReleasePebLock();
--
2.30.2
2.33.0

View File

@@ -1,25 +1,25 @@
From cfcc687562d4fa68b507cbf2c29722ef523d26aa Mon Sep 17 00:00:00 2001
From 8aa6fb73e3142d86ba354c204313b8a74a5fa43d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:53:46 +0200
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
---
Makefile.in | 2 +-
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index b52495f741f..d5a8cad20da 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -116,7 +116,7 @@ install-manpages:: manpages
# Rules for generated source files
dlls/ntdll/unix/version.c: dummy
- @version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
+ @version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
diff --git a/configure.ac b/configure.ac
index f86a5decb07..3d7f9cc96e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3910,7 +3910,7 @@ dnl Rules for generated source files
WINE_APPEND_RULE(
[dlls/ntdll/unix/version.c: dummy
- @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1)
+ @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1 (Staging)\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1)
programs/winetest/build.rc: dummy
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
@build=\"STRINGTABLE { 1 \\\"\`GIT_DIR=${wine_srcdir}.git git rev-parse HEAD 2>/dev/null\`\\\" }\" && (echo \$\$build | cmp -s - \$[@]) || echo \$\$build >\$[@] || (rm -f \$[@] && exit 1)
programs/winetest/build.nfo:
--
2.20.1
2.33.0

View File

@@ -1,125 +0,0 @@
From 0e65ed108eb8bab24668f9a58c5757a3ad36104f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 12 Apr 2016 01:02:34 +0200
Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
---
dlls/uiautomationcore/Makefile.in | 1 +
dlls/uiautomationcore/uia_main.c | 53 +++++++++++++++++++++++++++----
2 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
index 5c4acb232a4..412f1dbbe19 100644
--- a/dlls/uiautomationcore/Makefile.in
+++ b/dlls/uiautomationcore/Makefile.in
@@ -1,5 +1,6 @@
MODULE = uiautomationcore.dll
IMPORTLIB = uiautomationcore
+IMPORTS = uuid
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
index 42014af6035..61e165d83c0 100644
--- a/dlls/uiautomationcore/uia_main.c
+++ b/dlls/uiautomationcore/uia_main.c
@@ -1,4 +1,5 @@
/*
+ * Copyright 2016 Michael MĂĽller
* Copyright 2017 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
@@ -16,18 +17,58 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
#include "uiautomation.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(uiautomation);
+static HRESULT WINAPI dummy_QueryInterface(IUnknown *iface, REFIID iid, void **ppv)
+{
+ TRACE("(%p, %s, %p)\n", iface, debugstr_guid(iid), ppv);
+
+ if (!ppv) return E_INVALIDARG;
+
+ if (!IsEqualIID(&IID_IUnknown, iid))
+ {
+ FIXME("Unknown interface: %s\n", debugstr_guid(iid));
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ *ppv = iface;
+ IUnknown_AddRef((IUnknown *)*ppv);
+ return S_OK;
+}
+
+static ULONG WINAPI dummy_AddRef(IUnknown *iface)
+{
+ FIXME("(%p): stub\n", iface);
+ return 1;
+}
+
+static ULONG WINAPI dummy_Release(IUnknown *iface)
+{
+ FIXME("(%p): stub\n", iface);
+ return 1;
+}
+
+static const IUnknownVtbl dummy_Vtbl =
+{
+ dummy_QueryInterface,
+ dummy_AddRef,
+ dummy_Release,
+};
+
+static IUnknown dummy = { &dummy_Vtbl };
+
/***********************************************************************
* UiaClientsAreListening (uiautomationcore.@)
*/
BOOL WINAPI UiaClientsAreListening(void)
{
- FIXME("()\n");
+ FIXME("(): stub\n");
return FALSE;
}
@@ -36,8 +77,8 @@ BOOL WINAPI UiaClientsAreListening(void)
*/
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
{
- FIXME("(%p) stub!\n", value);
- *value = NULL;
+ FIXME("(%p): stub!\n", value);
+ *value = &dummy;
return S_OK;
}
@@ -46,8 +87,8 @@ HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
*/
HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value)
{
- FIXME("(%p) stub!\n", value);
- *value = NULL;
+ FIXME("(%p): stub!\n", value);
+ *value = &dummy;
return S_OK;
}
@@ -66,7 +107,7 @@ int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam,
LPARAM lParam, IRawElementProviderSimple *elprov)
{
- FIXME("(%p, %lx, %lx, %p) stub!\n", hwnd, wParam, lParam, elprov);
+ FIXME("(%p, %lx, %lx, %p): stub!\n", hwnd, wParam, lParam, elprov);
return 0;
}
--
2.20.1

View File

@@ -1,27 +0,0 @@
From ebf3df9837ac6707fe831722c7ed24ccd80f95ce Mon Sep 17 00:00:00 2001
From: Thomas Crider <gloriouseggroll@gmail.com>
Date: Sat, 29 May 2021 14:39:08 -0600
Subject: [PATCH] api-ms-win-core-psapi-l1-1-0: Add K32GetModuleBaseNameW and
K32GetModuleInformation.
Needed for Mass Effect Legendary Edition.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51199
Signed-off-by: Thomas Crider <gloriouseggroll@gmail.com>
---
.../api-ms-win-core-psapi-l1-1-0.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec b/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec
index c54c1077843..321fc3fe928 100644
--- a/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec
+++ b/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec
@@ -14,3 +14,5 @@
@ stdcall K32QueryWorkingSet(long ptr long) kernel32.K32QueryWorkingSet
@ stdcall K32QueryWorkingSetEx(long ptr long) kernel32.K32QueryWorkingSetEx
@ stdcall QueryFullProcessImageNameW(ptr long ptr ptr) kernel32.QueryFullProcessImageNameW
+@ stdcall K32GetModuleBaseNameW(long long ptr long) kernel32.K32GetModuleBaseNameW
+@ stdcall K32GetModuleInformation(long long ptr long) kernel32.K32GetModuleInformation
--
2.30.2

View File

@@ -1,25 +0,0 @@
From c96b3a0632721f8849fb1d8404272b5007c1d1b4 Mon Sep 17 00:00:00 2001
From: Thomas Crider <gloriouseggroll@gmail.com>
Date: Sat, 29 May 2021 14:39:09 -0600
Subject: [PATCH] api-ms-win-core-psapi-ansi-l1-1-0: add K32GetModuleBaseNameA
Needed for Mass Effect Legendary Edition.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51199
Signed-off-by: Thomas Crider <gloriouseggroll@gmail.com>
---
.../api-ms-win-core-psapi-ansi-l1-1-0.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec b/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec
index e4f758581f6..340198c6edf 100644
--- a/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec
+++ b/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec
@@ -4,3 +4,4 @@
@ stdcall K32GetMappedFileNameA(long ptr ptr long) kernel32.K32GetMappedFileNameA
@ stdcall K32GetProcessImageFileNameA(long ptr long) kernel32.K32GetProcessImageFileNameA
@ stdcall QueryFullProcessImageNameA(ptr long ptr ptr) kernel32.QueryFullProcessImageNameA
+@ stdcall K32GetModuleBaseNameA(long long ptr long) kernel32.K32GetModuleBaseNameA
--
2.30.2

View File

@@ -1 +0,0 @@
Fixes: [51199] Add missing api-ms-win-core-psapi forwards

View File

@@ -1,4 +1,4 @@
From 89c22c9894fd170b0b3a99309540c88059c64824 Mon Sep 17 00:00:00 2001
From 1768ecfc4a7181600df254069f02655fe4e5fa0b Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 2 Oct 2020 11:29:24 -0500
Subject: [PATCH] bcrypt: Allow multiple backends to coexist.
@@ -7,18 +7,17 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/bcrypt/Makefile.in | 3 +-
dlls/bcrypt/bcrypt_internal.h | 3 +
dlls/bcrypt/gnutls.c | 34 ++++--
dlls/bcrypt/macos.c | 18 ++-
dlls/bcrypt/unixlib.c | 211 ++++++++++++++++++++++++++++++++++
5 files changed, 253 insertions(+), 16 deletions(-)
dlls/bcrypt/gnutls.c | 32 ++++--
dlls/bcrypt/unixlib.c | 208 ++++++++++++++++++++++++++++++++++
4 files changed, 235 insertions(+), 11 deletions(-)
create mode 100644 dlls/bcrypt/unixlib.c
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
index 24803fb2d7c..46a20d473dd 100644
index 63a731fa9d9..6dd3066d4a5 100644
--- a/dlls/bcrypt/Makefile.in
+++ b/dlls/bcrypt/Makefile.in
@@ -11,6 +11,7 @@ C_SRCS = \
macos.c \
@@ -8,6 +8,7 @@ C_SRCS = \
gnutls.c \
md2.c \
sha256.c \
- sha512.c
@@ -39,10 +38,10 @@ index 61c367cae9d..d0697ed807e 100644
+
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 9c1e7b5ab06..9b716c6f536 100644
index 7b1bceda889..66845ffc8cf 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -372,9 +372,12 @@ fail:
@@ -373,9 +373,12 @@ fail:
static void gnutls_uninitialize(void)
{
@@ -58,16 +57,7 @@ index 9c1e7b5ab06..9b716c6f536 100644
}
struct buffer
@@ -1869,7 +1872,7 @@ static NTSTATUS CDECL key_asymmetric_decrypt( struct key *key, UCHAR *input, ULO
return status;
}
-static const struct key_funcs key_funcs =
+static struct key_funcs key_funcs =
{
key_set_property,
key_symmetric_init,
@@ -1893,19 +1896,28 @@ static const struct key_funcs key_funcs =
@@ -1894,19 +1897,28 @@ static const struct key_funcs key_funcs =
key_import_rsa
};
@@ -103,42 +93,12 @@ index 9c1e7b5ab06..9b716c6f536 100644
+ return NULL;
+}
+#endif
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 20e1a61e3fb..1e364ac05a3 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -302,11 +302,21 @@ static const struct key_funcs key_funcs =
key_import_rsa
};
-NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+struct key_funcs * macos_lib_init( DWORD reason )
{
- if (reason != DLL_PROCESS_ATTACH) return STATUS_SUCCESS;
- *(const struct key_funcs **)ptr_out = &key_funcs;
- return STATUS_SUCCESS;
+ if (reason != DLL_PROCESS_ATTACH) return NULL;
+ return &key_funcs;
}
+#else
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+
+struct key_funcs * macos_lib_init( DWORD reason )
+{
+ return NULL;
+}
#endif
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
new file mode 100644
index 00000000000..6c3aff80373
index 00000000000..1937a8172a4
--- /dev/null
+++ b/dlls/bcrypt/unixlib.c
@@ -0,0 +1,211 @@
@@ -0,0 +1,208 @@
+#if 0
+#pragma makedep unix
+#endif
@@ -271,7 +231,7 @@ index 00000000000..6c3aff80373
+}
+
+static NTSTATUS CDECL key_asymmetric_decrypt( struct key *key, UCHAR *input, ULONG input_len,
+ UCHAR *output, ULONG *output_len, ULONG *ret_len )
+ UCHAR *output, ULONG output_len, ULONG *ret)
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
@@ -310,13 +270,10 @@ index 00000000000..6c3aff80373
+NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+{
+ struct key_funcs *gnutls_funcs = gnutls_lib_init(reason);
+ struct key_funcs *macos_funcs = macos_lib_init(reason);
+
+ if (reason == DLL_PROCESS_ATTACH)
+ {
+#define RESOLVE_FUNC(name) \
+ if (macos_funcs && macos_funcs->key_##name) \
+ key_funcs.key_##name = macos_funcs->key_##name; \
+ if (gnutls_funcs && gnutls_funcs->key_##name) \
+ key_funcs.key_##name = gnutls_funcs->key_##name;
+
@@ -351,5 +308,5 @@ index 00000000000..6c3aff80373
+
+#endif
--
2.30.2
2.33.0

View File

@@ -1,4 +1,4 @@
From e2442f39015a5982bfd15479ee06d7163d36771d Mon Sep 17 00:00:00 2001
From 528d7188ba7d6e68622d1b4f95608e68f26e1852 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 2 Oct 2020 12:11:49 -0500
Subject: [PATCH] bcrypt: Implement BCryptSecretAgreement with libgcrypt.
@@ -11,17 +11,16 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
dlls/bcrypt/bcrypt_main.c | 55 ++++++-
dlls/bcrypt/gcrypt.c | 292 ++++++++++++++++++++++++++++++++++
dlls/bcrypt/gnutls.c | 3 +-
dlls/bcrypt/macos.c | 3 +-
dlls/bcrypt/tests/bcrypt.c | 2 +-
dlls/bcrypt/unixlib.c | 13 +-
9 files changed, 378 insertions(+), 9 deletions(-)
8 files changed, 376 insertions(+), 8 deletions(-)
create mode 100644 dlls/bcrypt/gcrypt.c
diff --git a/configure.ac b/configure.ac
index b6b8d49342f3..7c1c8a7ddaf4 100644
index f2401734035..b47f8d016e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
@@ -47,6 +47,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
AC_ARG_WITH(float-abi, AS_HELP_STRING([--with-float-abi=abi],[specify the ABI (soft|softfp|hard) for ARM platforms]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]))
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
@@ -29,7 +28,7 @@ index b6b8d49342f3..7c1c8a7ddaf4 100644
AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--with-gettextpo],[use the GetTextPO library to rebuild po files]),
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
@@ -1989,6 +1990,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
@@ -1954,6 +1955,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
[vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.])
test "x$ac_cv_lib_soname_vkd3d" != "x" || enable_d3d12=${enable_d3d12:-no}
@@ -50,22 +49,22 @@ index b6b8d49342f3..7c1c8a7ddaf4 100644
AC_SUBST(EXTRACFLAGS,"")
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
index 46a20d473dd7..4a3016784af3 100644
index 6dd3066d4a5..5336c8fc66b 100644
--- a/dlls/bcrypt/Makefile.in
+++ b/dlls/bcrypt/Makefile.in
@@ -7,6 +7,7 @@ EXTRADLLFLAGS = -mno-cygwin
@@ -5,6 +5,7 @@ EXTRAINCL = $(GNUTLS_CFLAGS)
C_SRCS = \
bcrypt_main.c \
+ gcrypt.c \
gnutls.c \
macos.c \
md2.c \
sha256.c \
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
index 3c7110d05f84..e7991eac077a 100644
index d0697ed807e..66898c58cd2 100644
--- a/dlls/bcrypt/bcrypt_internal.h
+++ b/dlls/bcrypt/bcrypt_internal.h
@@ -192,6 +192,8 @@ struct key
@@ -193,6 +193,8 @@ struct key
struct secret
{
struct object hdr;
@@ -74,7 +73,7 @@ index 3c7110d05f84..e7991eac077a 100644
};
struct key_funcs
@@ -216,9 +218,11 @@ struct key_funcs
@@ -217,9 +219,11 @@ struct key_funcs
NTSTATUS (CDECL *key_import_dsa_capi)( struct key *, UCHAR *, ULONG );
NTSTATUS (CDECL *key_import_ecc)( struct key *, UCHAR *, ULONG );
NTSTATUS (CDECL *key_import_rsa)( struct key *, UCHAR *, ULONG );
@@ -87,10 +86,10 @@ index 3c7110d05f84..e7991eac077a 100644
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index a1423dcd8368..0655c5dcfe81 100644
index 5eb50cd616b..570f452d78e 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1932,9 +1932,12 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
@@ -1925,9 +1925,12 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
{
struct key *privkey = privatekey;
struct key *pubkey = publickey;
@@ -104,7 +103,7 @@ index a1423dcd8368..0655c5dcfe81 100644
if (!privkey || privkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!pubkey || pubkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
@@ -1943,18 +1946,39 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
@@ -1936,18 +1939,39 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
if (!(secret = heap_alloc_zero( sizeof(*secret) ))) return STATUS_NO_MEMORY;
secret->hdr.magic = MAGIC_SECRET;
@@ -146,7 +145,7 @@ index a1423dcd8368..0655c5dcfe81 100644
heap_free( secret );
return STATUS_SUCCESS;
}
@@ -1964,12 +1988,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
@@ -1957,12 +1981,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
{
struct secret *secret = handle;
@@ -184,7 +183,7 @@ index a1423dcd8368..0655c5dcfe81 100644
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
diff --git a/dlls/bcrypt/gcrypt.c b/dlls/bcrypt/gcrypt.c
new file mode 100644
index 000000000000..e72c27feb519
index 00000000000..e72c27feb51
--- /dev/null
+++ b/dlls/bcrypt/gcrypt.c
@@ -0,0 +1,292 @@
@@ -481,10 +480,10 @@ index 000000000000..e72c27feb519
+}
+#endif
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 9490ea8612a8..78d0f2d95966 100644
index 66845ffc8cf..64825f5b99b 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -1949,7 +1949,8 @@ static const struct key_funcs key_funcs =
@@ -1894,7 +1894,8 @@ static const struct key_funcs key_funcs =
key_export_ecc,
key_import_dsa_capi,
key_import_ecc,
@@ -494,25 +493,11 @@ index 9490ea8612a8..78d0f2d95966 100644
};
struct key_funcs * gnutls_lib_init( DWORD reason )
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 2a88aec8362c..3ee3515f9de2 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -299,7 +299,8 @@ static const struct key_funcs key_funcs =
key_export_ecc,
key_import_dsa_capi,
key_import_ecc,
- key_import_rsa
+ key_import_rsa,
+ NULL
};
struct key_funcs * macos_lib_init( DWORD reason )
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 456727d04a96..6be406dee21f 100644
index fb5ac03b039..894473d5346 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2163,7 +2163,7 @@ static void test_ECDH(void)
@@ -2248,7 +2248,7 @@ static void test_ECDH(void)
goto raw_secret_end;
}
@@ -522,7 +507,7 @@ index 456727d04a96..6be406dee21f 100644
if (status != STATUS_SUCCESS)
{
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
index 9cbb25f5740c..6f8ff7f97887 100644
index 1937a8172a4..e684a608eb5 100644
--- a/dlls/bcrypt/unixlib.c
+++ b/dlls/bcrypt/unixlib.c
@@ -142,6 +142,12 @@ static NTSTATUS CDECL key_import_rsa( struct key *key, UCHAR *input, ULONG input
@@ -538,7 +523,7 @@ index 9cbb25f5740c..6f8ff7f97887 100644
static struct key_funcs key_funcs =
{
key_set_property,
@@ -164,12 +170,14 @@ static struct key_funcs key_funcs =
@@ -164,17 +170,21 @@ static struct key_funcs key_funcs =
key_import_dsa_capi,
key_import_ecc,
key_import_rsa,
@@ -548,14 +533,11 @@ index 9cbb25f5740c..6f8ff7f97887 100644
NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
{
struct key_funcs *gnutls_funcs = gnutls_lib_init(reason);
struct key_funcs *macos_funcs = macos_lib_init(reason);
+ struct key_funcs *gcrypt_funcs = gcrypt_lib_init(reason);
if (reason == DLL_PROCESS_ATTACH)
{
@@ -177,7 +185,9 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p
if (macos_funcs && macos_funcs->key_##name) \
key_funcs.key_##name = macos_funcs->key_##name; \
#define RESOLVE_FUNC(name) \
if (gnutls_funcs && gnutls_funcs->key_##name) \
- key_funcs.key_##name = gnutls_funcs->key_##name;
+ key_funcs.key_##name = gnutls_funcs->key_##name; \
@@ -564,7 +546,7 @@ index 9cbb25f5740c..6f8ff7f97887 100644
RESOLVE_FUNC(set_property)
RESOLVE_FUNC(symmetric_init)
@@ -199,6 +209,7 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p
@@ -196,6 +206,7 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p
RESOLVE_FUNC(import_dsa_capi)
RESOLVE_FUNC(import_ecc)
RESOLVE_FUNC(import_rsa)
@@ -573,5 +555,5 @@ index 9cbb25f5740c..6f8ff7f97887 100644
#undef RESOLVE_FUNC
--
2.29.2
2.33.0

View File

@@ -2,3 +2,5 @@ Fixes: [47699] Multiple games fail to connect to online services (missing BCrypt
# Needs to be moved to the unix lib, but that's a nontrivial amount of work, and
# using gcrypt is the wrong way forward (we should expose the missing APIs from
# gnutls instead).
# Temporarily disabled pending a rebase from author.
Disabled: true

View File

@@ -1,4 +1,4 @@
From 50bd67fb1fd718eaaf9f5600fba7ab86e4b71a76 Mon Sep 17 00:00:00 2001
From a5045503cf3310058cc64814ff9626f4877a13bb Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 5 Jul 2019 13:20:23 +0800
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
@@ -17,10 +17,10 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
create mode 100644 dlls/cryptext/tests/cryptext.c
diff --git a/configure b/configure
index 2b20133cd65..f3ef3aef3a9 100755
index db592f0868d..ba13abacc46 100755
--- a/configure
+++ b/configure
@@ -20350,6 +20350,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
@@ -20291,6 +20291,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
wine_fn_config_makefile dlls/cryptext enable_cryptext
@@ -29,10 +29,10 @@ index 2b20133cd65..f3ef3aef3a9 100755
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
wine_fn_config_makefile dlls/cryptsp enable_cryptsp
diff --git a/configure.ac b/configure.ac
index 24f5c8847d6..f71fb6f401d 100644
index d449b88fb19..af75e0e80ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3083,6 +3083,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
@@ -3029,6 +3029,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
WINE_CONFIG_MAKEFILE(dlls/cryptext)
@@ -41,7 +41,7 @@ index 24f5c8847d6..f71fb6f401d 100644
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptsp)
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
index 3acce60ae88..590074a806f 100644
index 0ec2b8a2045..76accca43eb 100644
--- a/dlls/cryptext/Makefile.in
+++ b/dlls/cryptext/Makefile.in
@@ -1,4 +1,5 @@
@@ -49,10 +49,10 @@ index 3acce60ae88..590074a806f 100644
+MODULE = cryptext.dll
+IMPORTS = crypt32 cryptui user32
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
EXTRADLLFLAGS = -Wb,--prefer-native
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
index 0dba38e3934..911ab2f4ba4 100644
index ee3e155f457..24b4794c198 100644
--- a/dlls/cryptext/cryptext.spec
+++ b/dlls/cryptext/cryptext.spec
@@ -12,8 +12,8 @@
@@ -227,5 +227,5 @@ index 00000000000..cc62a772b59
+ test_CryptExtOpenCER();
+}
--
2.20.1
2.33.0

View File

@@ -1,4 +1,4 @@
From 95708c8fdfcb45cfe667cc9a68ea774c2be52169 Mon Sep 17 00:00:00 2001
From e3a6b75cbce69e18742135fdd8e105132d8ca9dd Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 30 Jul 2021 15:57:29 +1000
Subject: [PATCH] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
@@ -14,7 +14,7 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
4 files changed, 178 insertions(+), 9 deletions(-)
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
index c34f53a930c..9e1379937a7 100644
index 7fcce18a8e1..78ca5f707a7 100644
--- a/dlls/d3dx11_42/Makefile.in
+++ b/dlls/d3dx11_42/Makefile.in
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=42
@@ -24,9 +24,9 @@ index c34f53a930c..9e1379937a7 100644
+DELAYIMPORTS = windowscodecs
PARENTSRC = ../d3dx11_43
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
EXTRADLLFLAGS = -Wb,--prefer-native
diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in
index b69f3f1ce02..ed23958a671 100644
index ccd4319ace2..6854c73ebcb 100644
--- a/dlls/d3dx11_43/Makefile.in
+++ b/dlls/d3dx11_43/Makefile.in
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=43
@@ -35,7 +35,7 @@ index b69f3f1ce02..ed23958a671 100644
IMPORTS = d3dcompiler
+DELAYIMPORTS = windowscodecs
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
EXTRADLLFLAGS = -Wb,--prefer-native
diff --git a/dlls/d3dx11_43/main.c b/dlls/d3dx11_43/main.c
index 950f6d76f5c..00c1db35e42 100644
@@ -250,5 +250,5 @@ index ee6808d76d6..8addf4f84d3 100644
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
ID3D11ShaderResourceView **view, HRESULT *hresult)
--
2.32.0
2.33.0

View File

@@ -1,4 +1,4 @@
From 30c01cb08a47b706a4ae49ddbd28f39cb065b5c9 Mon Sep 17 00:00:00 2001
From b094a7cf3f804ea40e5bd05ad738c48b5464e0bb Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Oct 2014 05:06:06 +0200
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
@@ -9,22 +9,23 @@ Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index 076c50323dda..ddb69c96dd42 100644
index 22be2612eeb..f3f31eb3671 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -1,6 +1,6 @@
MODULE = dbghelp.dll
@@ -2,7 +2,7 @@ MODULE = dbghelp.dll
IMPORTLIB = dbghelp
IMPORTS = $(ZLIB_PE_LIBS)
EXTRAINCL = $(ZLIB_PE_CFLAGS)
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="L\"${bindir}\""
DELAYIMPORTS = version
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index e44629f016e1..923608f35e31 100644
index 553b212c526..3584a27953e 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1436,6 +1436,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
@@ -1451,6 +1451,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
load_elf.elf_info = elf_info;
ret = search_unix_path(filename, process_getenv(pcs, L"LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
@@ -33,5 +34,5 @@ index e44629f016e1..923608f35e31 100644
}
--
2.26.2
2.33.0

View File

@@ -1,2 +0,0 @@
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
Depends: dinput-joy-mappings

View File

@@ -1,214 +0,0 @@
From 24829b2ba6d5efd950f178b8282dda826c4d1df0 Mon Sep 17 00:00:00 2001
From: Bruno Jesus <bjesus@codeweavers.com>
Date: Thu, 28 Feb 2019 15:56:18 +1100
Subject: [PATCH] dinput: Recalculated Axis after deadzone change.
Wine-bugs: https://bugs.winehq.org/show_bug.cgi?id=41317
---
dlls/dinput/joystick.c | 149 ++++++++++++++++++++++-------------------
1 file changed, 80 insertions(+), 69 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 433348cd04..c150528e3d 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -312,6 +312,76 @@ BOOL is_xinput_device(const DIDEVCAPS *devcaps, WORD vid, WORD pid)
return (devcaps->dwAxes == 6 && devcaps->dwButtons >= 14);
}
+static void remap_init(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
+{
+ /* Configure as if nothing changed so the helper functions can only change
+ * what they need, thus reducing code duplication. */
+ remap_props->lDevMin = remap_props->lMin = This->props[obj].lMin;
+ remap_props->lDevMax = remap_props->lMax = This->props[obj].lMax;
+
+ remap_props->lDeadZone = This->props[obj].lDeadZone;
+ remap_props->lSaturation = This->props[obj].lSaturation;
+}
+
+static void remap_apply(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
+{
+ /* Many games poll the joystick immediately after setting the range
+ * for calibration purposes, so the old values need to be remapped
+ * to the new range before it does so */
+ switch (This->base.data_format.wine_df->rgodf[obj].dwOfs){
+ case DIJOFS_X : This->js.lX = joystick_map_axis(remap_props, This->js.lX); break;
+ case DIJOFS_Y : This->js.lY = joystick_map_axis(remap_props, This->js.lY); break;
+ case DIJOFS_Z : This->js.lZ = joystick_map_axis(remap_props, This->js.lZ); break;
+ case DIJOFS_RX : This->js.lRx = joystick_map_axis(remap_props, This->js.lRx); break;
+ case DIJOFS_RY : This->js.lRy = joystick_map_axis(remap_props, This->js.lRy); break;
+ case DIJOFS_RZ : This->js.lRz = joystick_map_axis(remap_props, This->js.lRz); break;
+ case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(remap_props, This->js.rglSlider[0]); break;
+ case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(remap_props, This->js.rglSlider[1]); break;
+ default: break;
+ }
+}
+
+static void remap_range(JoystickGenericImpl *This, int obj, LPCDIPROPRANGE pr)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lMin = pr->lMin;
+ remap_props.lMax = pr->lMax;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new values */
+ This->props[obj].lMin = pr->lMin;
+ This->props[obj].lMax = pr->lMax;
+}
+
+static void remap_deadzone(JoystickGenericImpl *This, int obj, LPCDIPROPDWORD pd)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lDeadZone = pd->dwData;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new value */
+ This->props[obj].lDeadZone = pd->dwData;
+}
+
+static void remap_saturation(JoystickGenericImpl *This, int obj, LPCDIPROPDWORD pd)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lSaturation = pd->dwData;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new value */
+ This->props[obj].lSaturation = pd->dwData;
+}
+
/******************************************************************************
* SetProperty : change input device properties
*/
@@ -319,7 +389,6 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
{
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
DWORD i;
- ObjProps remap_props;
TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
@@ -336,69 +405,15 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) {
-
- /* Many games poll the joystick immediately after setting the range
- * for calibration purposes, so the old values need to be remapped
- * to the new range before it does so */
-
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
- for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) {
-
- remap_props.lDevMin = This->props[i].lMin;
- remap_props.lDevMax = This->props[i].lMax;
-
- remap_props.lDeadZone = This->props[i].lDeadZone;
- remap_props.lSaturation = This->props[i].lSaturation;
-
- remap_props.lMin = pr->lMin;
- remap_props.lMax = pr->lMax;
-
- switch (This->base.data_format.wine_df->rgodf[i].dwOfs) {
- case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break;
- case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break;
- case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break;
- case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break;
- case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break;
- case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break;
- case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break;
- case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break;
- default: break;
- }
-
- This->props[i].lMin = pr->lMin;
- This->props[i].lMax = pr->lMax;
- }
+ for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
+ remap_range(This, i, pr);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj);
- if (obj >= 0) {
-
- remap_props.lDevMin = This->props[obj].lMin;
- remap_props.lDevMax = This->props[obj].lMax;
-
- remap_props.lDeadZone = This->props[obj].lDeadZone;
- remap_props.lSaturation = This->props[obj].lSaturation;
-
- remap_props.lMin = pr->lMin;
- remap_props.lMax = pr->lMax;
-
- switch (This->base.data_format.wine_df->rgodf[obj].dwOfs) {
- case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break;
- case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break;
- case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break;
- case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break;
- case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break;
- case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break;
- case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break;
- case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break;
- default: break;
- }
-
- This->props[obj].lMin = pr->lMin;
- This->props[obj].lMax = pr->lMax;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_range(This, obj, pr);
}
break;
}
@@ -407,15 +422,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
if (ph->dwHow == DIPH_DEVICE) {
TRACE("deadzone(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
- This->props[i].lDeadZone = pd->dwData;
+ remap_deadzone(This, i, pd);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
- if (obj >= 0) {
- This->props[obj].lDeadZone = pd->dwData;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_deadzone(This, obj, pd);
}
break;
}
@@ -424,15 +437,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
if (ph->dwHow == DIPH_DEVICE) {
TRACE("saturation(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
- This->props[i].lSaturation = pd->dwData;
+ remap_saturation(This, i, pd);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
- if (obj >= 0) {
- This->props[obj].lSaturation = pd->dwData;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_saturation(This, obj, pd);
}
break;
}
--
2.17.1

View File

@@ -1 +0,0 @@
Fixes: [41317] dinput: Recalculated Axis after deadzone change.

View File

@@ -1,45 +1,33 @@
From 2ff7da682aa87e09966fa0fb7c8846cd82bd1eea Mon Sep 17 00:00:00 2001
From ef0da9342b0ced44da1ed8532941d53f48ead602 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:20:54 +1000
Subject: [PATCH] dinput: Allow empty Joystick mappings.
---
dlls/dinput/device.c | 82 ++++++++++++++++++++++++++++++-------
dlls/dinput/joystick.c | 2 +-
dlls/dinput8/tests/device.c | 50 ++++++++++++++++++++++
3 files changed, 119 insertions(+), 15 deletions(-)
dlls/dinput/device.c | 77 ++++++++++++++++++++++++++++++-------
dlls/dinput8/tests/device.c | 50 ++++++++++++++++++++++++
2 files changed, 113 insertions(+), 14 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e99d14b4cff..540034de1e9 100644
index b423337c9ce..c9466655ce4 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -30,6 +30,7 @@
#include <string.h>
#include "wine/debug.h"
#include "wine/unicode.h"
+#include "wine/heap.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
@@ -655,12 +656,29 @@ static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
return type | (0x0000ff00 & (obj_instance << 8));
@@ -356,12 +356,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
return type | (0x0000ff00 & (instance << 8));
}
+static void del_mapping_key(const WCHAR *device, const WCHAR *username, const WCHAR *guid) {
+ static const WCHAR subkey[] = {
+ 'S','o','f','t','w','a','r','e','\\',
+ 'W','i','n','e','\\',
+ 'D','i','r','e','c','t','I','n','p','u','t','\\',
+ 'M','a','p','p','i','n','g','s','\\','%','s','\\','%','s','\\','%','s','\0'};
+ static const WCHAR subkey[] = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
+ DWORD len = wcslen(subkey) + wcslen(username) + wcslen(device) + wcslen(guid);
+ WCHAR *keyname;
+
+ keyname = heap_alloc(sizeof(WCHAR) * (lstrlenW(subkey) + strlenW(username) + strlenW(device) + strlenW(guid)));
+ sprintfW(keyname, subkey, username, device, guid);
+ keyname = malloc(len * sizeof(WCHAR));
+ swprintf(keyname, len, subkey, username, device, guid);
+
+ /* Remove old key mappings so there will be no overlapping mappings */
+ RegDeleteKeyW(HKEY_CURRENT_USER, keyname);
+
+ heap_free(keyname);
+ free(keyname);
+}
+
/*
@@ -50,10 +38,10 @@ index e99d14b4cff..540034de1e9 100644
-static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WCHAR *guid)
+static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WCHAR *guid, BOOL create)
{
static const WCHAR subkey[] = {
'S','o','f','t','w','a','r','e','\\',
@@ -675,8 +693,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
sprintfW(keyname, subkey, username, device, guid);
static const WCHAR *subkey = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
HKEY hkey;
@@ -372,8 +386,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
swprintf( keyname, len, subkey, username, device, guid );
/* The key used is HKCU\Software\Wine\DirectInput\Mappings\[username]\[device]\[mapping_guid] */
- if (RegCreateKeyW(HKEY_CURRENT_USER, keyname, &hkey))
@@ -64,9 +52,9 @@ index e99d14b4cff..540034de1e9 100644
+ } else if (RegOpenKeyW(HKEY_CURRENT_USER, keyname, &hkey))
+ hkey = 0;
HeapFree(GetProcessHeap(), 0, keyname);
free( keyname );
@@ -696,7 +717,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
@@ -393,7 +410,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
return DI_SETTINGSNOTSAVED;
@@ -77,7 +65,7 @@ index e99d14b4cff..540034de1e9 100644
if (!hkey)
{
@@ -731,7 +754,7 @@ BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdia
@@ -428,7 +447,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
HKEY hkey;
WCHAR *guid_str;
DIDEVICEINSTANCEW didev;
@@ -86,7 +74,7 @@ index e99d14b4cff..540034de1e9 100644
didev.dwSize = sizeof(didev);
IDirectInputDevice8_GetDeviceInfo(&This->IDirectInputDevice8W_iface, &didev);
@@ -739,7 +762,7 @@ BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdia
@@ -436,7 +455,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
return FALSE;
@@ -95,20 +83,19 @@ index e99d14b4cff..540034de1e9 100644
if (!hkey)
{
@@ -760,15 +783,21 @@ BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdia
@@ -456,15 +475,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
{
lpdiaf->rgoAction[i].dwObjID = id;
lpdiaf->rgoAction[i].guidInstance = didev.guidInstance;
- lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
- mapped += 1;
+ lpdiaf->rgoAction[i].dwHow = DIAH_USERCONFIG;
}
+ }
+ else
+ {
+ memset(&lpdiaf->rgoAction[i].guidInstance, 0, sizeof(GUID));
+ lpdiaf->rgoAction[i].dwHow = DIAH_UNMAPPED;
+ }
+
}
}
RegCloseKey(hkey);
@@ -119,96 +106,83 @@ index e99d14b4cff..540034de1e9 100644
+ return TRUE;
}
static BOOL set_app_data(IDirectInputDeviceImpl *dev, int offset, UINT_PTR app_data)
@@ -831,13 +860,18 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
load_success = load_mapping_settings(This, lpdiaf, username);
static BOOL set_app_data( struct dinput_device *dev, int offset, UINT_PTR app_data )
@@ -1607,13 +1631,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
load_success = load_mapping_settings( impl, format, username_buf );
}
- if (load_success) return DI_OK;
+ if (load_success) {
+ /* Update dwCRC to track if action format has changed */
+ for (i=0; i < lpdiaf->dwNumActions; i++)
+ for (i=0; i < format->dwNumActions; i++)
+ {
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwObjID << i * 2) | (lpdiaf->rgoAction[i].dwObjID >> (sizeof(lpdiaf->dwCRC) * 8 - i * 2));
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwSemantic << (i * 2 + 5)) | (lpdiaf->rgoAction[i].dwSemantic >> (sizeof(lpdiaf->dwCRC) * 8 - (i * 2 + 5)));
+ format->dwCRC ^= (format->rgoAction[i].dwObjID << i * 2) | (format->rgoAction[i].dwObjID >> (sizeof(format->dwCRC) * 8 - i * 2));
+ format->dwCRC ^= (format->rgoAction[i].dwSemantic << (i * 2 + 5)) | (format->rgoAction[i].dwSemantic >> (sizeof(format->dwCRC) * 8 - (i * 2 + 5)));
+ }
+ return DI_OK;
+ }
for (i=0; i < lpdiaf->dwNumActions; i++)
for (i = 0; i < format->dwNumActions; i++)
{
- /* Don't touch a user configured action */
- if (lpdiaf->rgoAction[i].dwHow == DIAH_USERCONFIG) continue;
- if (format->rgoAction[i].dwHow == DIAH_USERCONFIG) continue;
-
if ((lpdiaf->rgoAction[i].dwSemantic & devMask) == devMask)
genre = format->rgoAction[i].dwSemantic & DIGENRE_ANY;
if (devMask == genre || (devMask == DIGENRE_ANY && genre != DIMOUSE_MASK && genre != DIKEYBOARD_MASK))
{
DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
@@ -868,6 +902,14 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
@@ -1645,6 +1674,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
}
}
+ /* Update dwCRC to track if action format has changed */
+ lpdiaf->dwCRC = 0;
+ for (i=0; i < lpdiaf->dwNumActions; i++)
+ format->dwCRC = 0;
+ for (i=0; i < format->dwNumActions; i++)
+ {
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwObjID << i * 2) | (lpdiaf->rgoAction[i].dwObjID >> (sizeof(lpdiaf->dwCRC) * 8 - i * 2));
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwSemantic << (i * 2 + 5)) | (lpdiaf->rgoAction[i].dwSemantic >> (sizeof(lpdiaf->dwCRC) * 8 - (i * 2 + 5)));
+ format->dwCRC ^= (format->rgoAction[i].dwObjID << i * 2) | (format->rgoAction[i].dwObjID >> (sizeof(format->dwCRC) * 8 - i * 2));
+ format->dwCRC ^= (format->rgoAction[i].dwSemantic << (i * 2 + 5)) | (format->rgoAction[i].dwSemantic >> (sizeof(format->dwCRC) * 8 - (i * 2 + 5)));
+ }
+
if (!has_actions) return DI_NOEFFECT;
return IDirectInputDevice8WImpl_BuildActionMap(iface, lpdiaf, lpszUserName, dwFlags);
@@ -883,6 +925,7 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
if (flags & (DIDBAM_DEFAULT|DIDBAM_PRESERVE|DIDBAM_INITIALIZE|DIDBAM_HWDEFAULTS))
FIXME("Unimplemented flags %#x\n", flags);
@@ -1662,6 +1699,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
DIPROPSTRING dps;
WCHAR username[MAX_PATH];
DWORD username_size = MAX_PATH;
WCHAR username_buf[MAX_PATH];
DWORD username_len = MAX_PATH;
+ DWORD new_crc = 0;
int i, action = 0, num_actions = 0;
unsigned int offset = 0;
ActionMap *action_map;
@@ -894,12 +937,23 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
const DIDATAFORMAT *df;
@@ -1694,12 +1732,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
data_format.dwFlags = DIDF_RELAXIS;
data_format.dwDataSize = lpdiaf->dwDataSize;
data_format.dwDataSize = format->dwDataSize;
+ /* Calculate checksum for actionformat */
+ for (i=0; i < lpdiaf->dwNumActions; i++)
+ for (i=0; i < format->dwNumActions; i++)
+ {
+ new_crc ^= (lpdiaf->rgoAction[i].dwObjID << i * 2) | (lpdiaf->rgoAction[i].dwObjID >> (sizeof(lpdiaf->dwCRC) * 8 - i * 2));
+ new_crc ^= (lpdiaf->rgoAction[i].dwSemantic << (i * 2 + 5)) | (lpdiaf->rgoAction[i].dwSemantic >> (sizeof(lpdiaf->dwCRC) * 8 - (i * 2 + 5)));
+ new_crc ^= (format->rgoAction[i].dwObjID << i * 2) | (format->rgoAction[i].dwObjID >> (sizeof(format->dwCRC) * 8 - i * 2));
+ new_crc ^= (format->rgoAction[i].dwSemantic << (i * 2 + 5)) | (format->rgoAction[i].dwSemantic >> (sizeof(format->dwCRC) * 8 - (i * 2 + 5)));
+ }
+
/* Count the actions */
for (i=0; i < lpdiaf->dwNumActions; i++)
if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance))
for (i = 0; i < format->dwNumActions; i++)
if (IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance ))
num_actions++;
- if (num_actions == 0) return DI_NOEFFECT;
+ /* Should return DI_NOEFFECT if we dont have any actions and actionformat has not changed */
+ if (num_actions == 0 && lpdiaf->dwCRC == new_crc && !(dwFlags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
+ if (num_actions == 0 && format->dwCRC == new_crc && !(flags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
+
+ /* update dwCRC to track if action format has changed */
+ lpdiaf->dwCRC = new_crc;
+ format->dwCRC = new_crc;
/* Construct the dataformat and actionmap */
obj_df = HeapAlloc(GetProcessHeap(), 0, sizeof(DIOBJECTDATAFORMAT)*num_actions);
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 0cddfbc634b..93211ea13a6 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -749,7 +749,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
else
lstrcpynW(username, lpszUserName, size);
- load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username);
+ load_success = load_mapping_settings(&This->base, lpdiaf, username);
heap_free(username);
}
obj_df = malloc( sizeof(DIOBJECTDATAFORMAT) * num_actions );
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 17deed193dd..3bfb34eb2ca 100644
index 5ae9e225dc9..d3e86c68176 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -38,6 +38,8 @@ struct enum_data {
@@ -48,6 +48,8 @@ struct enum_data {
/* Dummy GUID */
static const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } };
@@ -217,7 +191,7 @@ index 17deed193dd..3bfb34eb2ca 100644
enum {
DITEST_AXIS,
DITEST_BUTTON,
@@ -429,6 +431,17 @@ static void test_action_mapping(void)
@@ -472,6 +474,17 @@ static void test_action_mapping(void)
hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%08x\n", hr);
@@ -235,7 +209,7 @@ index 17deed193dd..3bfb34eb2ca 100644
af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
af.dwNumActions = ARRAY_SIZE(actionMapping);
@@ -620,6 +633,43 @@ static void test_save_settings(void)
@@ -663,6 +676,43 @@ static void test_save_settings(void)
"Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[1], af.rgoAction[1].dwObjID);
ok (IsEqualGUID(&GUID_SysKeyboard, &af.rgoAction[1].guidInstance), "Action should be mapped to keyboard\n");
@@ -280,5 +254,5 @@ index 17deed193dd..3bfb34eb2ca 100644
IDirectInput_Release(pDI);
}
--
2.30.2
2.33.0

View File

@@ -1,88 +0,0 @@
From 290d6b2b773e9729c38495ec8c1291b40678bc31 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:20:20 +1000
Subject: [PATCH 1/3] dinput: Load users Joystick mappings.
---
dlls/dinput/device.c | 2 +-
dlls/dinput/device_private.h | 2 ++
dlls/dinput/joystick.c | 25 +++++++++++++++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 28329d03b5..d1bf934a82 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -714,7 +714,7 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
return DI_OK;
}
-static BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdiaf, const WCHAR *username)
+BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdiaf, const WCHAR *username)
{
HKEY hkey;
WCHAR *guid_str;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 27e9c26286..ea794d7396 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -125,6 +125,8 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
+extern BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdiaf, const WCHAR *username) DECLSPEC_HIDDEN;
+
extern HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
extern HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 2220b5d576..8341e0313a 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -28,8 +28,10 @@
#include <stdio.h>
+#include "device_private.h"
#include "joystick_private.h"
#include "wine/debug.h"
+#include "wine/heap.h"
#include "winreg.h"
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
@@ -825,9 +827,32 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
unsigned int i, j;
BOOL has_actions = FALSE;
+ WCHAR *username;
+ DWORD size;
+ BOOL load_success = FALSE;
FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", This, lpdiaf, debugstr_w(lpszUserName), dwFlags);
+ /* Unless asked the contrary by these flags, try to load a previous mapping */
+ if (!(dwFlags & DIDBAM_HWDEFAULTS))
+ {
+ if (!lpszUserName)
+ GetUserNameW(NULL, &size);
+ else
+ size = lstrlenW(lpszUserName) + 1;
+
+ username = heap_alloc(size * sizeof(WCHAR));
+ if (!lpszUserName)
+ GetUserNameW(username, &size);
+ else
+ lstrcpynW(username, lpszUserName, size);
+
+ load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username);
+ heap_free(username);
+ }
+
+ if (load_success) return DI_OK;
+
for (i=0; i < lpdiaf->dwNumActions; i++)
{
DWORD inst = (0x000000ff & (lpdiaf->rgoAction[i].dwSemantic)) - 1;
--
2.17.1

View File

@@ -1,77 +1,19 @@
From c9ecf258a9186bb31a18f8a4728e20bb25b4e9cf Mon Sep 17 00:00:00 2001
From 65e22e69bd660ff20cac0a83e3c1feb966a49646 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:21:24 +1000
Subject: [PATCH] dinput: Support username in Config dialog.
---
dlls/dinput/ansi.c | 26 +++++
dlls/dinput/config.c | 187 ++++++++++++++++++++++++-----------
dlls/dinput/config.c | 184 ++++++++++++++++++++++++-----------
dlls/dinput/device.c | 2 +-
dlls/dinput/device_private.h | 1 +
dlls/dinput/dinput_main.c | 1 +
5 files changed, 160 insertions(+), 57 deletions(-)
dlls/dinput/dinput_private.h | 1 +
3 files changed, 130 insertions(+), 57 deletions(-)
diff --git a/dlls/dinput/ansi.c b/dlls/dinput/ansi.c
index 431b812aeb2..270fe6f1498 100644
--- a/dlls/dinput/ansi.c
+++ b/dlls/dinput/ansi.c
@@ -840,11 +840,37 @@ static HRESULT WINAPI dinput8_a_ConfigureDevices( IDirectInput8A *iface_a, LPDIC
{
hr = diactionformat_atow( format_a, &format_w, TRUE );
params_w.lprgFormats = &format_w;
+ params_w.dwcUsers = params_a->dwcUsers;
+
+ if (params_a->lptszUserNames) {
+ char *start = params_a->lptszUserNames;
+ WCHAR *to = NULL;
+ int total_len = 0;
+ for (i = 0; i < params_a->dwcUsers; i++)
+ {
+ char *end = start + 1;
+ int len;
+ while (*(end++));
+ len = MultiByteToWideChar(CP_ACP, 0, start, end - start, NULL, 0);
+ total_len += len + 2; /* length of string and two null char */
+ if (to)
+ to = HeapReAlloc(GetProcessHeap(), 0, to, sizeof(WCHAR) * total_len);
+ else
+ to = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * total_len);
+
+ MultiByteToWideChar(CP_ACP, 0, start, end - start, to + (total_len - len - 2), len);
+ to[total_len] = 0;
+ to[total_len - 1] = 0;
+ }
+ params_w.lptszUserNames = to;
+ }
if (SUCCEEDED(hr)) hr = IDirectInput8_ConfigureDevices( iface_w, callback, &params_w, flags, ref );
if (!format_w.hInstString) for (i = 0; i < format_w.dwNumActions; ++i) HeapFree( GetProcessHeap(), 0, (void *)format_w.rgoAction[i].lptszActionName );
HeapFree( GetProcessHeap(), 0, format_w.rgoAction );
+ HeapFree( GetProcessHeap(), 0, params_w.lptszUserNames);
+
}
HeapFree( GetProcessHeap(), 0, params_w.lptszUserNames );
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
index bf448985893..c7a33d2da02 100644
index 8cc73c80242..bb0b2c03c47 100644
--- a/dlls/dinput/config.c
+++ b/dlls/dinput/config.c
@@ -18,17 +18,23 @@
#define NONAMELESSUNION
+
#include "wine/unicode.h"
#include "objbase.h"
#include "dinput_private.h"
#include "device_private.h"
#include "resource.h"
+#include "wine/heap.h"
+
typedef struct {
int nobjects;
@@ -29,6 +29,9 @@ typedef struct {
IDirectInputDevice8W *lpdid;
DIDEVICEINSTANCEW ddi;
DIDEVICEOBJECTINSTANCEW ddo[256];
@@ -81,7 +23,7 @@ index bf448985893..c7a33d2da02 100644
} DeviceData;
typedef struct {
@@ -38,10 +44,11 @@ typedef struct {
@@ -38,10 +41,11 @@ typedef struct {
typedef struct {
IDirectInput8W *lpDI;
@@ -94,7 +36,7 @@ index bf448985893..c7a33d2da02 100644
} ConfigureDevicesData;
/*
@@ -57,27 +64,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
@@ -57,27 +61,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
return DIENUM_CONTINUE;
}
@@ -117,7 +59,7 @@ index bf448985893..c7a33d2da02 100644
- DeviceData *device = &data->devices[data->ndevices];
+ /* alloc array for devices if this is our first device */
+ if (!data->devices_data.ndevices)
+ data->devices_data.devices = HeapAlloc(GetProcessHeap(), 0, sizeof(DeviceData) * (dwRemaining + 1));
+ data->devices_data.devices = malloc(sizeof(DeviceData) * (dwRemaining + 1));
+ device = &data->devices_data.devices[data->devices_data.ndevices];
device->lpdid = lpdid;
device->ddi = *lpddi;
@@ -128,14 +70,14 @@ index bf448985893..c7a33d2da02 100644
IDirectInputDevice_EnumObjects(lpdid, collect_objects, (LPVOID) device, DIDFT_ALL);
- data->ndevices++;
+ device->user_afs = heap_alloc(sizeof(*device->user_afs) * data->nusernames);
+ device->user_afs = malloc(sizeof(*device->user_afs) * data->nusernames);
+ memset(device->user_afs, 0, sizeof(*device->user_afs) * data->nusernames);
+ for (i = 0; i < data->nusernames; i++)
+ {
+ DIACTIONFORMATW *user_af = &device->user_afs[i];
+ user_af->dwNumActions = data->original_lpdiaf->dwNumActions;
+ user_af->guidActionMap = data->original_lpdiaf->guidActionMap;
+ user_af->rgoAction = heap_alloc(sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ user_af->rgoAction = malloc(sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ memset(user_af->rgoAction, 0, sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ for (j = 0; j < user_af->dwNumActions; j++)
+ {
@@ -149,7 +91,7 @@ index bf448985893..c7a33d2da02 100644
return DIENUM_CONTINUE;
}
@@ -170,10 +192,18 @@ static DeviceData* get_cur_device(HWND dialog)
@@ -169,10 +188,18 @@ static DeviceData* get_cur_device(HWND dialog)
return &data->devices_data.devices[sel];
}
@@ -170,7 +112,7 @@ index bf448985893..c7a33d2da02 100644
}
static int dialog_display_only(HWND dialog)
@@ -182,40 +212,36 @@ static int dialog_display_only(HWND dialog)
@@ -181,40 +208,36 @@ static int dialog_display_only(HWND dialog)
return data->display_only;
}
@@ -184,7 +126,7 @@ index bf448985893..c7a33d2da02 100644
- IDirectInput8_EnumDevicesBySemantics(lpDI, NULL, lpdiaf, count_devices, (LPVOID) data, 0);
-
- /* Allocate devices */
- data->devices = HeapAlloc(GetProcessHeap(), 0, sizeof(DeviceData) * data->ndevices);
- data->devices = malloc( sizeof(DeviceData) * data->ndevices );
-
/* Collect and insert */
- data->ndevices = 0;
@@ -212,19 +154,19 @@ index bf448985893..c7a33d2da02 100644
+ {
IDirectInputDevice8_Release(devices_data->devices[i].lpdid);
+ for (j=0; j < data->nusernames; j++)
+ heap_free(devices_data->devices[i].user_afs[j].rgoAction);
+ heap_free(devices_data->devices[i].user_afs);
+ free(devices_data->devices[i].user_afs[j].rgoAction);
+ free(devices_data->devices[i].user_afs);
+ }
HeapFree(GetProcessHeap(), 0, devices_data->devices);
free( devices_data->devices );
-
- /* Free the backup LPDIACTIONFORMATW */
- HeapFree(GetProcessHeap(), 0, data->original_lpdiaf->rgoAction);
- HeapFree(GetProcessHeap(), 0, data->original_lpdiaf);
- free( data->original_lpdiaf->rgoAction );
- free( data->original_lpdiaf );
}
static void fill_device_object_list(HWND dialog)
@@ -231,6 +257,7 @@ static void fill_device_object_list(HWND dialog)
@@ -230,6 +253,7 @@ static void fill_device_object_list(HWND dialog)
/* Add each object */
for (i=0; i < device->nobjects; i++)
{
@@ -232,7 +174,7 @@ index bf448985893..c7a33d2da02 100644
int action = -1;
item.mask = LVIF_TEXT | LVIF_PARAM;
@@ -241,12 +268,20 @@ static void fill_device_object_list(HWND dialog)
@@ -240,12 +264,20 @@ static void fill_device_object_list(HWND dialog)
/* Add the item */
SendDlgItemMessageW(dialog, IDC_DEVICEOBJECTSLIST, LVM_INSERTITEMW, 0, (LPARAM) &item);
@@ -255,7 +197,7 @@ index bf448985893..c7a33d2da02 100644
{
action = j;
break;
@@ -260,7 +295,7 @@ static void fill_device_object_list(HWND dialog)
@@ -259,7 +291,7 @@ static void fill_device_object_list(HWND dialog)
static void show_suitable_actions(HWND dialog)
{
DeviceData *device = get_cur_device(dialog);
@@ -264,7 +206,7 @@ index bf448985893..c7a33d2da02 100644
int i, added = 0;
int obj = lv_get_cur_item(dialog);
@@ -329,24 +364,35 @@ static void assign_action(HWND dialog)
@@ -328,24 +360,35 @@ static void assign_action(HWND dialog)
lv_set_action(dialog, obj, action, lpdiaf);
}
@@ -312,7 +254,7 @@ index bf448985893..c7a33d2da02 100644
}
static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -358,21 +404,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -357,21 +400,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
ConfigureDevicesData *data = (ConfigureDevicesData*) lParam;
/* Initialize action format and enumerate devices */
@@ -325,9 +267,9 @@ index bf448985893..c7a33d2da02 100644
init_listview_columns(dialog);
- /* Create a backup action format for CANCEL and RESET operations */
- data->original_lpdiaf = HeapAlloc(GetProcessHeap(), 0, sizeof(*data->original_lpdiaf));
- data->original_lpdiaf = malloc( sizeof(*data->original_lpdiaf) );
- data->original_lpdiaf->dwNumActions = data->lpdiaf->dwNumActions;
- data->original_lpdiaf->rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*data->lpdiaf->dwNumActions);
- data->original_lpdiaf->rgoAction = malloc( sizeof(DIACTIONW) * data->lpdiaf->dwNumActions );
- copy_actions(data->original_lpdiaf, data->lpdiaf);
-
/* Select the first device and show its actions */
@@ -336,7 +278,7 @@ index bf448985893..c7a33d2da02 100644
fill_device_object_list(dialog);
ShowCursor(TRUE);
@@ -414,6 +455,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -413,6 +451,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
break;
case IDC_CONTROLLERCOMBO:
@@ -344,7 +286,7 @@ index bf448985893..c7a33d2da02 100644
switch (HIWORD(wParam))
{
@@ -424,12 +466,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -423,12 +462,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
break;
case IDOK:
@@ -358,7 +300,7 @@ index bf448985893..c7a33d2da02 100644
EndDialog(dialog, 0);
destroy_data(dialog);
break;
@@ -452,15 +494,48 @@ HRESULT _configure_devices(IDirectInput8W *iface,
@@ -451,15 +490,48 @@ HRESULT _configure_devices(IDirectInput8W *iface,
LPVOID pvRefData
)
{
@@ -375,16 +317,16 @@ index bf448985893..c7a33d2da02 100644
+ {
+ /* Get default user name */
+ GetUserNameW(NULL, &size);
+ username = heap_alloc(size * sizeof(WCHAR) );
+ username = malloc(size * sizeof(WCHAR) );
+ GetUserNameW(username, &size);
+ data.nusernames = 1;
+ data.usernames = heap_alloc(sizeof(WCHAR *));
+ data.usernames = malloc(sizeof(WCHAR *));
+ data.usernames[0] = username;
+ }
+ else
+ {
+ WCHAR *p = lpdiCDParams->lptszUserNames;
+ data.usernames = heap_alloc(sizeof(WCHAR *) * data.nusernames);
+ data.usernames = malloc(sizeof(WCHAR *) * data.nusernames);
+ for (i = 0; i < data.nusernames; i++)
+ {
+ if (*p)
@@ -403,16 +345,16 @@ index bf448985893..c7a33d2da02 100644
DialogBoxParamW(DINPUT_instance, (const WCHAR *)MAKEINTRESOURCE(IDD_CONFIGUREDEVICES),
lpdiCDParams->hwnd, ConfigureDevicesDlgProc, (LPARAM)&data);
+ heap_free(username);
+ heap_free(data.usernames);
+ free(username);
+ free(data.usernames);
+
return DI_OK;
}
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 05a1dbbb2a1..daaaebdc0d0 100644
index c9466655ce4..e826cc89c1e 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -704,7 +704,7 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
@@ -397,7 +397,7 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
return hkey;
}
@@ -421,30 +363,18 @@ index 05a1dbbb2a1..daaaebdc0d0 100644
{
WCHAR *guid_str = NULL;
DIDEVICEINSTANCEW didev;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 8d3425483c2..a6f22b28bf3 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -132,6 +132,7 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h
index a9777dc8dbb..b90c0bc5200 100644
--- a/dlls/dinput/dinput_private.h
+++ b/dlls/dinput/dinput_private.h
@@ -76,6 +76,7 @@ extern void check_dinput_hooks( IDirectInputDevice8W *iface, BOOL acquired ) DEC
extern void check_dinput_events(void) DECLSPEC_HIDDEN;
extern HRESULT _configure_devices(IDirectInput8W *iface, LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) DECLSPEC_HIDDEN;
+extern HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUsername) DECLSPEC_HIDDEN;
extern BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdiaf, const WCHAR *username) DECLSPEC_HIDDEN;
extern HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index 85de9f79b81..2f40bfbca96 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -39,6 +39,7 @@
#define NONAMELESSUNION
#include "wine/debug.h"
+#include "wine/heap.h"
#include "wine/unicode.h"
#include "wine/asm.h"
#include "windef.h"
extern WCHAR* get_mapping_path(const WCHAR *device, const WCHAR *username) DECLSPEC_HIDDEN;
extern DWORD get_device_type(DWORD version, BOOL is_joystick) DECLSPEC_HIDDEN;
--
2.30.2
2.33.0

Some files were not shown because too many files have changed in this diff Show More