You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
51 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3fb6eb99a7 | ||
|
2677a11f41 | ||
|
6fd31b354c | ||
|
4eaa5b69b8 | ||
|
feb91195ff | ||
|
164b361be6 | ||
|
6bc16f96f7 | ||
|
688eeca0be | ||
|
1af920f698 | ||
|
f3fd4a3903 | ||
|
56a387bf1d | ||
|
c7f16e15e7 | ||
|
5e9626af6c | ||
|
d1ea5ced2b | ||
|
8174243203 | ||
|
9e1a4bdb73 | ||
|
dbf2d00a9b | ||
|
c61d12592b | ||
|
7750a01cea | ||
|
e41287e81a | ||
|
4d66e1bf6b | ||
|
c4535e89f7 | ||
|
7f9b324dea | ||
|
d8c1599a49 | ||
|
47a1fa55d6 | ||
|
0ff86943ed | ||
|
f8851f16b0 | ||
|
7ed2565d7e | ||
|
013f32ceeb | ||
|
5f6802dae2 | ||
|
8a2658a2ce | ||
|
aae6c7b961 | ||
|
100f108822 | ||
|
640f5f7d0a | ||
|
a1db1dfc16 | ||
|
2771ab8cee | ||
|
fc40539f6d | ||
|
fdcc8bec48 | ||
|
3a06c15dd2 | ||
|
e7c298c616 | ||
|
7b01b9eb20 | ||
|
afb9dcf2a5 | ||
|
d918a0ca3f | ||
|
ad56d6b3d3 | ||
|
5f19a81589 | ||
|
1033d3990b | ||
|
a896148be0 | ||
|
ef11bb63ce | ||
|
f3b03ce5a1 | ||
|
4b48df5032 | ||
|
24319dc308 |
@@ -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
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0e65ed108eb8bab24668f9a58c5757a3ad36104f Mon Sep 17 00:00:00 2001
|
||||
From ffea83bdf88a4b7d35c2f9a7e1a773d3110b5771 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.
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
2 files changed, 48 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
index 5c4acb232a4..412f1dbbe19 100644
|
||||
index 71ea7b99c94..3e6c2d7688a 100644
|
||||
--- a/dlls/uiautomationcore/Makefile.in
|
||||
+++ b/dlls/uiautomationcore/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -17,10 +17,10 @@ index 5c4acb232a4..412f1dbbe19 100644
|
||||
IMPORTLIB = uiautomationcore
|
||||
+IMPORTS = uuid
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index 42014af6035..61e165d83c0 100644
|
||||
index 2dada95af80..a32ef552f15 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -121,5 +121,5 @@ index 42014af6035..61e165d83c0 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [51199] Add missing api-ms-win-core-psapi forwards
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -1,2 +1,3 @@
|
||||
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
|
||||
Depends: dinput-joy-mappings
|
||||
Disabled: True
|
||||
|
@@ -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
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [41317] dinput: Recalculated Axis after deadzone change.
|
@@ -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
|
||||
|
@@ -1 +1,2 @@
|
||||
Fixes: [34108] dinput: Improve support for user Joystick configuration.
|
||||
Disabled: True
|
||||
|
@@ -1,232 +0,0 @@
|
||||
From 5a3007325917b8818493fc2193019e829916b733 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Church <achurch@achurch.org>
|
||||
Date: Mon, 25 Feb 2019 11:23:12 +1100
|
||||
Subject: [PATCH] dinput: Allow reconnecting to disconnected joysticks
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=34297
|
||||
---
|
||||
dlls/dinput/joystick_linuxinput.c | 152 ++++++++++++++++++++++--------
|
||||
1 file changed, 115 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
|
||||
index 2b970271ec3..8e292904f78 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -84,6 +84,13 @@ struct wine_input_absinfo {
|
||||
LONG flat;
|
||||
};
|
||||
|
||||
+enum wine_joystick_linuxinput_fd_state {
|
||||
+ WINE_FD_STATE_CLOSED = 0, /* No device has been opened yet */
|
||||
+ WINE_FD_STATE_OK, /* File descriptor is open and ready for reading */
|
||||
+ WINE_FD_STATE_DISCONNECTED, /* Read error occurred; might be able to reopen later */
|
||||
+ WINE_FD_STATE_INVALID, /* Device is no longer available at original pathname */
|
||||
+};
|
||||
+
|
||||
/* implemented in effect_linuxinput.c */
|
||||
HRESULT linuxinput_create_effect(int* fd, REFGUID rguid, struct list *parent_list_entry, LPDIRECTINPUTEFFECT* peff);
|
||||
HRESULT linuxinput_get_info_A(int fd, REFGUID rguid, LPDIEFFECTINFOA info);
|
||||
@@ -122,6 +129,7 @@ struct JoystickImpl
|
||||
|
||||
/* joystick private */
|
||||
int joyfd;
|
||||
+ enum wine_joystick_linuxinput_fd_state joyfd_state;
|
||||
|
||||
int dev_axes_to_di[ABS_MAX];
|
||||
POINTL povs[4];
|
||||
@@ -411,6 +419,7 @@ static HRESULT alloc_device( REFGUID rguid, IDirectInputImpl *dinput, JoystickIm
|
||||
|
||||
newDevice->generic.joy_polldev = joy_polldev;
|
||||
newDevice->joyfd = -1;
|
||||
+ newDevice->joyfd_state = WINE_FD_STATE_CLOSED;
|
||||
newDevice->joydev = &joydevs[index];
|
||||
newDevice->generic.name = newDevice->joydev->name;
|
||||
list_init(&newDevice->ff_effects);
|
||||
@@ -589,6 +598,44 @@ static HRESULT joydev_create_device( IDirectInputImpl *dinput, REFGUID rguid, ID
|
||||
return DIERR_DEVICENOTREG;
|
||||
}
|
||||
|
||||
+static int joydev_open_evdev(JoystickImpl *This)
|
||||
+{
|
||||
+ int fd;
|
||||
+
|
||||
+ if ((fd = open(This->joydev->device, O_RDWR)) == -1)
|
||||
+ {
|
||||
+ if ((fd = open(This->joydev->device, O_RDONLY)) == -1)
|
||||
+ {
|
||||
+ /* Couldn't open the device at all */
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Couldn't open in r/w but opened in read-only. */
|
||||
+ WARN("Could not open %s in read-write mode. Force feedback will be disabled.\n", This->joydev->device);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ struct input_event event;
|
||||
+
|
||||
+ event.type = EV_FF;
|
||||
+ event.code = FF_GAIN;
|
||||
+ event.value = This->ff_gain;
|
||||
+ if (write(fd, &event, sizeof(event)) == -1)
|
||||
+ ERR("Failed to set gain (%i): %d %s\n", This->ff_gain, errno, strerror(errno));
|
||||
+ if (!This->ff_autocenter)
|
||||
+ {
|
||||
+ /* Disable autocenter. */
|
||||
+ event.code = FF_AUTOCENTER;
|
||||
+ event.value = 0;
|
||||
+ if (write(fd, &event, sizeof(event)) == -1)
|
||||
+ ERR("Failed disabling autocenter: %d %s\n", errno, strerror(errno));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
|
||||
const struct dinput_device joystick_linuxinput_device = {
|
||||
"Wine Linux-input joystick driver",
|
||||
@@ -612,40 +659,14 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
|
||||
return res;
|
||||
}
|
||||
|
||||
- if ((This->joyfd = open(This->joydev->device, O_RDWR)) == -1)
|
||||
+ if ((This->joyfd = joydev_open_evdev(This)) == -1)
|
||||
{
|
||||
- if ((This->joyfd = open(This->joydev->device, O_RDONLY)) == -1)
|
||||
- {
|
||||
- /* Couldn't open the device at all */
|
||||
- ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno));
|
||||
- IDirectInputDevice2WImpl_Unacquire(iface);
|
||||
- return DIERR_NOTFOUND;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Couldn't open in r/w but opened in read-only. */
|
||||
- WARN("Could not open %s in read-write mode. Force feedback will be disabled.\n", This->joydev->device);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- struct input_event event;
|
||||
-
|
||||
- event.type = EV_FF;
|
||||
- event.code = FF_GAIN;
|
||||
- event.value = This->ff_gain;
|
||||
- if (write(This->joyfd, &event, sizeof(event)) == -1)
|
||||
- ERR("Failed to set gain (%i): %d %s\n", This->ff_gain, errno, strerror(errno));
|
||||
- if (!This->ff_autocenter)
|
||||
- {
|
||||
- /* Disable autocenter. */
|
||||
- event.code = FF_AUTOCENTER;
|
||||
- event.value = 0;
|
||||
- if (write(This->joyfd, &event, sizeof(event)) == -1)
|
||||
- ERR("Failed disabling autocenter: %d %s\n", errno, strerror(errno));
|
||||
- }
|
||||
+ ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno));
|
||||
+ IDirectInputDevice2WImpl_Unacquire(iface);
|
||||
+ return DIERR_NOTFOUND;
|
||||
}
|
||||
|
||||
+ This->joyfd_state = WINE_FD_STATE_OK;
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
@@ -677,6 +698,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
|
||||
|
||||
close(This->joyfd);
|
||||
This->joyfd = -1;
|
||||
+ This->joyfd_state = WINE_FD_STATE_CLOSED;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -715,23 +737,79 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
struct input_event ie;
|
||||
JoystickImpl *This = impl_from_IDirectInputDevice8W( iface );
|
||||
|
||||
- if (This->joyfd==-1)
|
||||
- return;
|
||||
+ if (This->joyfd == -1)
|
||||
+ {
|
||||
+ int fd;
|
||||
+ char namebuf[MAX_PATH + 8]; /* 8 == strlen(EVDEVDRIVER) */
|
||||
+
|
||||
+ if (This->joyfd_state != WINE_FD_STATE_DISCONNECTED)
|
||||
+ return;
|
||||
+ /* Try to reconnect to the device. */
|
||||
+ fd = joydev_open_evdev(This);
|
||||
+ if (fd == -1)
|
||||
+ return;
|
||||
+ namebuf[sizeof(namebuf) - strlen(EVDEVDRIVER) - 1] = 0;
|
||||
+ if (ioctl(fd, EVIOCGNAME(sizeof(namebuf) - strlen(EVDEVDRIVER) - 1), namebuf) == -1)
|
||||
+ {
|
||||
+ /* Couldn't get the name; assume it's a different device. */
|
||||
+ ERR("EVIOCGNAME(%s) failed: %d %s", This->joydev->device, errno, strerror(errno));
|
||||
+ This->joyfd_state = WINE_FD_STATE_INVALID;
|
||||
+ return;
|
||||
+ }
|
||||
+ strcat(namebuf, EVDEVDRIVER); /* Guaranteed to be safe. */
|
||||
+ if (strcmp(namebuf, This->joydev->name) != 0)
|
||||
+ {
|
||||
+ ERR("Device %s changed from \"%s\" to \"%s\"! Can't reconnect.\n", This->joydev->device, This->joydev->name, namebuf);
|
||||
+ This->joyfd_state = WINE_FD_STATE_INVALID;
|
||||
+ return;
|
||||
+ }
|
||||
+ if (InterlockedCompareExchange(&This->joyfd, fd, -1) == -1)
|
||||
+ {
|
||||
+ This->joyfd_state = WINE_FD_STATE_OK;
|
||||
+ TRACE("Reconnected to \"%s\" on %s", This->joydev->name, This->joydev->device);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Somebody beat us to it! Throw away our fd and use theirs. */
|
||||
+ close(fd);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
while (1)
|
||||
{
|
||||
LONG value = 0;
|
||||
int inst_id = -1;
|
||||
+ int result;
|
||||
|
||||
plfd.fd = This->joyfd;
|
||||
plfd.events = POLLIN;
|
||||
|
||||
- if (poll(&plfd,1,0) != 1)
|
||||
- return;
|
||||
+ result = poll(&plfd,1,0);
|
||||
+ if (result != 1)
|
||||
+ {
|
||||
+ if (result == -1)
|
||||
+ {
|
||||
+ ERR("poll failed: %d %s\n", errno, strerror(errno));
|
||||
+ close(This->joyfd);
|
||||
+ This->joyfd = -1;
|
||||
+ This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
/* we have one event, so we can read */
|
||||
- if (sizeof(ie)!=read(This->joyfd,&ie,sizeof(ie)))
|
||||
- return;
|
||||
+ result = read(This->joyfd,&ie,sizeof(ie));
|
||||
+ if (result != sizeof(ie))
|
||||
+ {
|
||||
+ if (result == -1)
|
||||
+ {
|
||||
+ ERR("read failed: %d %s\n", errno, strerror(errno));
|
||||
+ close(This->joyfd);
|
||||
+ This->joyfd = -1;
|
||||
+ This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
TRACE("input_event: type %d, code %d, value %d\n",ie.type,ie.code,ie.value);
|
||||
switch (ie.type) {
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [34297] dinput: Allow reconnecting to disconnected joysticks
|
@@ -1,4 +1,4 @@
|
||||
From 2c404d618908f4655623611ce720b6b27d0c1de6 Mon Sep 17 00:00:00 2001
|
||||
From 58773ad5cf6a79a6ec4fc2856aeb5fdf3f877368 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Church <achurch@achurch.org>
|
||||
Date: Mon, 25 Feb 2019 11:21:03 +1100
|
||||
Subject: [PATCH] dinput: Allow remapping of joystick buttons
|
||||
@@ -18,10 +18,10 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
|
||||
5 files changed, 42 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
|
||||
index 2354ff3b822..36086f0035f 100644
|
||||
index c85fda5cddb..21c81b0b683 100644
|
||||
--- a/dlls/dinput/joystick.c
|
||||
+++ b/dlls/dinput/joystick.c
|
||||
@@ -1034,6 +1034,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
@@ -921,6 +921,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
int tokens = 0;
|
||||
int axis = 0;
|
||||
int pov = 0;
|
||||
@@ -29,7 +29,7 @@ index 2354ff3b822..36086f0035f 100644
|
||||
|
||||
get_app_key(&hkey, &appkey);
|
||||
|
||||
@@ -1045,6 +1046,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
@@ -932,6 +933,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ index 2354ff3b822..36086f0035f 100644
|
||||
if (!This->axis_map) return DIERR_OUTOFMEMORY;
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
|
||||
index ec4cb94c034..7dc9deff8c4 100644
|
||||
index 5b54e352c20..7a7a59bcb58 100644
|
||||
--- a/dlls/dinput/joystick_linux.c
|
||||
+++ b/dlls/dinput/joystick_linux.c
|
||||
@@ -856,10 +856,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
jse.type,jse.number,jse.value);
|
||||
if (jse.type & JS_EVENT_BUTTON)
|
||||
{
|
||||
@@ -85,10 +85,10 @@ index ec4cb94c034..7dc9deff8c4 100644
|
||||
else if (jse.type & JS_EVENT_AXIS)
|
||||
{
|
||||
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
|
||||
index ef7b160ba58..7830cce3ced 100644
|
||||
index e3876a97b7f..aa56aa28d08 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -908,6 +908,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
@@ -820,6 +820,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
if (btn & 0x80)
|
||||
{
|
||||
btn &= 0x7F;
|
||||
@@ -98,20 +98,20 @@ index ef7b160ba58..7830cce3ced 100644
|
||||
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
|
||||
}
|
||||
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
|
||||
index 174a78b7fd4..60e3967d921 100644
|
||||
index 9ee45e8a445..f88ee566781 100644
|
||||
--- a/dlls/dinput/joystick_osx.c
|
||||
+++ b/dlls/dinput/joystick_osx.c
|
||||
@@ -844,6 +844,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
|
||||
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
|
||||
@@ -891,6 +891,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
|
||||
TRACE("val %d oldVal %d newVal %d\n", val, oldVal, newVal);
|
||||
if (oldVal != newVal)
|
||||
{
|
||||
+ button_idx = device->generic.button_map[button_idx];
|
||||
+
|
||||
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
|
||||
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
|
||||
}
|
||||
if (device->generic.base.hEvent)
|
||||
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
|
||||
index 0f191787158..606475759ef 100644
|
||||
index 32265edef03..fb0edfa7878 100644
|
||||
--- a/dlls/dinput/joystick_private.h
|
||||
+++ b/dlls/dinput/joystick_private.h
|
||||
@@ -33,6 +33,9 @@
|
||||
@@ -133,5 +133,5 @@ index 0f191787158..606475759ef 100644
|
||||
|
||||
joy_polldev_handler *joy_polldev;
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
Fixes: [35815] dinput: Allow remapping of joystick buttons.
|
||||
|
||||
Disabled: True
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user