Compare commits

...

73 Commits
v6.21 ... v7.2

Author SHA1 Message Date
Alistair Leslie-Hughes
68441b1d95 Release v7.2 2022-02-13 18:04:39 +11:00
Alistair Leslie-Hughes
abc1c143f3 Merge pull request #81 from Gcenx/macOS-updates
Mac os updates
2022-02-13 11:37:27 +11:00
Gcenx
316d085a4b macOS.yml: Temp disabled parallel builds
brew bumped mingw-w64 formula resource binutils to 2.38 has a regression in dlltool see https://lists.gnu.org/archive/html/bug-binutils/2022-02/msg00166.html

Not building in parallel works around this problem
2022-02-12 16:48:09 -05:00
Gcenx
2e7e083424 macOS.yml: Update dependencies for wine-7.x 2022-02-12 16:01:18 -05:00
Zebediah Figura
b9f7ec5ccf Rebase against d318f43559dbb0093e22bab1aa0eb9dc01170cc2. 2022-02-11 23:53:24 -06:00
Alistair Leslie-Hughes
b5193cb799 Rebase against d9f3ea328785d4146a095ce2efbdbb7c1f69f1cf. 2022-02-10 13:10:13 +11:00
Alistair Leslie-Hughes
00b2e468d3 Rebase against 576cdea0d75498ed948d0ba66a3451ea426f7935. 2022-02-09 10:41:47 +11:00
Zebediah Figura
aec9113618 eventfd_synchronization: Clear the message queue eventfd after modifying masks. 2022-02-07 23:54:36 -06:00
Zebediah Figura
773483f7f5 Rebase against 54b8c8c7eaafd19780cb4d91b763fe2f20327f50. 2022-02-07 23:49:59 -06:00
Alistair Leslie-Hughes
54850aa1ff Added wined3d-rotate-WINED3D_SWAP_EFFECT_DISCARD patchset 2022-02-05 13:01:18 +11:00
Alistair Leslie-Hughes
f538f2e2db Rebase against 4364ff8d5c0387edd6fae142affe8e844b291518. 2022-02-05 11:18:52 +11:00
Alistair Leslie-Hughes
80c80bbaa8 Rebase against cc91ba6da75ab82d249a5fea3b00abded5021585. 2022-02-04 12:28:48 +11:00
Alistair Leslie-Hughes
136d5e3400 Rebase against adda27cdb82fd40ef71e554b8ba17244cb871710. 2022-02-03 11:11:23 +11:00
Alistair Leslie-Hughes
ecf05ee19e Rebase against 9fea10cceb0fbc0cf3111f462c98f7b994d5c893. 2022-02-01 09:52:01 +11:00
Alistair Leslie-Hughes
ec936167b3 Updated xactengine3_7-callbacks patchset 2022-01-31 07:46:47 +11:00
Gabriel Ivăncescu
c437a01e2f winepulse-PulseAudio_Support: Rebase and re-enable. 2022-01-29 21:40:07 -06:00
Alistair Leslie-Hughes
8630febc5c Updated xactengine3_7-callbacks patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=52478
2022-01-30 10:54:20 +11:00
Alistair Leslie-Hughes
f5ca8f5a0c Release v7.1 2022-01-29 09:47:35 +11:00
Alistair Leslie-Hughes
cafb155af5 Rebase against 85cb1ff91ed4d48559c5500e2ccb0b15801edc05. 2022-01-28 12:48:29 +11:00
Alistair Leslie-Hughes
b1a5648b37 Rebase against 9a4992173e165b04ff79d5283f81064f7585e7ad. 2022-01-27 11:50:15 +11:00
Alistair Leslie-Hughes
b8a377e8d7 Updated ws2_32-SIO_IDEAL_SEND_BACKLOG_QUERY patchset
macos doesn't support SO_PROTOCOL.
2022-01-26 21:10:50 +11:00
Alistair Leslie-Hughes
5b0e78d2c0 Rebase against 1d178982ae5a73b18f367026c8689b56789c39fd. 2022-01-26 10:11:42 +11:00
Alistair Leslie-Hughes
c87f47bcba Updated nvcuda-CUDA_Support patchset 2022-01-26 08:36:09 +11:00
Alistair Leslie-Hughes
d5e8d145c8 Added wined3d-bindless-texture patchset 2022-01-24 09:14:30 +11:00
Alistair Leslie-Hughes
2239795e43 Added xactengine3_7-callbacks patchset 2022-01-24 08:30:24 +11:00
Alistair Leslie-Hughes
766e1ee8f8 Added ws2_32-SIO_IDEAL_SEND_BACKLOG_QUERY patchset 2022-01-23 12:18:17 +11:00
Alistair Leslie-Hughes
95bf669895 Rebase against 6fe37b465649bfff2085ea871ffad0fff7ee7d61. 2022-01-21 09:10:48 +11:00
Alistair Leslie-Hughes
2fc92f8ba6 Release v7.0 2022-01-19 08:16:49 +11:00
Alistair Leslie-Hughes
0111d074e6 Release v7.0-rc6 2022-01-15 13:32:32 +11:00
Alistair Leslie-Hughes
b4028037d9 Rebase against 7aaeec35e2d7cc799461858edb788e412e9a1fbe. 2022-01-13 12:59:06 +11:00
Alistair Leslie-Hughes
e1c496b21e updated nvcuda-CUDA_Support patchset
Thanks Sveinar Søpler.
2022-01-12 11:35:55 +11:00
Alistair Leslie-Hughes
ee4ca71a7f Release v7.0-rc5 2022-01-08 10:48:47 +11:00
Alistair Leslie-Hughes
3b01c6e2c5 Updated nvcuda-CUDA_Support patchset
This patch add functions for CUDA 10, and reorders
them to be easier to update in future.
2022-01-05 17:03:33 +11:00
Alistair Leslie-Hughes
98c906f843 Rebase against 529e4154a34a5a774fe7036552ffbb060740da90. 2022-01-04 11:45:19 +11:00
Alistair Leslie-Hughes
a43d3ddd1c Release v7.0-rc4 2022-01-03 12:17:06 +11:00
Alistair Leslie-Hughes
78d28293de Rebase against 2318484e1e33cb30f00eb9a62cb9aa5f83e5dc99. 2022-01-03 12:10:34 +11:00
Alistair Leslie-Hughes
440e5eee17 Rebase against b173a96237b1f1c02c642f3d4a57ecb507ebc664. 2021-12-29 10:57:36 +11:00
Alistair Leslie-Hughes
93e94fcbc0 Release v7.0-rc3 2021-12-27 11:27:52 +11:00
Alistair Leslie-Hughes
fa5989b7aa Rebase against d03984709d87d6eaa0e2e7746f0db5d8fdf81b5a. 2021-12-23 10:22:27 +11:00
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
166 changed files with 4906 additions and 5719 deletions

View File

@@ -17,14 +17,11 @@ jobs:
brew update
brew install --cask xquartz
brew install bison \
faudio \
gphoto2 \
gst-plugins-base \
jxrlib \
little-cms2 \
mingw-w64 \
molten-vk \
mpg123
sdl2
- name: Add bison & krb5 to $PATH
run: |
@@ -64,9 +61,10 @@ jobs:
--x-lib=/opt/X11/lib
- name: Build wine64
# mingw-w64 brew formula bumped binutils 2.38 causing a regression in parallel builds
run: |
cd $GITHUB_WORKSPACE/wine
make -j$(sysctl -n hw.ncpu 2>/dev/null)
make
wine-devel:
runs-on: macos-latest
@@ -124,6 +122,7 @@ jobs:
--x-lib=/opt/X11/lib
- name: Build wine64
# mingw-w64 brew formula bumped binutils 2.38 causing a regression in parallel builds
run: |
cd $GITHUB_WORKSPACE/wine
make -j$(sysctl -n hw.ncpu 2>/dev/null)
make

View File

@@ -1,18 +1,17 @@
From b51fdc7e211f676d169c937209bf689e57252c5d Mon Sep 17 00:00:00 2001
From 7e3c4d732bacaeaf37ab8f32a7548715825eff4d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:58:40 +0100
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
---
dlls/dwrite/font.c | 4 ++--
dlls/dwrite/layout.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
dlls/dwrite/font.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index aa51c744297..7cad015480f 100644
index 2296c74c1e3..2b5e18aab19 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -2130,7 +2130,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
@@ -2514,7 +2514,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
@@ -21,7 +20,7 @@ index aa51c744297..7cad015480f 100644
}
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -2138,7 +2138,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -2522,7 +2522,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
@@ -30,19 +29,6 @@ index aa51c744297..7cad015480f 100644
}
static struct dwrite_fontfacereference *unsafe_impl_from_IDWriteFontFaceReference(IDWriteFontFaceReference *iface)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 1f6201a6a93..35791d5c22e 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -5886,7 +5886,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
{
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
- CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
}
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight,
--
2.29.2
2.34.1

View File

@@ -1,4 +1,4 @@
From a349cc8bdcc3a083ea507dbbdeba9053e3a338e4 Mon Sep 17 00:00:00 2001
From bd6e11aee0fbe2f880f87bec8b3d145b3de15dab Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 23:08:30 +0100
Subject: [PATCH] include: Check element type in CONTAINING_RECORD and similar
@@ -31,31 +31,31 @@ index b4d681fe0f3..287ad394fae 100644
#endif /* __WINE_SERVER_LIST_H */
diff --git a/include/wine/rbtree.h b/include/wine/rbtree.h
index 8aae29c8c10..330b3e8fbc9 100644
index 4e86f3cfb84..694dc039cb1 100644
--- a/include/wine/rbtree.h
+++ b/include/wine/rbtree.h
@@ -23,8 +23,14 @@
#ifndef __WINE_WINE_RBTREE_H
#define __WINE_WINE_RBTREE_H
-#define WINE_RB_ENTRY_VALUE(element, type, field) \
-#define RB_ENTRY_VALUE(element, type, field) \
- ((type *)((char *)(element) - offsetof(type, field)))
+#ifdef __GNUC__
+# define WINE_RB_ENTRY_VALUE(element, type, field) ({ \
+# define RB_ENTRY_VALUE(element, type, field) ({ \
+ const typeof(((type *)0)->field) *__ptr = (element); \
+ (type *)((char *)__ptr - offsetof(type, field)); })
+#else
+# define WINE_RB_ENTRY_VALUE(element, type, field) \
+# define RB_ENTRY_VALUE(element, type, field) \
+ ((type *)((char *)(element) - offsetof(type, field)))
+#endif
struct wine_rb_entry
struct rb_entry
{
diff --git a/include/winnt.h b/include/winnt.h
index 46e17c546a7..d5c65d2017b 100644
index 9296a3dc555..c7406b8db39 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -793,8 +793,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
@@ -840,8 +840,14 @@ typedef struct _WIN32_MEMORY_RANGE_ENTRY
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
#define RTL_SIZEOF_THROUGH_FIELD(type, field) (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
@@ -73,5 +73,5 @@ index 46e17c546a7..d5c65d2017b 100644
#define ARRAYSIZE(x) (sizeof(x) / sizeof((x)[0]))
#ifdef __WINESRC__
--
2.26.2
2.34.1

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,36 +0,0 @@
From 5d62ab1fd576aa9e11a387a6b2a1b250aecc1803 Mon Sep 17 00:00:00 2001
From: Eric Pouech <eric.pouech@gmail.com>
Date: Fri, 5 Nov 2021 07:56:04 +1100
Subject: [PATCH] configure.ac: let dwarf4 be Wine's default debug format
---
configure.ac | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 57bd9a6f9ec..0196af56783 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1051,8 +1051,7 @@ then
if test "x$ac_debug_format_seen" = x
then
case $CROSSDEBUG in
- *dwarf) WINE_TRY_CROSSCFLAGS([-gdwarf-2])
- WINE_TRY_CROSSCFLAGS([-gstrict-dwarf]) ;;
+ *dwarf) WINE_TRY_CROSSCFLAGS([-gdwarf-4]) ;;
pdb) WINE_TRY_CROSSCFLAGS([-gcodeview]) ;;
esac
fi
@@ -1865,8 +1864,7 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
done
if test "x$ac_debug_format_seen" = xdefault
then
- WINE_TRY_CFLAGS([-gdwarf-2])
- WINE_TRY_CFLAGS([-gstrict-dwarf])
+ WINE_TRY_CFLAGS([-gdwarf-4])
fi
dnl Disable gcc builtins except for Mingw
--
2.33.0

View File

@@ -1,4 +1,4 @@
From e3a6b75cbce69e18742135fdd8e105132d8ca9dd Mon Sep 17 00:00:00 2001
From ea3579b5b3d701647f5c7f16de658f1cd7fe876d 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
@@ -38,7 +38,7 @@ index ccd4319ace2..6854c73ebcb 100644
EXTRADLLFLAGS = -Wb,--prefer-native
diff --git a/dlls/d3dx11_43/main.c b/dlls/d3dx11_43/main.c
index 950f6d76f5c..00c1db35e42 100644
index 5dad027864f..00c1db35e42 100644
--- a/dlls/d3dx11_43/main.c
+++ b/dlls/d3dx11_43/main.c
@@ -66,12 +66,3 @@ HRESULT WINAPI D3DX11GetImageInfoFromFileW(const WCHAR *filename, ID3DX11ThreadP
@@ -49,13 +49,13 @@ index 950f6d76f5c..00c1db35e42 100644
-HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
- D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
-{
- FIXME("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p stub!\n",
- FIXME("src_data %p, src_data_size %Iu, pump %p, img_info %p, hresult %p stub!\n",
- src_data, src_data_size, pump, img_info, hresult);
-
- return E_NOTIMPL;
-}
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
index ee6808d76d6..8addf4f84d3 100644
index 81ac8ee6db7..6881eec107d 100644
--- a/dlls/d3dx11_43/texture.c
+++ b/dlls/d3dx11_43/texture.c
@@ -15,14 +15,190 @@
@@ -155,7 +155,7 @@ index ee6808d76d6..8addf4f84d3 100644
+ GUID container_format;
+ HRESULT hr;
+
+ TRACE("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p.\n",
+ TRACE("src_data %p, src_data_size %Iu, pump %p, img_info %p, hresult %p.\n",
+ src_data, src_data_size, pump, img_info, hresult);
+
+ if (!src_data || !src_data_size || !img_info)
@@ -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.33.0
2.34.1

View File

@@ -1,4 +1,4 @@
From 2f65959901f62bfc6a48c683e6eaa5d6ed5f7416 Mon Sep 17 00:00:00 2001
From 5be34c9e347d4379179eeba742b25986152d4e4f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 3 Aug 2021 11:13:18 +1000
Subject: [PATCH] d3dx11_42: Implement D3DX11CreateTextureFromMemory
@@ -9,7 +9,7 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
1 file changed, 342 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
index 8addf4f84d3..f47b8583c6c 100644
index 6881eec107d..b91bd8d881a 100644
--- a/dlls/d3dx11_43/texture.c
+++ b/dlls/d3dx11_43/texture.c
@@ -22,6 +22,7 @@
@@ -239,7 +239,7 @@ index 8addf4f84d3..f47b8583c6c 100644
+ SIZE_T src_data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
ID3D11Resource **texture, HRESULT *hresult)
{
- FIXME("device %p, data %p, data_size %lu, load_info %p, pump %p, texture %p, hresult %p stub.\n",
- FIXME("device %p, data %p, data_size %Iu, load_info %p, pump %p, texture %p, hresult %p stub.\n",
- device, data, data_size, load_info, pump, texture, hresult);
+ unsigned int frame_count, width, height, stride, frame_size;
+ IWICFormatConverter *converter = NULL;
@@ -259,7 +259,7 @@ index 8addf4f84d3..f47b8583c6c 100644
+ HRESULT hr;
- return E_NOTIMPL;
+ TRACE("device %p, src_data %p, src_data_size %lu, load_info %p, pump %p, texture %p, hresult %p.\n",
+ TRACE("device %p, data %p, data_size %Iu, load_info %p, pump %p, texture %p, hresult %p.\n",
+ device, src_data, src_data_size, load_info, pump, texture, hresult);
+
+ if (!src_data || !src_data_size || !texture)
@@ -391,5 +391,5 @@ index 8addf4f84d3..f47b8583c6c 100644
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
--
2.30.2
2.34.1

View File

@@ -1,317 +0,0 @@
From a8d19eb67828f3c4f157f0734d0d22c47cc11882 Mon Sep 17 00:00:00 2001
From: Andrey Gusev <andrey.goosev@gmail.com>
Date: Mon, 17 Dec 2018 12:23:40 +1100
Subject: [PATCH] d3dx9_*: Add D3DXSHProjectCubeMap stub
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46284
---
dlls/d3dx9_24/d3dx9_24.spec | 2 +-
dlls/d3dx9_25/d3dx9_25.spec | 2 +-
dlls/d3dx9_26/d3dx9_26.spec | 2 +-
dlls/d3dx9_27/d3dx9_27.spec | 2 +-
dlls/d3dx9_28/d3dx9_28.spec | 2 +-
dlls/d3dx9_29/d3dx9_29.spec | 2 +-
dlls/d3dx9_30/d3dx9_30.spec | 2 +-
dlls/d3dx9_31/d3dx9_31.spec | 2 +-
dlls/d3dx9_32/d3dx9_32.spec | 2 +-
dlls/d3dx9_33/d3dx9_33.spec | 2 +-
dlls/d3dx9_34/d3dx9_34.spec | 2 +-
dlls/d3dx9_35/d3dx9_35.spec | 2 +-
dlls/d3dx9_36/math.c | 14 ++++++++++++++
dlls/d3dx9_37/d3dx9_37.spec | 2 +-
dlls/d3dx9_38/d3dx9_38.spec | 2 +-
dlls/d3dx9_39/d3dx9_39.spec | 2 +-
dlls/d3dx9_40/d3dx9_40.spec | 2 +-
dlls/d3dx9_41/d3dx9_41.spec | 2 +-
dlls/d3dx9_42/d3dx9_42.spec | 2 +-
dlls/d3dx9_43/d3dx9_43.spec | 2 +-
include/d3dx9math.h | 1 +
21 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
index 7002e2b..06fb3ca 100644
--- a/dlls/d3dx9_24/d3dx9_24.spec
+++ b/dlls/d3dx9_24/d3dx9_24.spec
@@ -256,7 +256,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
index 3010005..e7b5f6b 100644
--- a/dlls/d3dx9_25/d3dx9_25.spec
+++ b/dlls/d3dx9_25/d3dx9_25.spec
@@ -256,7 +256,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec
index fe641a7..c4a6c9f 100644
--- a/dlls/d3dx9_26/d3dx9_26.spec
+++ b/dlls/d3dx9_26/d3dx9_26.spec
@@ -260,7 +260,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec
index fe641a7..c4a6c9f 100644
--- a/dlls/d3dx9_27/d3dx9_27.spec
+++ b/dlls/d3dx9_27/d3dx9_27.spec
@@ -260,7 +260,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec
index acbcf26..480396b 100644
--- a/dlls/d3dx9_28/d3dx9_28.spec
+++ b/dlls/d3dx9_28/d3dx9_28.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec
index acbcf26..480396b 100644
--- a/dlls/d3dx9_29/d3dx9_29.spec
+++ b/dlls/d3dx9_29/d3dx9_29.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec
index fdf5ee4..09014db 100644
--- a/dlls/d3dx9_30/d3dx9_30.spec
+++ b/dlls/d3dx9_30/d3dx9_30.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec
index ed842cd..3506942 100644
--- a/dlls/d3dx9_31/d3dx9_31.spec
+++ b/dlls/d3dx9_31/d3dx9_31.spec
@@ -262,7 +262,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec
index af5624c..4d24919 100644
--- a/dlls/d3dx9_32/d3dx9_32.spec
+++ b/dlls/d3dx9_32/d3dx9_32.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec
index af5624c..4d24919 100644
--- a/dlls/d3dx9_33/d3dx9_33.spec
+++ b/dlls/d3dx9_33/d3dx9_33.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec
index af5624c..4d24919 100644
--- a/dlls/d3dx9_34/d3dx9_34.spec
+++ b/dlls/d3dx9_34/d3dx9_34.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec
index af5624c..4d24919 100644
--- a/dlls/d3dx9_35/d3dx9_35.spec
+++ b/dlls/d3dx9_35/d3dx9_35.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index 8909c3c..bc1a7fc 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -3007,6 +3007,20 @@ static void rotate_X(FLOAT *out, UINT order, FLOAT a, FLOAT *in)
out[35] = 0.9057110548f * in[31] - 0.4192627370f * in[33] + 0.0624999329f * in[35];
}
+HRESULT WINAPI D3DXSHProjectCubeMap(UINT order, IDirect3DCubeTexture9 *cubemap, FLOAT *rout, FLOAT *gout, FLOAT *bout)
+{
+ FIXME("order %u, cubemap %p, rout %p, gout %p, bout %p: stub!\n", order, cubemap, rout, gout, bout);
+
+ if(!cubemap || order < D3DXSH_MINORDER || order > D3DXSH_MAXORDER)
+ return D3DERR_INVALIDCALL;
+
+ *rout = 0.0f;
+ *gout = 0.0f;
+ *bout = 0.0f;
+
+ return D3D_OK;
+}
+
FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in)
{
FLOAT alpha, beta, gamma, sinb, temp[36], temp1[36];
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
index de8b12c..10395ff 100644
--- a/dlls/d3dx9_37/d3dx9_37.spec
+++ b/dlls/d3dx9_37/d3dx9_37.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec
index de8b12c..10395ff 100644
--- a/dlls/d3dx9_38/d3dx9_38.spec
+++ b/dlls/d3dx9_38/d3dx9_38.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec
index de8b12c..10395ff 100644
--- a/dlls/d3dx9_39/d3dx9_39.spec
+++ b/dlls/d3dx9_39/d3dx9_39.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec
index de8b12c..10395ff 100644
--- a/dlls/d3dx9_40/d3dx9_40.spec
+++ b/dlls/d3dx9_40/d3dx9_40.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec
index de8b12c..10395ff 100644
--- a/dlls/d3dx9_41/d3dx9_41.spec
+++ b/dlls/d3dx9_41/d3dx9_41.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec
index c3bd9d5..5524bd0 100644
--- a/dlls/d3dx9_42/d3dx9_42.spec
+++ b/dlls/d3dx9_42/d3dx9_42.spec
@@ -262,7 +262,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec
index c3bd9d5..5524bd0 100644
--- a/dlls/d3dx9_43/d3dx9_43.spec
+++ b/dlls/d3dx9_43/d3dx9_43.spec
@@ -262,7 +262,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/include/d3dx9math.h b/include/d3dx9math.h
index bf03ca3..9296400d 100644
--- a/include/d3dx9math.h
+++ b/include/d3dx9math.h
@@ -396,6 +396,7 @@ HRESULT WINAPI D3DXSHEvalSphericalLight(UINT order, const D3DXVECTOR3 *dir, FLOA
FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, const FLOAT *a, const FLOAT *b);
FLOAT* WINAPI D3DXSHMultiply3(FLOAT *out, const FLOAT *a, const FLOAT *b);
FLOAT* WINAPI D3DXSHMultiply4(FLOAT *out, const FLOAT *a, const FLOAT *b);
+HRESULT WINAPI D3DXSHProjectCubeMap(UINT order, IDirect3DCubeTexture9 *cubemap, FLOAT *rout, FLOAT *gout, FLOAT *bout);
FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in);
FLOAT* WINAPI D3DXSHRotateZ(FLOAT *out, UINT order, FLOAT angle, const FLOAT *in);
FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, const FLOAT *a, const FLOAT scale);
--
1.9.1

View File

@@ -1 +0,0 @@
Fixes: [46284] Add D3DXSHProjectCubeMap stub

View File

@@ -1,4 +1,4 @@
From b094a7cf3f804ea40e5bd05ad738c48b5464e0bb Mon Sep 17 00:00:00 2001
From 8c78d1203c965927d0a0e6fcde31dd651cc704db 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,7 +9,7 @@ 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 22be2612eeb..f3f31eb3671 100644
index 22be2612eeb..2e11bb2b62d 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -2,7 +2,7 @@ MODULE = dbghelp.dll
@@ -22,10 +22,10 @@ index 22be2612eeb..f3f31eb3671 100644
C_SRCS = \
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 553b212c526..3584a27953e 100644
index 404c7c11dbb..e0779e4e3a7 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1451,6 +1451,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
@@ -1445,6 +1445,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)
@@ -34,5 +34,5 @@ index 553b212c526..3584a27953e 100644
}
--
2.33.0
2.34.1

View File

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

View File

@@ -1,45 +1,33 @@
From 2ff7da682aa87e09966fa0fb7c8846cd82bd1eea Mon Sep 17 00:00:00 2001
From e7104770d4b57539d5b64a67212504910692e920 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/dinput/tests/device8.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 6cc190ee7fb..2fd9329aa68 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));
@@ -364,12 +364,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;
@@ -380,8 +394,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
@@ -401,7 +418,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
@@ -436,7 +455,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
@@ -444,7 +463,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
@@ -464,15 +483,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 )
@@ -1935,13 +1959,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,
@@ -1973,6 +2002,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 %#lx\n", flags );
@@ -1990,6 +2027,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;
@@ -2022,12 +2060,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);
}
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 17deed193dd..3bfb34eb2ca 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -38,6 +38,8 @@ struct enum_data {
obj_df = malloc( sizeof(DIOBJECTDATAFORMAT) * num_actions );
diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c
index 2586736cb1d..e2be36ad7d3 100644
--- a/dlls/dinput/tests/device8.c
+++ b/dlls/dinput/tests/device8.c
@@ -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,9 +191,9 @@ 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);
ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%#lx\n", hr);
+ /* Test that after changing actionformat SetActionMap has effect and that second
+ * SetActionMap call with same empty actionformat has no effect */
@@ -235,8 +209,8 @@ 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)
"Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[1], af.rgoAction[1].dwObjID);
@@ -663,6 +676,43 @@ static void test_save_settings(void)
"Mapped incorrectly expected: 0x%#lx got: 0x%#lx\n", other_results[1], af.rgoAction[1].dwObjID);
ok (IsEqualGUID(&GUID_SysKeyboard, &af.rgoAction[1].guidInstance), "Action should be mapped to keyboard\n");
+ /* Save and load empty mapping */
@@ -280,5 +254,5 @@ index 17deed193dd..3bfb34eb2ca 100644
IDirectInput_Release(pDI);
}
--
2.30.2
2.34.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

View File

@@ -1,4 +1,4 @@
From 629a5f7eea3b17f56606d3b588a5fd96ded99fef Mon Sep 17 00:00:00 2001
From 571d437192d553b7a8aac6908f10728cd4d1a257 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 4 Oct 2019 16:24:06 +1000
Subject: [PATCH] dinput: Dont allow Fixed actions to be changed.
@@ -8,7 +8,7 @@ Subject: [PATCH] dinput: Dont allow Fixed actions to be changed.
1 file changed, 3 insertions(+)
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
index cd2c4b921e7..bfb535c9b2a 100644
index bb0b2c03c47..4b6cba26843 100644
--- a/dlls/dinput/config.c
+++ b/dlls/dinput/config.c
@@ -91,6 +91,7 @@ static BOOL CALLBACK collect_devices(LPCDIDEVICEINSTANCEW lpddi, IDirectInputDev
@@ -19,7 +19,7 @@ index cd2c4b921e7..bfb535c9b2a 100644
user_af->rgoAction[j].u.lptszActionName = data->original_lpdiaf->rgoAction[j].u.lptszActionName;
}
IDirectInputDevice8_BuildActionMap(lpdid, user_af, data->usernames[i], 0);
@@ -334,6 +335,8 @@ static void assign_action(HWND dialog)
@@ -333,6 +334,8 @@ static void assign_action(HWND dialog)
if (old_action == action) return;
if (obj < 0) return;
@@ -29,5 +29,5 @@ index cd2c4b921e7..bfb535c9b2a 100644
/* Clear old action */
--
2.23.0
2.33.0

View File

@@ -1,42 +1,41 @@
From 75add3c0c65775eb3fa825aafbe46373c0bd08f1 Mon Sep 17 00:00:00 2001
From 98a9b8337d40c1f6df21227dff3d993f270aef46 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 24 May 2019 16:16:13 +1000
Subject: [PATCH] dinput: Allow mapping of controls based of Genre
type.
Subject: [PATCH] dinput: Allow mapping of controls based of Genre type.
---
dlls/dinput/device.c | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index c7e585c50f4..84a41996700 100644
index e826cc89c1e..a4815f24958 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -893,8 +893,15 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
@@ -1741,8 +1741,15 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
/* 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 ))
+ {
+ if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance) ||
+ (IsEqualGUID(&IID_NULL, &lpdiaf->rgoAction[i].guidInstance) &&
+ ((lpdiaf->rgoAction[i].dwSemantic & lpdiaf->dwGenre) == lpdiaf->dwGenre ||
+ (lpdiaf->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
+ if (IsEqualGUID(&impl->guid, &format->rgoAction[i].guidInstance) ||
+ (IsEqualGUID(&IID_NULL, &format->rgoAction[i].guidInstance) &&
+ ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
+ {
num_actions++;
+ }
+ }
/* 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;
@@ -934,7 +941,39 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
if (num_actions == 0 && format->dwCRC == new_crc && !(flags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
@@ -1779,7 +1786,39 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
action++;
}
+ else if ((lpdiaf->rgoAction[i].dwSemantic & lpdiaf->dwGenre) == lpdiaf->dwGenre ||
+ (lpdiaf->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
+ else if ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
+ {
+ DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
+ DWORD obj_id = semantic_to_obj_id(impl, format->rgoAction[i].dwSemantic);
+ DWORD type = DIDFT_GETTYPE(obj_id);
+ DWORD inst = DIDFT_GETINSTANCE(obj_id);
+ LPDIOBJECTDATAFORMAT obj;
@@ -50,8 +49,8 @@ index c7e585c50f4..84a41996700 100644
+ {
+ memcpy(&obj_df[action], obj, df->dwObjSize);
+
+ This->action_map[action].uAppData = lpdiaf->rgoAction[i].uAppData;
+ This->action_map[action].offset = offset;
+ impl->action_map[action].uAppData = format->rgoAction[i].uAppData;
+ impl->action_map[action].offset = offset;
+ obj_df[action].dwOfs = offset;
+ offset += (type & DIDFT_BUTTON) ? 1 : 4;
+
@@ -62,13 +61,13 @@ index c7e585c50f4..84a41996700 100644
+
+ if (action == 0)
+ {
+ HeapFree(GetProcessHeap(), 0, obj_df);
+ free( obj_df );
+ return DI_NOEFFECT;
}
+ data_format.dwNumObjs = action;
IDirectInputDevice8_SetDataFormat(iface, &data_format);
IDirectInputDevice8_SetDataFormat( iface, &data_format );
--
2.24.1
2.33.0

View File

@@ -1,2 +1,3 @@
Fixes: [34108] dinput: Improve support for user Joystick configuration.
Disabled: True
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
Fixes: [35815] dinput: Allow remapping of joystick buttons.

View File

@@ -1,137 +0,0 @@
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
Changed
- Change the array to store the origial button.
- Remove lookup loops.
- Changed max Buttons to 128 to match DIJOYSTATE2 structure.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
---
dlls/dinput/joystick.c | 29 +++++++++++++++++++++++++++++
dlls/dinput/joystick_linux.c | 7 +++++--
dlls/dinput/joystick_linuxinput.c | 2 ++
dlls/dinput/joystick_osx.c | 2 ++
dlls/dinput/joystick_private.h | 4 ++++
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index c85fda5cddb..21c81b0b683 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -921,6 +921,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
int tokens = 0;
int axis = 0;
int pov = 0;
+ int button;
get_app_key(&hkey, &appkey);
@@ -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);
}
+ for (button = 0; button < MAX_MAP_BUTTONS; button++)
+ This->button_map[button] = button;
+
+ if (!get_config_key(hkey, appkey, "ButtonMap", buffer, sizeof(buffer)))
+ {
+ static const char *delim = ",";
+ int button = 0;
+ char *token;
+
+ TRACE("ButtonMap = \"%s\"\n", buffer);
+ for (token = strtok(buffer, delim);
+ token != NULL && button < MAX_MAP_BUTTONS;
+ token = strtok(NULL, delim), button++)
+ {
+ char *s;
+ int value = strtol(token, &s, 10);
+ if (value < 0 || *s != '\0')
+ {
+ ERR("invalid button number: \"%s\"", token);
+ }
+ else
+ {
+ TRACE("mapping physical button %d to DInput button %d", value, button);
+ This->button_map[value] = button;
+ }
+ }
+ }
+
This->axis_map = HeapAlloc(GetProcessHeap(), 0, This->device_axis_count * sizeof(int));
if (!This->axis_map) return DIERR_OUTOFMEMORY;
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index 5b54e352c20..7a7a59bcb58 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON)
{
+ int button;
if (jse.number >= This->generic.devcaps.dwButtons) return;
- inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON;
- This->generic.js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00;
+ button = This->generic.button_map[jse.number];
+
+ inst_id = DIDFT_MAKEINSTANCE(button) | DIDFT_PSHBUTTON;
+ This->generic.js.rgbButtons[button] = value = jse.value ? 0x80 : 0x00;
}
else if (jse.type & JS_EVENT_AXIS)
{
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index e3876a97b7f..aa56aa28d08 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -820,6 +820,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
if (btn & 0x80)
{
btn &= 0x7F;
+ btn = This->generic.button_map[btn];
+
inst_id = DIDFT_MAKEINSTANCE(btn) | DIDFT_PSHBUTTON;
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 9ee45e8a445..f88ee566781 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -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 32265edef03..fb0edfa7878 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@
#define MAX_PROPS 164
struct JoystickGenericImpl;
+/* Number of buttons for which to allow remapping */
+#define MAX_MAP_BUTTONS 128
+
typedef void joy_polldev_handler( IDirectInputDevice8W *iface );
typedef struct JoystickGenericImpl
@@ -47,6 +50,7 @@ typedef struct JoystickGenericImpl
char *name;
int device_axis_count; /* Total number of axes in the device */
int *axis_map; /* User axes remapping */
+ int button_map[MAX_MAP_BUTTONS]; /* User button remapping */
LONG deadzone; /* Default dead-zone */
joy_polldev_handler *joy_polldev;
--
2.33.0

View File

@@ -1,2 +0,0 @@
Fixes: [35815] dinput: Allow remapping of joystick buttons.
Disabled: True

View File

@@ -1,4 +1,4 @@
From cb01601870a6299e0da0a956269ef24ed79d5035 Mon Sep 17 00:00:00 2001
From 8c7187f5501fff70df81612dfbdd084e67605189 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucianposton@pm.me>
Date: Mon, 21 May 2018 18:13:00 -0700
Subject: [PATCH] dwrite: Use font fallback when mapping characters
@@ -11,10 +11,10 @@ Signed-off-by: Lucian Poston <lucianposton@pm.me>
3 files changed, 74 insertions(+), 63 deletions(-)
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index 6b74a23540a..5827e87fdf5 100644
index 13ccf8e4434..c535b0cf49d 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -2062,6 +2062,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
@@ -2094,6 +2094,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
IDWriteFont **mapped_font)
{
const struct fallback_mapping *mapping;
@@ -22,7 +22,7 @@ index 6b74a23540a..5827e87fdf5 100644
HRESULT hr;
UINT32 i;
@@ -2073,9 +2074,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
@@ -2105,9 +2106,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
return E_FAIL;
}
@@ -39,7 +39,7 @@ index 6b74a23540a..5827e87fdf5 100644
weight, style, stretch, mapped_font);
if (hr == S_OK) {
TRACE("Created fallback font using family %s.\n", debugstr_w(mapping->families[i]));
@@ -2132,32 +2139,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
@@ -2164,32 +2171,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
if (basefamily && *basefamily) {
hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
@@ -121,13 +121,13 @@ index 6b74a23540a..5827e87fdf5 100644
+ }
+
done:
heap_free(buff);
free(buff);
return hr;
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 99048b97a3c..64d8eef6f59 100644
index d4aa49c6a6c..cda50c20777 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -958,6 +958,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
@@ -725,6 +725,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
goto fatal;
}
@@ -141,10 +141,10 @@ index 99048b97a3c..64d8eef6f59 100644
IDWriteFont_Release(font);
if (FAILED(hr)) {
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index cea581a0bef..ecefbe9c87a 100644
index 096fc554253..b622aeb4239 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -3368,35 +3368,23 @@ todo_wine
@@ -3368,35 +3368,23 @@ static void test_GetMetrics(void)
count = 0;
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
@@ -189,7 +189,7 @@ index cea581a0bef..ecefbe9c87a 100644
ok(mappedlength == 1, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
-todo_wine
- todo_wine
ok(font != NULL, "got %p\n", font);
if (font) {
IDWriteFont_Release(font);
@@ -202,7 +202,7 @@ index cea581a0bef..ecefbe9c87a 100644
ok(mappedlength == 3, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
-todo_wine
- todo_wine
ok(font != NULL, "got %p\n", font);
-if (font) {
- IDWriteFont_Release(font);
@@ -222,7 +222,7 @@ index cea581a0bef..ecefbe9c87a 100644
ok(mappedlength == 1, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
-todo_wine
- todo_wine
ok(font != NULL, "got %p\n", font);
-if (font) {
IDWriteFont_Release(font);
@@ -239,7 +239,7 @@ index cea581a0bef..ecefbe9c87a 100644
ok(mappedlength == 1, "got %u\n", mappedlength);
-}
ok(scale == 1.0f, "got %f\n", scale);
-todo_wine
- todo_wine
ok(font != NULL, "got %p\n", font);
-if (font) {
IDWriteFont_Release(font);
@@ -268,7 +268,7 @@ index cea581a0bef..ecefbe9c87a 100644
exists = FALSE;
hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
@@ -6564,34 +6540,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
@@ -6669,34 +6645,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
ok(hr == S_OK, "got 0x%08x\n", hr);
count = 9999;
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
@@ -304,5 +304,5 @@ index cea581a0bef..ecefbe9c87a 100644
IDWriteTextLayout_Release(layout);
--
2.20.1
2.34.1

View File

@@ -1,4 +1,4 @@
From d6b29a6153e786ff7a79bdbb7c33977e19c6e267 Mon Sep 17 00:00:00 2001
From f2401390227b40c68bb97983fc028d5060a70e8c Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 10:44:49 -0500
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
@@ -7,52 +7,48 @@ We use ppoll() instead of poll() for the better time granularity.
Although perhaps we shouldn't since the server doesn't do this.
---
configure.ac | 12 ++++++++
include/config.h.in | 9 ++++++
3 files changed, 89 insertions(+)
configure.ac | 8 ++++++++
include/config.h.in | 9 +++++++++
2 files changed, 17 insertions(+)
diff --git a/configure.ac b/configure.ac
index 718ab1ca50e..d5f82ad2af4 100644
index 9683798b57b..b4465a98794 100644
--- a/configure.ac
+++ b/configure.ac
@@ -496,6 +496,7 @@ AC_CHECK_HEADERS(\
@@ -478,6 +478,7 @@ AC_CHECK_HEADERS(\
sys/cdio.h \
sys/epoll.h \
sys/event.h \
+ sys/eventfd.h \
sys/filio.h \
sys/ioctl.h \
sys/ipc.h \
@@ -2158,6 +2159,7 @@ AC_CHECK_FUNCS(\
sys/link.h \
@@ -1991,6 +1992,7 @@ AC_CHECK_FUNCS(\
port_create \
posix_fadvise \
posix_fallocate \
+ ppoll \
prctl \
proc_pidinfo \
renameat \
@@ -2199,6 +2201,16 @@ case $host_os in
sched_yield \
@@ -2033,6 +2035,12 @@ case $host_os in
;;
esac
+dnl Check for shm_open which may be in -lrt
+if test "$ac_cv_header_sys_mman_h" = "yes" -a "x$RT_LIBS" = "x"
+then
+ ac_save_LIBS=$LIBS
+ AC_SEARCH_LIBS(shm_open, rt,
+ [AC_DEFINE(HAVE_SHM_OPEN, 1, [Define to 1 if you have the `shm_open' function.])
+ test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
+fi
+ac_save_LIBS=$LIBS
+AC_SEARCH_LIBS(shm_open, rt,
+ [AC_DEFINE(HAVE_SHM_OPEN, 1, [Define to 1 if you have the `shm_open' function.])
+ test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
+LIBS=$ac_save_LIBS
+
dnl **** Check for OpenLDAP ***
if test "x$with_ldap" != "xno"
then
diff --git a/include/config.h.in b/include/config.h.in
index e975ca8a55d..a19789dad8c 100644
index 197c3b97f09..13f822cb36c 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -474,6 +474,9 @@
@@ -362,6 +362,9 @@
/* Define to 1 if you have the `posix_fallocate' function. */
#undef HAVE_POSIX_FALLOCATE
@@ -62,7 +58,7 @@ index e975ca8a55d..a19789dad8c 100644
/* Define to 1 if you have the `prctl' function. */
#undef HAVE_PRCTL
@@ -546,6 +549,9 @@
@@ -434,6 +437,9 @@
/* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
@@ -72,7 +68,7 @@ index e975ca8a55d..a19789dad8c 100644
/* Define if sigaddset is supported */
#undef HAVE_SIGADDSET
@@ -695,6 +701,9 @@
@@ -574,6 +580,9 @@
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H

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