Compare commits

...

79 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
2827fd6727 Release v8.17.1 2023-10-02 13:02:27 +11:00
Alistair Leslie-Hughes
c55fa81f35 Updated sapi-ISpObjectToken-CreateInstance patchset 2023-10-01 09:43:09 +11:00
Alistair Leslie-Hughes
46ac00b4a4 Updated ntdll-Junction_Points patchset 2023-10-01 09:36:47 +11:00
Alistair Leslie-Hughes
3aed8374fa Updated d3d12core-D3D12GetInterface patchset 2023-10-01 09:33:09 +11:00
Alistair Leslie-Hughes
8b016d206e Updated eventfd_synchronization patchset 2023-10-01 08:49:40 +11:00
Alistair Leslie-Hughes
2e55aa06c2 Release v8.17 2023-09-30 12:24:25 +10:00
Alistair Leslie-Hughes
1f62a67dcc Added d3dx9_36_controller patchset 2023-09-30 10:32:04 +10:00
Alistair Leslie-Hughes
82924e9a17 Rebase against 3db7506221e44e8091887d7eb42fe1666d422166. 2023-09-30 09:55:54 +10:00
Alistair Leslie-Hughes
b7b4fbcd32 Updated vkd3d-latest patchset 2023-09-29 18:11:42 +10:00
Alistair Leslie-Hughes
83504ec21a Rebase against 9e0487c4cc36cdbf915d35222c875d23f54958ae. 2023-09-29 18:11:07 +10:00
Alistair Leslie-Hughes
0860bc1c5e Rebase against 416a273241e6eb7a8d15380387fef00e159b7277. 2023-09-28 08:40:53 +10:00
Alistair Leslie-Hughes
8bfcd6ad7d Rebase against 81c8c73de299c0d61d1fff8ad9b88a9deb5b9479. 2023-09-26 09:26:16 +10:00
Alistair Leslie-Hughes
d2cf83298d Rebase against 56e58cbed19bb5307598d4f433d5b3f01af91a1b. 2023-09-24 08:30:07 +10:00
Alistair Leslie-Hughes
6e8855e1a0 Updated user32-recursive-activation patchset
Fix warning.
2023-09-22 09:25:26 +10:00
Alistair Leslie-Hughes
a7511fa5da Updated vkd3d-latest to 1.9 2023-09-22 09:15:39 +10:00
Alistair Leslie-Hughes
b3e9ea1058 Rebase against ee17400c05d88fa29d0b895fa01902adfc91ba7f. 2023-09-21 08:08:08 +10:00
Alistair Leslie-Hughes
c4da0a8993 Rebase against 6558611fa2d24447297cb62d168b924c33839c43. 2023-09-20 08:16:07 +10:00
Alistair Leslie-Hughes
53515d7e75 Release v8.16 2023-09-17 08:04:30 +10:00
Alistair Leslie-Hughes
2736fc8378 Added ddraw-GetPickRecords patchset 2023-09-16 19:08:15 +10:00
Alistair Leslie-Hughes
594626def2 Rebase against cf5e073d14925d3cdd489a869e3c2c5317b1ff38. 2023-09-16 09:31:44 +10:00
Alistair Leslie-Hughes
920fd825cf Updated vkd3d-latest patchset 2023-09-16 09:31:27 +10:00
Alistair Leslie-Hughes
87c5a4c7a0 Rebase against f71315c8494575698634062cfad4f5d84fd230a1. 2023-09-15 08:19:50 +10:00
Alistair Leslie-Hughes
b829697078 Rebase against 1b987bfde68b75da3b718ba065826b01b5d6736e. 2023-09-12 07:54:37 +10:00
Alistair Leslie-Hughes
102992bb70 Rebase against 126363ea5f9056449e8bd22cc69b51bd2d7dd9aa. 2023-09-09 12:01:15 +10:00
Alistair Leslie-Hughes
0d02a7aa99 Rebase against 87b1cd12d609d8359dab10af976d20269912e196. 2023-09-07 17:58:02 +10:00
Alistair Leslie-Hughes
ea03a5cda2 Rebase against ce40b4d8fcb08d54df7ada430bc8dfe53392bd23. 2023-09-05 07:37:20 +10:00
Alistair Leslie-Hughes
7f7f0fc98d Release v8.15 2023-09-02 11:48:20 +10:00
Alistair Leslie-Hughes
9763d6e295 Rebase against 0cea9c78fa89366e3dbeb0629179f359cbf17b92. 2023-09-02 08:36:03 +10:00
Alistair Leslie-Hughes
5361c0277d Updated vkd3d-latest patchset 2023-08-31 09:25:00 +10:00
Alistair Leslie-Hughes
05319e0efd Rebase against 4c2c896af92c5fccd6313e292dcda548927cddf1. 2023-08-31 09:24:21 +10:00
Alistair Leslie-Hughes
cfd8b7de65 Rebase against 221d5aba3f19c1014dad30cad04c4b14c284d9d2. 2023-08-28 07:34:15 +10:00
Alistair Leslie-Hughes
cdcdde3d46 Rebase against bd10252332491bc39100f230540b14d59f02255d. 2023-08-25 08:28:32 +10:00
Alistair Leslie-Hughes
520ac85b6f Updated mshtml-TranslateAccelerator patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=55473
2023-08-23 12:43:48 +10:00
Alistair Leslie-Hughes
142c3eb080 Rebase against 707d299da62414e6582c5c0c8cfec0cd43c3ac97. 2023-08-23 12:05:42 +10:00
Alistair Leslie-Hughes
10a0e0b89e Updated user32-rawinput-mouse patchset 2023-08-22 10:39:59 +10:00
Alistair Leslie-Hughes
fac630367d Rebase against 797a8bb192d49a44b8cec468e3421444feb03f8a. 2023-08-22 08:38:07 +10:00
Alistair Leslie-Hughes
da76250fad Release v8.14 2023-08-21 13:42:05 +10:00
Alistair Leslie-Hughes
9d9c5c700a Updated vkd3d-latest patchset 2023-08-19 12:24:21 +10:00
Paul Gofman
0b96046f15 Update and re-enable ntdll-Syscall_Emulation patchset.
Thanks DodoGTA from LGD discord for spotting related upstream
ABI change and suggesting a part of the fix.
2023-08-18 20:22:35 -06:00
Alistair Leslie-Hughes
cc31308c32 Updated user32-rawinput-mouse patchset 2023-08-17 10:02:51 +10:00
Alistair Leslie-Hughes
559b29238c Rebase against 5cd11ade210ce4a7b5b7b500be664b3661d3e710. 2023-08-16 10:04:48 +10:00
Alistair Leslie-Hughes
e2d51dfc4b Updated widl-SLTG_Typelib_Support patchset
Remove compile warning.
2023-08-15 14:53:27 +10:00
Alistair Leslie-Hughes
d3de5eadd9 Rebase against 8f76cc687da9c0fc7fb10e84a8cf36bcad0ef473. 2023-08-15 08:34:49 +10:00
Alistair Leslie-Hughes
4fa70d510c Updated user32-rawinput-mouse patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=55085
Fixes: https://bugs.winehq.org/show_bug.cgi?id=55407
2023-08-14 09:05:44 +10:00
Alistair Leslie-Hughes
505a83ad9e Rebase against b2a099b3ceec6fef05c455408c05714232cb466f. 2023-08-14 08:58:10 +10:00
Alistair Leslie-Hughes
a1e634bca9 Updated user32-rawinput-mouse patchset 2023-08-10 07:49:54 +10:00
Alistair Leslie-Hughes
13a418812a Updated winex11-CandidateWindowPos patchset 2023-08-09 18:48:52 +10:00
Alistair Leslie-Hughes
965789d221 Rebase against ee1d3a19a4b8571ba32bdf9af845a74bca22c97b. 2023-08-09 12:11:22 +10:00
Alistair Leslie-Hughes
2a2c8b5228 Updated vkd3d-latest patchset 2023-08-05 09:53:23 +10:00
Alistair Leslie-Hughes
c210ef9f59 Updated fltmgr.sys-FltBuildDefaultSecurityDescriptor patchset 2023-08-04 14:19:06 +10:00
Alistair Leslie-Hughes
dab36ebe1e Updated vkd3d-latest patchset 2023-08-03 12:06:16 +10:00
Alistair Leslie-Hughes
1ca1b3b602 Updated d3dx11_43-D3DX11CreateTextureFromMemory patchset 2023-08-02 09:58:16 +10:00
Alistair Leslie-Hughes
2b16926188 Updated d3dx11_43-D3DX11CreateTextureFromMemory patchset 2023-08-01 14:38:44 +10:00
Alistair Leslie-Hughes
bbbe9cbbc7 Rebase against b80ea4153b096970514f86f385a37c9ceaceada2. 2023-08-01 09:59:38 +10:00
Alistair Leslie-Hughes
1142823d53 Updated xactengine3_7-PrepareWave patchset 2023-07-28 17:54:06 +10:00
Alistair Leslie-Hughes
390b1f4127 Rebase against fddb79776871ee00adf4d78583135a5d96ca8c06. 2023-07-28 08:02:08 +10:00
Alistair Leslie-Hughes
1942fb8bc1 Release v8.13 2023-07-23 10:38:50 +10:00
Alistair Leslie-Hughes
52f252eeb6 Added d3d12core-D3D12GetInterface patchset 2023-07-22 12:04:20 +10:00
Alistair Leslie-Hughes
8493f61af5 Updated vkd3d-latest patchset 2023-07-22 10:12:24 +10:00
Alistair Leslie-Hughes
6b7e43830c Rebase against 900dfca3899d52f3085c713e26af06aa5aea37a4. 2023-07-18 11:18:33 +10:00
Alistair Leslie-Hughes
4482bd3493 Rebase against 2238658e2f87506c9ccb67de0376f3e3920550db. 2023-07-15 17:07:24 +10:00
Alistair Leslie-Hughes
b285e35fca Rebase against 94d61d1b280d0ef15474c0cf44f534d5d44eba1f. 2023-07-14 11:08:23 +10:00
Alistair Leslie-Hughes
a88d536fba Rebase against fb4d36c66131d1c45ebdcb5d56151e8f7782ebd1. 2023-07-12 08:54:04 +10:00
Alistair Leslie-Hughes
e5cf862a14 Updated vkd3d patchset 2023-07-11 09:11:55 +10:00
Alistair Leslie-Hughes
df9ad11eef Updated windows.networking.connectivity-new-dll patchset 2023-07-11 07:57:44 +10:00
Alistair Leslie-Hughes
94caef272e Updated vkd3d-latest patchset
Squash to 1.8, then everything else.
2023-07-11 07:57:44 +10:00
Alistair Leslie-Hughes
d745d08cd7 Release v8.12 2023-07-09 12:16:45 +10:00
Alistair Leslie-Hughes
a6448966cf Added dinput-scancode patchset 2023-07-08 15:20:31 +10:00
Alistair Leslie-Hughes
01fbf6d356 Rebase against aaf304f2441ebe52834fdda2b8a02a5349d2ca43. 2023-07-08 10:49:44 +10:00
Alistair Leslie-Hughes
e57244a59e Updated vkd3d-latest patchset
Added missed files to patch.
2023-07-07 17:34:56 +10:00
Alistair Leslie-Hughes
fe6a869e0b Updated vkd3d patchset 2023-07-07 16:26:35 +10:00
Alistair Leslie-Hughes
a45cfa1ee2 Rebase against 9617c784b9d7ffa88182c24aa2f110a6867aa67d. 2023-07-07 14:27:32 +10:00
Alistair Leslie-Hughes
abbfbb8e15 Disbale ntdll-Syscall_Emulation patchset
Causing issues with Steam loading.
2023-07-05 13:45:56 +10:00
Alistair Leslie-Hughes
6882ba5e7b Rebase against f4a8ad89d43646a8d109da5747dfb1a92a6d8cd1. 2023-07-05 13:05:46 +10:00
Alistair Leslie-Hughes
b97718a0a9 Rebase against 3d28f9d362e6d9871747231b210c559536bb6dd4. 2023-06-30 08:35:45 +10:00
Alistair Leslie-Hughes
1fe536ee75 Rebase against fca833678f3b2588cc539d04693e7f9d8bca3278. 2023-06-29 08:52:05 +10:00
Alistair Leslie-Hughes
2d8c5f88c3 Updated vkd3d-latest patchset 2023-06-28 16:29:02 +10:00
Alistair Leslie-Hughes
ef85449de2 Rebase against 98b73b5c32fa82218081f0e7668f9836ffe1b55d. 2023-06-28 08:27:58 +10:00
Alistair Leslie-Hughes
d94c192f10 Rebase against 1d281c620d3062c2f30cdf533fe4ac06905a07b8. 2023-06-27 09:25:02 +10:00
111 changed files with 9969 additions and 33082 deletions

View File

@@ -1,4 +1,4 @@
From 7362e037e8160046fffcf062a663ea8e7ac45290 Mon Sep 17 00:00:00 2001
From f9f5002e4ce6417dd196d53b50c51a3b224015d3 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 12 Nov 2019 18:13:20 +0800
Subject: [PATCH] comctl32: Bump version to 6.0.
@@ -14,12 +14,12 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
index 7dfdf089eb1..17ec7eeab40 100644
index 51f4337add2..3fe8905abea 100644
--- a/dlls/comctl32/comctl32.h
+++ b/dlls/comctl32/comctl32.h
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
BOOL imagelist_has_alpha(HIMAGELIST, UINT) DECLSPEC_HIDDEN;
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
-#define COMCTL32_VERSION_MINOR 81
+#define COMCTL32_VERSION_MINOR 0
@@ -53,5 +53,5 @@ index a54de13d8b2..e0b0e22d4dc 100644
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
--
2.35.1
2.40.1

View File

@@ -0,0 +1,69 @@
From b30d3de1043cef20b57984035968fc78d5fcd2bb Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 22 Jul 2023 10:22:03 +1000
Subject: [PATCH] d3d12core: Add D3D12GetInterface stub
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55135
---
dlls/d3d12core/Makefile.in | 3 +++
dlls/d3d12core/d3d12core.spec | 2 +-
dlls/d3d12core/d3d12core_main.c | 30 ++++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 dlls/d3d12core/d3d12core_main.c
diff --git a/dlls/d3d12core/Makefile.in b/dlls/d3d12core/Makefile.in
index 8778b66138b..94d8fd4da00 100644
--- a/dlls/d3d12core/Makefile.in
+++ b/dlls/d3d12core/Makefile.in
@@ -1 +1,4 @@
MODULE = d3d12core.dll
+
+C_SRCS = \
+ d3d12core_main.c
diff --git a/dlls/d3d12core/d3d12core.spec b/dlls/d3d12core/d3d12core.spec
index c9c73bd4ee4..3f3e0a0f2e1 100644
--- a/dlls/d3d12core/d3d12core.spec
+++ b/dlls/d3d12core/d3d12core.spec
@@ -1,2 +1,2 @@
-@ stub D3D12GetInterface
+@ stdcall D3D12GetInterface(ptr ptr ptr)
@ stub D3D12SDKVersion
diff --git a/dlls/d3d12core/d3d12core_main.c b/dlls/d3d12core/d3d12core_main.c
new file mode 100644
index 00000000000..75a083ad276
--- /dev/null
+++ b/dlls/d3d12core/d3d12core_main.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2023 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d12core);
+
+HRESULT WINAPI D3D12GetInterface(REFCLSID rclsid, REFIID riid, void **out)
+{
+ FIXME("%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
+
+ return E_NOINTERFACE;
+}
--
2.40.1

View File

@@ -0,0 +1 @@
Fixes: [55135] d3d12core: Add D3D12GetInterface stub

View File

@@ -1,7 +1,7 @@
From ea3579b5b3d701647f5c7f16de658f1cd7fe876d Mon Sep 17 00:00:00 2001
From 0fbce9fe4b69f27b7df82c6517c364aab57de63b 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
Subject: [PATCH 1/2] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50210
@@ -10,8 +10,8 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
dlls/d3dx11_42/Makefile.in | 1 +
dlls/d3dx11_43/Makefile.in | 1 +
dlls/d3dx11_43/main.c | 9 --
dlls/d3dx11_43/texture.c | 176 +++++++++++++++++++++++++++++++++++++
4 files changed, 178 insertions(+), 9 deletions(-)
dlls/d3dx11_43/texture.c | 167 +++++++++++++++++++++++++++++++++++++
4 files changed, 169 insertions(+), 9 deletions(-)
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
index 7fcce18a8e1..78ca5f707a7 100644
@@ -55,10 +55,10 @@ index 5dad027864f..00c1db35e42 100644
- return E_NOTIMPL;
-}
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
index 81ac8ee6db7..6881eec107d 100644
index 81ac8ee6db7..bbf937cdab0 100644
--- a/dlls/d3dx11_43/texture.c
+++ b/dlls/d3dx11_43/texture.c
@@ -15,14 +15,190 @@
@@ -15,14 +15,181 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
@@ -145,13 +145,11 @@ index 81ac8ee6db7..6881eec107d 100644
+HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
+ D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
+{
+ IWICBitmapFrameDecode *frame = NULL;
+ IWICImagingFactory *factory = NULL;
+ IWICDdsDecoder *dds_decoder = NULL;
+ IWICBitmapDecoder *decoder = NULL;
+ WICDdsParameters dds_params;
+ IWICStream *stream = NULL;
+ unsigned int frame_count;
+ GUID container_format;
+ HRESULT hr;
+
@@ -186,16 +184,6 @@ index 81ac8ee6db7..6881eec107d 100644
+ goto end;
+ }
+
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
+ if (FAILED(hr) || !frame_count)
+ goto end;
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
+ if (FAILED(hr))
+ goto end;
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
+ if (FAILED(hr))
+ goto end;
+
+ if (img_info->ImageFileFormat == D3DX11_IFF_DDS)
+ {
+ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
@@ -204,6 +192,8 @@ index 81ac8ee6db7..6881eec107d 100644
+ hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params);
+ if (FAILED(hr))
+ goto end;
+ img_info->Width = dds_params.Width;
+ img_info->Height = dds_params.Height;
+ img_info->ArraySize = dds_params.ArraySize;
+ img_info->Depth = dds_params.Depth;
+ img_info->MipLevels = dds_params.MipLevels;
@@ -218,6 +208,9 @@ index 81ac8ee6db7..6881eec107d 100644
+ }
+ else
+ {
+ FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
+ img_info->Width = 1;
+ img_info->Height = 1;
+ img_info->ArraySize = 1;
+ img_info->Depth = 1;
+ img_info->MipLevels = 1;
@@ -229,8 +222,6 @@ index 81ac8ee6db7..6881eec107d 100644
+end:
+ if (dds_decoder)
+ IWICDdsDecoder_Release(dds_decoder);
+ if (frame)
+ IWICBitmapFrameDecode_Release(frame);
+ if (decoder)
+ IWICBitmapDecoder_Release(decoder);
+ if (stream)
@@ -250,5 +241,5 @@ index 81ac8ee6db7..6881eec107d 100644
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
ID3D11ShaderResourceView **view, HRESULT *hresult)
--
2.34.1
2.40.1

View File

@@ -1,15 +1,15 @@
From 5be34c9e347d4379179eeba742b25986152d4e4f Mon Sep 17 00:00:00 2001
From 7285c2c90f43cd46d873a2ddb65e9c6c9d63f750 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
Subject: [PATCH 2/2] d3dx11_42: Implement D3DX11CreateTextureFromMemory
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/d3dx11_43/texture.c | 347 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 342 insertions(+), 5 deletions(-)
dlls/d3dx11_43/texture.c | 359 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 354 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
index 6881eec107d..b91bd8d881a 100644
index bbf937cdab0..10dedf30c0f 100644
--- a/dlls/d3dx11_43/texture.c
+++ b/dlls/d3dx11_43/texture.c
@@ -22,6 +22,7 @@
@@ -20,7 +20,7 @@ index 6881eec107d..b91bd8d881a 100644
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
@@ -43,6 +44,32 @@ file_formats[] =
@@ -43,6 +44,33 @@ file_formats[] =
{ &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
};
@@ -42,6 +42,7 @@ index 6881eec107d..b91bd8d881a 100644
+ { &GUID_WICPixelFormat32bppBGR, DXGI_FORMAT_B8G8R8X8_UNORM },
+ { &GUID_WICPixelFormat32bppBGRA, DXGI_FORMAT_B8G8R8A8_UNORM },
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM },
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB },
+ { &GUID_WICPixelFormat32bppRGBA1010102, DXGI_FORMAT_R10G10B10A2_UNORM },
+ { &GUID_WICPixelFormat32bppRGBA1010102XR, DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM },
+ { &GUID_WICPixelFormat64bppRGBA, DXGI_FORMAT_R16G16B16A16_UNORM },
@@ -53,7 +54,7 @@ index 6881eec107d..b91bd8d881a 100644
static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
{
unsigned int i;
@@ -95,6 +122,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
@@ -95,6 +123,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
return format;
}
@@ -229,7 +230,7 @@ index 6881eec107d..b91bd8d881a 100644
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
{
@@ -229,14 +425,155 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
@@ -220,14 +417,166 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
return E_NOTIMPL;
}
@@ -264,17 +265,28 @@ index 6881eec107d..b91bd8d881a 100644
+
+ if (!src_data || !src_data_size || !texture)
+ return E_FAIL;
+ if (load_info)
+ FIXME("load_info is ignored.\n");
+ if (pump)
+ FIXME("Thread pump is not supported yet.\n");
+
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
+ return E_FAIL;
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
+ if (load_info)
+ {
+ FIXME("Cube map is not supported.\n");
+ return E_FAIL;
+ img_info.Width = load_info->Width;
+ img_info.Height = load_info->Height;
+ img_info.Depth = load_info->Depth;
+ img_info.ArraySize = 1;
+ img_info.MipLevels = load_info->MipLevels;
+ img_info.MiscFlags = load_info->MiscFlags;
+ img_info.Format = load_info->Format;
+ }
+ else
+ {
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
+ return E_FAIL;
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
+ {
+ FIXME("Cube map is not supported.\n");
+ return E_FAIL;
+ }
+ }
+
+ if (FAILED(hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory)))
@@ -391,5 +403,5 @@ index 6881eec107d..b91bd8d881a 100644
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
--
2.34.1
2.40.1

View File

@@ -0,0 +1,56 @@
From 30d677139afe2af3f72c68ba11f1bbaead6f1c11 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 2 Aug 2023 08:24:11 +1000
Subject: [PATCH] d3dx11_43: D3DX11GetImageInfoFromMemory - Only use frame for
non DDS images
---
dlls/d3dx11_43/texture.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
index 10dedf30c0f..f3f7d350131 100644
--- a/dlls/d3dx11_43/texture.c
+++ b/dlls/d3dx11_43/texture.c
@@ -295,6 +295,7 @@ static const GUID *dxgi_format_to_wic_guid(DXGI_FORMAT format)
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
{
+ IWICBitmapFrameDecode *frame = NULL;
IWICImagingFactory *factory = NULL;
IWICDdsDecoder *dds_decoder = NULL;
IWICBitmapDecoder *decoder = NULL;
@@ -358,9 +359,18 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
}
else
{
- FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
- img_info->Width = 1;
- img_info->Height = 1;
+ unsigned int frame_count;
+
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
+ if (FAILED(hr) || !frame_count)
+ goto end;
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
+ if (FAILED(hr))
+ goto end;
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
+ if (FAILED(hr))
+ goto end;
+
img_info->ArraySize = 1;
img_info->Depth = 1;
img_info->MipLevels = 1;
@@ -372,6 +382,8 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
end:
if (dds_decoder)
IWICDdsDecoder_Release(dds_decoder);
+ if (frame)
+ IWICBitmapFrameDecode_Release(frame);
if (decoder)
IWICBitmapDecoder_Release(decoder);
if (stream)
--
2.40.1

View File

@@ -254,14 +254,14 @@ index f437a83cbd8..c5faae520c9 100644
+ hr = D3DXOptimizeVertices(indices, num_faces,
+ num_vertices, FALSE,
+ vertex_remap);
+ ok(hr == D3D_OK, "D3DXOptimizeVertices failed. Got %x, expected D3D_OK.\n", hr);
+ ok(hr == D3D_OK, "D3DXOptimizeVertices failed. Got %lx, expected D3D_OK.\n", hr);
+
+ /* vertex_remap must not be NULL */
+ hr = D3DXOptimizeVertices(indices, num_faces,
+ num_vertices, FALSE,
+ NULL);
+ ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL vertex_remap "
+ "pointer. Got %x, expected D3DERR_INVALIDCALL.\n", hr);
+ "pointer. Got %lx, expected D3DERR_INVALIDCALL.\n", hr);
+}
+
static void test_optimize_faces(void)

View File

@@ -210,7 +210,7 @@ index 984b2f6..a206e06 100644
+HRESULT WINAPI D3DXComputeTangent(ID3DXMesh *mesh, DWORD stage_idx, DWORD tangent_idx,
+ DWORD binorm_idx, DWORD wrap, const DWORD *adjacency)
+{
+ TRACE("mesh %p, stage_idx %d, tangent_idx %d, binorm_idx %d, wrap %d, adjacency %p.\n",
+ TRACE("mesh %p, stage_idx %ld, tangent_idx %ld, binorm_idx %ld, wrap %ld, adjacency %p.\n",
+ mesh, stage_idx, tangent_idx, binorm_idx, wrap, adjacency);
+
+ return D3DXComputeTangentFrameEx( mesh, D3DDECLUSAGE_TEXCOORD, stage_idx,

View File

@@ -1,4 +1,4 @@
From f22ce02d880a9a6723d202eaf959d1eaa7a4c3df Mon Sep 17 00:00:00 2001
From 28b0030ac5f486875dff6f5f34779844f1a031cf Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 11 Jan 2015 16:29:30 +0100
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
@@ -11,23 +11,23 @@ Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
3 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
index 9497343f422..679b57b2626 100644
index 5d8f5b332f8..f1f41c6e4d7 100644
--- a/dlls/d3dx9_36/d3dx9_private.h
+++ b/dlls/d3dx9_36/d3dx9_private.h
@@ -125,6 +125,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN;
@@ -127,6 +127,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
IDirect3DSurface9 **temp_surface, BOOL write);
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN;
IDirect3DSurface9 *temp_surface, BOOL update);
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
+ const PALETTEENTRY *src_palette) DECLSPEC_HIDDEN;
+ const PALETTEENTRY *src_palette);
unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN;
float float_16_to_32(const unsigned short in) DECLSPEC_HIDDEN;
unsigned short float_32_to_16(const float in);
float float_16_to_32(const unsigned short in);
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index aa9ee891b54..9871d211a7c 100644
index ca40018af24..9ff5b4901b8 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -636,6 +636,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
@@ -650,6 +650,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
return D3D_OK;
}
@@ -97,10 +97,10 @@ index aa9ee891b54..9871d211a7c 100644
const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key,
const D3DXIMAGE_INFO *src_info)
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index 26d07ca9f66..b743d5cfad0 100644
index 2ee79b51f79..7ceef158d07 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -1904,10 +1904,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
@@ -1858,10 +1858,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
if (file_format == D3DXIFF_DDS)
@@ -113,5 +113,5 @@ index 26d07ca9f66..b743d5cfad0 100644
type = IDirect3DBaseTexture9_GetType(src_texture);
switch (type)
--
2.17.1
2.40.1

View File

@@ -174,18 +174,18 @@ index 1daec158a5f..64b02276843 100644
+ }
+
+ hr = D3DXCreateSkinInfoFVF(4, D3DFVF_XYZ | D3DFVF_NORMAL, 2, &skin_info);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+
+ skin_info->lpVtbl->SetBoneInfluence(skin_info, 0, 2, bone0_vertices, bone0_weights);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->SetBoneOffsetMatrix(skin_info, 0, &matrix);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->SetBoneInfluence(skin_info, 1, 2, bone1_vertices, bone1_weights);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->SetBoneOffsetMatrix(skin_info, 1, &matrix);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->UpdateSkinnedMesh(skin_info, bones_matrix, NULL, vertices_src, vertices_dest);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ for (i = 0; i < 4; i++)
+ {
+ ok(compare(vertices_dest[i*2].x, vertices_ref[i*2].x), "Vertex[%d].position.x: got %g, expected %g\n",

View File

@@ -0,0 +1,27 @@
From 1772b5826cbd3adef3f5c09e6c0138a8d367fc8b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 28 Sep 2023 09:14:00 +1000
Subject: [PATCH 1/3] d3dx9: D3DXLoadMeshHierarchyFromXInMemory return default
Animation Controller
---
dlls/d3dx9_36/mesh.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 8aa4ece69fb..442b56a7e19 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -4019,7 +4019,8 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memo
if (anim_controller)
{
*anim_controller = NULL;
- FIXME("Animation controller creation not implemented.\n");
+ /*FIXME("Animation controller creation not implemented.\n");*/
+ D3DXCreateAnimationController(1, 1, 1, 1, anim_controller);
}
cleanup:
--
2.40.1

View File

@@ -0,0 +1,169 @@
From c79c2913f06f0fe703f00ca324270e0551ca7027 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 28 Sep 2023 12:35:29 +1000
Subject: [PATCH] d3dx9: D3DXLoadMeshHierarchyFromXInMemory support empty mesh.
---
dlls/d3dx9_36/mesh.c | 36 ++++++++++++++++++++++++-----
dlls/d3dx9_36/tests/mesh.c | 46 ++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 442b56a7e19..c85a9774fdd 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -3506,6 +3506,16 @@ HRESULT WINAPI D3DXLoadSkinMeshFromXof(struct ID3DXFileData *filedata, DWORD opt
hr = parse_mesh(filedata, &mesh_data, provide_flags);
if (FAILED(hr)) goto cleanup;
+ if (mesh_data.num_vertices == 0)
+ {
+ if (adjacency_out) *adjacency_out = NULL;
+ if (materials_out) *materials_out = NULL;
+ if (effects_out) *effects_out = NULL;
+ *mesh_out = NULL;
+ hr = D3D_OK;
+ goto cleanup;
+ }
+
total_vertices = mesh_data.num_vertices;
if (mesh_data.fvf & D3DFVF_NORMAL) {
/* duplicate vertices with multiple normals */
@@ -3815,7 +3825,8 @@ static HRESULT load_mesh_container(struct ID3DXFileData *filedata, DWORD options
hr = filedata_get_name(filedata, &name);
if (FAILED(hr)) goto cleanup;
- hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data,
+ if (mesh_data.pMesh)
+ hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data,
materials ? ID3DXBuffer_GetBufferPointer(materials) : NULL,
effects ? ID3DXBuffer_GetBufferPointer(effects) : NULL,
num_materials,
@@ -4201,13 +4212,21 @@ static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct
hr = E_OUTOFMEMORY;
goto err;
}
- list_add_tail(container_list, &container->entry);
- container->transform = transform;
hr = D3DXLoadSkinMeshFromXof(child, options, device,
(provide_flags & PROVIDE_ADJACENCY) ? &container->adjacency : NULL,
(provide_flags & PROVIDE_MATERIALS) ? &container->materials : NULL,
NULL, &container->num_materials, NULL, &container->mesh);
+
+ if (container->mesh)
+ {
+ list_add_tail(container_list, &container->entry);
+ container->transform = transform;
+ }
+ else
+ {
+ HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, container);
+ }
} else if (IsEqualGUID(&type, &TID_D3DRMFrameTransformMatrix)) {
D3DXMATRIX new_transform;
hr = parse_transform_matrix(child, &new_transform);
@@ -4295,13 +4314,20 @@ HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size,
hr = E_OUTOFMEMORY;
goto cleanup;
}
- list_add_tail(&container_list, &container_ptr->entry);
- D3DXMatrixIdentity(&container_ptr->transform);
hr = D3DXLoadSkinMeshFromXof(filedata, options, device,
(provide_flags & PROVIDE_ADJACENCY) ? &container_ptr->adjacency : NULL,
(provide_flags & PROVIDE_MATERIALS) ? &container_ptr->materials : NULL,
NULL, &container_ptr->num_materials, NULL, &container_ptr->mesh);
+ if (container_ptr->mesh)
+ {
+ list_add_tail(&container_list, &container_ptr->entry);
+ D3DXMatrixIdentity(&container_ptr->transform);
+ }
+ else
+ {
+ HeapFree(GetProcessHeap(), 0, container_ptr);
+ }
} else if (IsEqualGUID(&guid, &TID_D3DRMFrame)) {
hr = parse_frame(filedata, options, device, &identity, &container_list, provide_flags);
}
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index ce0f238412d..21428f12e26 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -2068,6 +2068,14 @@ static void D3DXLoadMeshTest(void)
"}"
"Mesh { 3; 0.0; 0.0; 0.0;, 0.0; 1.0; 0.0;, 3.0; 1.0; 0.0;; 1; 3; 0, 1, 2;; }"
"}";
+ static const char framed_xfile2[] =
+ "xof 0303txt 0032"
+ "Frame Box01 {"
+ "Mesh { 0;; 0;;"
+ "MeshNormals { 0;; 0;; }"
+ "}"
+ "}";
+
static const WORD framed_index_buffer[] = { 0, 1, 2 };
static const D3DXVECTOR3 framed_vertex_buffers[3][3] = {
{{0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0}},
@@ -2513,6 +2521,19 @@ static void D3DXLoadMeshTest(void)
frame_hier = NULL;
}
+ hr = D3DXLoadMeshHierarchyFromXInMemory(framed_xfile2, sizeof(framed_xfile2) - 1,
+ D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ if (SUCCEEDED(hr)) {
+ D3DXMESHCONTAINER *container = frame_hier->pMeshContainer;
+
+ ok(!strcmp(frame_hier->Name, "Box01"), "Expected '', got '%s'\n", frame_hier->Name);
+ ok(container == NULL, "Expected NULL, got %p\n", container);
+
+ hr = D3DXFrameDestroy(frame_hier, &alloc_hier);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ frame_hier = NULL;
+ }
hr = D3DXLoadMeshFromXInMemory(NULL, 0, D3DXMESH_MANAGED,
device, NULL, NULL, NULL, NULL, &mesh);
@@ -11426,6 +11447,9 @@ static void test_load_skin_mesh_from_xof(void)
"1;"
"3; 0, 1, 2;;"
"}";
+ static const char simple_xfile_empty[] =
+ "xof 0303txt 0032"
+ "Mesh { 0;; 0;; }";
static const D3DVERTEXELEMENT9 expected_declaration[] =
{
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
@@ -11537,6 +11561,28 @@ static void test_load_skin_mesh_from_xof(void)
mesh->lpVtbl->Release(mesh);
adjacency->lpVtbl->Release(adjacency);
file_data->lpVtbl->Release(file_data);
+
+ /* Empty Mesh Test */
+ file_data = get_mesh_data(simple_xfile_empty, sizeof(simple_xfile_empty) - 1);
+ ok(!!file_data, "Failed to load mesh data.\n");
+
+ adjacency = materials = effects = (void *)0xdeadbeef;
+ count = ~0u;
+ skin_info = (void *)0xdeadbeef;
+ mesh = (void *)0xdeadbeef;
+
+ hr = D3DXLoadSkinMeshFromXof(file_data, 0, device, &adjacency, &materials, &effects, &count,
+ &skin_info, &mesh);
+ todo_wine ok(hr == D3DXERR_LOADEDMESHASNODATA, "Got unexpected hr %#lx.\n", hr);
+ ok(!adjacency, "Got unexpected value %p.\n", adjacency);
+ ok(!materials, "Got unexpected value %p.\n", materials);
+ ok(!effects, "Got unexpected value %p.\n", effects);
+ ok(count == ~0u, "Got unexpected value %lu.\n", count);
+ ok(skin_info == (void *)0xdeadbeef, "Got unexpected value %p.\n", skin_info);
+ ok(!mesh, "Got unexpected value %p.\n", mesh);
+
+ file_data->lpVtbl->Release(file_data);
+
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount);
DestroyWindow(hwnd);
--
2.42.0

View File

@@ -0,0 +1,28 @@
From 164c33e29bfe06d99c58c1ee73dfd6f31dc4c663 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 30 Sep 2023 10:18:54 +1000
Subject: [PATCH] d3dx9: [HACK] D3DXIntersect - Assign hit to FALSE
This functions needs to be implement to make "Humanity Asset" to work correctly.
Added to stop the Infinite loop - Doesn't make the game playable.
---
dlls/d3dx9_36/mesh.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 822b2d7d410..fdc642c4e0c 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -7645,6 +7645,8 @@ HRESULT WINAPI D3DXIntersect(ID3DXBaseMesh *mesh, const D3DXVECTOR3 *ray_pos, co
FIXME("mesh %p, ray_pos %p, ray_dir %p, hit %p, face_index %p, u %p, v %p, distance %p, all_hits %p, "
"count_of_hits %p stub!\n", mesh, ray_pos, ray_dir, hit, face_index, u, v, distance, all_hits, count_of_hits);
+ *hit = FALSE;
+
return E_NOTIMPL;
}
--
2.42.0

View File

@@ -0,0 +1,4 @@
Fixes: [39876] d3dx9: D3DXLoadMeshHierarchyFromXInMemory return a dummy ID3DXAnimationController.
# This allow Humanity Asset to get in game - Doesn't make the game playable though.
# Requires D3DXIntersect to be implemented.

View File

@@ -19,7 +19,7 @@ index 8d608656143..cc8adccf049 100644
+{
+ DDCAPS *caps = ctx;
+
+ switch (format->u1.dwZBufferBitDepth)
+ switch (format->dwZBufferBitDepth)
+ {
+ case 8:
+ caps->dwZBufferBitDepths |= DDBD_8;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
Fixes: [10729] ddraw: Implement Pick() and GetPickRecords().

View File

@@ -1,4 +1,4 @@
From e2505b43f26d0517aad97c2778958886568ad58b Mon Sep 17 00:00:00 2001
From ee590f3816dd8a60014214cdbd9c34c4489a842b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 30 May 2015 02:55:03 +0200
Subject: [PATCH] ddraw: Allow size and format conversions in
@@ -9,10 +9,10 @@ Subject: [PATCH] ddraw: Allow size and format conversions in
1 file changed, 82 insertions(+), 71 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 421ce68fa1c..b2c674eba7a 100644
index 33f38949c15..099f3e92d98 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5321,6 +5321,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
@@ -5473,6 +5473,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
return impl_from_IDirectDrawSurface7(next_level);
}
@@ -27,22 +27,22 @@ index 421ce68fa1c..b2c674eba7a 100644
+ if (!(format1->dwFlags & DDPF_ALPHA))
+ {
+ /* The RGB and YUV bits are stored in the same fields */
+ if (format1->u1.dwRGBBitCount != format2->u1.dwRGBBitCount)
+ if (format1->dwRGBBitCount != format2->dwRGBBitCount)
+ return FALSE;
+
+ if (format1->u2.dwRBitMask != format2->u2.dwRBitMask)
+ if (format1->dwRBitMask != format2->dwRBitMask)
+ return FALSE;
+
+ if (format1->u3.dwGBitMask != format2->u3.dwGBitMask)
+ if (format1->dwGBitMask != format2->dwGBitMask)
+ return FALSE;
+
+ if (format1->u4.dwBBitMask != format2->u4.dwBBitMask)
+ if (format1->dwBBitMask != format2->dwBBitMask)
+ return FALSE;
+ }
+
+ if (format1->dwFlags & (DDPF_ALPHAPIXELS | DDPF_ALPHA))
+ {
+ if (format1->u5.dwRGBAlphaBitMask != format2->u5.dwRGBAlphaBitMask)
+ if (format1->dwRGBAlphaBitMask != format2->dwRGBAlphaBitMask)
+ return FALSE;
+ }
+ }
@@ -59,7 +59,7 @@ index 421ce68fa1c..b2c674eba7a 100644
/*****************************************************************************
* IDirect3DTexture2::Load
*
@@ -5342,7 +5382,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5494,7 +5534,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
{
struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface);
struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture);
@@ -68,7 +68,7 @@ index 421ce68fa1c..b2c674eba7a 100644
HRESULT hr;
TRACE("iface %p, src_texture %p.\n", iface, src_texture);
@@ -5355,90 +5395,62 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5507,90 +5547,62 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
wined3d_mutex_lock();
@@ -77,7 +77,7 @@ index 421ce68fa1c..b2c674eba7a 100644
-
- if (((src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
- != (dst_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP))
- || (src_surface->surface_desc.u2.dwMipMapCount != dst_surface->surface_desc.u2.dwMipMapCount))
- || (src_surface->surface_desc.dwMipMapCount != dst_surface->surface_desc.dwMipMapCount))
- {
- ERR("Trying to load surfaces with different mip-map counts.\n");
- }
@@ -98,8 +98,8 @@ index 421ce68fa1c..b2c674eba7a 100644
- src_pal = src_surface->palette;
-
- if (src_pal)
+ if (compare_format(&src_surface->surface_desc.u4.ddpfPixelFormat,
+ &dst_surface->surface_desc.u4.ddpfPixelFormat))
+ if (compare_format(&src_surface->surface_desc.ddpfPixelFormat,
+ &dst_surface->surface_desc.ddpfPixelFormat))
{
- PALETTEENTRY palent[256];
+ struct ddraw_palette *dst_pal, *src_pal;
@@ -125,7 +125,7 @@ index 421ce68fa1c..b2c674eba7a 100644
- if ((src_desc->dwWidth != dst_desc->dwWidth) || (src_desc->dwHeight != dst_desc->dwHeight))
- {
- /* Should also check for same pixel format, u1.lPitch, ... */
- /* Should also check for same pixel format, lPitch, ... */
- ERR("Error in surface sizes.\n");
- wined3d_mutex_unlock();
- return D3DERR_TEXTURE_LOAD_FAILED;
@@ -175,8 +175,8 @@ index 421ce68fa1c..b2c674eba7a 100644
+ /* Suppress the ALLOCONLOAD flag */
+ dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
- if (dst_surface->surface_desc.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC)
- memcpy(dst_map_desc.data, src_map_desc.data, src_surface->surface_desc.u1.dwLinearSize);
- if (dst_surface->surface_desc.ddpfPixelFormat.dwFlags & DDPF_FOURCC)
- memcpy(dst_map_desc.data, src_map_desc.data, src_surface->surface_desc.dwLinearSize);
- else
- memcpy(dst_map_desc.data, src_map_desc.data, src_map_desc.row_pitch * src_desc->dwHeight);
+ SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth, src_surface->surface_desc.dwHeight);
@@ -197,7 +197,7 @@ index 421ce68fa1c..b2c674eba7a 100644
}
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
@@ -5451,12 +5463,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5603,12 +5615,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
else
dst_surface = NULL;
@@ -214,5 +214,5 @@ index 421ce68fa1c..b2c674eba7a 100644
wined3d_mutex_unlock();
--
2.34.1
2.40.1

View File

@@ -37,19 +37,19 @@ index 87d0648b699..e88bbf59767 100644
+ ddsd.dwSize = sizeof(ddsd);
+
+ hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL);
+ ok(hr == DD_OK, "IDirectDrawSurface_Lock returned: %x\n", hr);
+ ok(hr == DD_OK, "IDirectDrawSurface_Lock returned: %lx\n", hr);
+
+ for (y = 0; y < ddsd.dwHeight; y++)
+ {
+ if (U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount == 32)
+ if (ddsd.ddpfPixelFormat.dwRGBBitCount == 32)
+ {
+ DWORD *textureRow = (DWORD *)((char *)ddsd.lpSurface + y * U1(ddsd).lPitch);
+ DWORD *textureRow = (DWORD *)((char *)ddsd.lpSurface + y * ddsd.lPitch);
+ for (x = 0; x < ddsd.dwWidth; x++)
+ *textureRow++ = fillcolor;
+ }
+ else if (U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount == 16)
+ else if (ddsd.ddpfPixelFormat.dwRGBBitCount == 16)
+ {
+ WORD *textureRow = (WORD *)((char *)ddsd.lpSurface + y * U1(ddsd).lPitch);
+ WORD *textureRow = (WORD *)((char *)ddsd.lpSurface + y * ddsd.lPitch);
+ for (x = 0; x < ddsd.dwWidth; x++)
+ *textureRow++ = fillcolor;
+ }
@@ -61,7 +61,7 @@ index 87d0648b699..e88bbf59767 100644
+ }
+
+ hr = IDirectDrawSurface_Unlock(surface, NULL);
+ ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned: %x\n", hr);
+ ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned: %lx\n", hr);
+ }
+
+ if (level != -1 && curlevel >= level)
@@ -101,18 +101,18 @@ index 87d0648b699..e88bbf59767 100644
+ ddsd.dwSize = sizeof(ddsd);
+
+ hr = IDirectDrawSurface_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL);
+ ok(hr == DD_OK, "IDirectDrawSurface_Lock returned: %x\n", hr);
+ ok(hr == DD_OK, "IDirectDrawSurface_Lock returned: %lx\n", hr);
+
+ for (y = 0; y < ddsd.dwHeight; y++)
+ {
+ if (U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount == 32)
+ if (ddsd.ddpfPixelFormat.dwRGBBitCount == 32)
+ {
+ DWORD *textureRow = (DWORD *)((char *)ddsd.lpSurface + y * U1(ddsd).lPitch);
+ DWORD *textureRow = (DWORD *)((char *)ddsd.lpSurface + y * ddsd.lPitch);
+ for (x = 0; x < ddsd.dwWidth; x++)
+ {
+ if ((*textureRow & 0x00ffffff) != fillcolor)
+ {
+ ok(0, "Expected color %x, got %x at (%d, %d) in level %d\n",
+ ok(0, "Expected color %lx, got %lx at (%ld, %ld) in level %d\n",
+ fillcolor, *textureRow, x, y, curlevel);
+ result = FALSE;
+ goto end;
@@ -120,14 +120,14 @@ index 87d0648b699..e88bbf59767 100644
+ textureRow++;
+ }
+ }
+ else if (U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount == 16)
+ else if (ddsd.ddpfPixelFormat.dwRGBBitCount == 16)
+ {
+ WORD *textureRow = (WORD *)((char *)ddsd.lpSurface + y * U1(ddsd).lPitch);
+ WORD *textureRow = (WORD *)((char *)ddsd.lpSurface + y * ddsd.lPitch);
+ for (x = 0; x < ddsd.dwWidth; x++)
+ {
+ if (*textureRow != fillcolor)
+ {
+ ok(0, "Expected color %x, got %x at (%d, %d) in level %d\n",
+ ok(0, "Expected color %lx, got %lx at (%ld, %ld) in level %ld\n",
+ fillcolor, *textureRow, x, y, curlevel);
+ result = FALSE;
+ goto end;
@@ -144,7 +144,7 @@ index 87d0648b699..e88bbf59767 100644
+
+ end:
+ hr = IDirectDrawSurface_Unlock(surface, NULL);
+ ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned: %x\n", hr);
+ ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned: %lx\n", hr);
+ }
+
+ if (level != -1 && curlevel >= level)
@@ -322,24 +322,24 @@ index 87d0648b699..e88bbf59767 100644
+ ddsd2.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
+ ddsd2.ddpfPixelFormat.dwSize = sizeof(ddsd2.ddpfPixelFormat);
+ ddsd2.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount = load_tests[i].surfaces[j].format->dwRGBBitCount;
+ U2(U4(ddsd2).ddpfPixelFormat).dwRBitMask = load_tests[i].surfaces[j].format->dwRBitMask;
+ U3(U4(ddsd2).ddpfPixelFormat).dwGBitMask = load_tests[i].surfaces[j].format->dwGBitMask;
+ U4(U4(ddsd2).ddpfPixelFormat).dwBBitMask = load_tests[i].surfaces[j].format->dwBBitMask;
+ ddsd2.ddpfPixelFormat.dwRGBBitCount = load_tests[i].surfaces[j].format->dwRGBBitCount;
+ ddsd2.ddpfPixelFormat.dwRBitMask = load_tests[i].surfaces[j].format->dwRBitMask;
+ ddsd2.ddpfPixelFormat.dwGBitMask = load_tests[i].surfaces[j].format->dwGBitMask;
+ ddsd2.ddpfPixelFormat.dwBBitMask = load_tests[i].surfaces[j].format->dwBBitMask;
+
+ if (load_tests[i].surfaces[j].levels)
+ {
+ ddsd2.dwFlags |= DDSD_MIPMAPCOUNT;
+ ddsd2.ddsCaps.dwCaps |= DDSCAPS_MIPMAP | DDSCAPS_COMPLEX;
+ U2(ddsd2).dwMipMapCount = load_tests[i].surfaces[j].levels;
+ ddsd2.dwMipMapCount = load_tests[i].surfaces[j].levels;
+ }
+
+ hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd2, &TexSurfaces[j], NULL);
+ ok(hr == D3D_OK, "IDirectDraw_CreateSurface returned %08x for surface %d in test %d\n", hr, j, i);
+ ok(hr == D3D_OK, "IDirectDraw_CreateSurface returned %08lx for surface %d in test %d\n", hr, j, i);
+ if (FAILED(hr)) goto next;
+
+ hr = IDirectDrawSurface_QueryInterface(TexSurfaces[j], &IID_IDirect3DTexture, (void *)&Textures[j]);
+ ok(hr == D3D_OK, "IDirectDrawSurface_QueryInterface returned %08x for surface %d in test %d\n", hr, j, i);
+ ok(hr == D3D_OK, "IDirectDrawSurface_QueryInterface returned %08lx for surface %d in test %d\n", hr, j, i);
+ if (FAILED(hr)) goto next;
+
+ if (load_tests[i].surfaces[j].levels)
@@ -352,19 +352,19 @@ index 87d0648b699..e88bbf59767 100644
+ }
+
+ hr = IDirect3DTexture_Load(Textures[1], Textures[0]);
+ ok(hr == load_tests[i].hres, "IDirect3DTexture_Load returned %08x, expected %08x\n", hr, load_tests[i].hres);
+ ok(hr == load_tests[i].hres, "IDirect3DTexture_Load returned %08lx, expected %08x\n", hr, load_tests[i].hres);
+ if (hr != DD_OK) goto next;
+
+ memset(&ddsd2, 0, sizeof (ddsd2));
+ ddsd2.dwSize = sizeof(ddsd2);
+ hr = IDirectDrawSurface_GetSurfaceDesc(TexSurfaces[1], &ddsd2);
+ ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc returned %08x\n", hr);
+ ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc returned %08lx\n", hr);
+
+ if (load_tests[i].surfaces[1].levels)
+ {
+ ok(U2(ddsd2).dwMipMapCount == load_tests[i].surfaces[1].levels,
+ ok(ddsd2.dwMipMapCount == load_tests[i].surfaces[1].levels,
+ "Expected %d mipmap levels, got %d in run %d\n", load_tests[i].surfaces[1].levels,
+ U2(ddsd2).dwMipMapCount, i);
+ ddsd2.dwMipMapCount, i);
+ }
+
+ for (k = 0; k < load_tests[i].level_check; k++)
@@ -373,21 +373,21 @@ index 87d0648b699..e88bbf59767 100644
+ ok(0, "Check surface failed in test %d\n", i);
+ }
+
+ ok(U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount == load_tests[i].surfaces[1].format->dwRGBBitCount,
+ ok(ddsd2.ddpfPixelFormat.dwRGBBitCount == load_tests[i].surfaces[1].format->dwRGBBitCount,
+ "Expected %d rgb bits, got %d in run %d\n", load_tests[i].surfaces[1].format->dwRGBBitCount,
+ U1(U4(ddsd2).ddpfPixelFormat).dwRGBBitCount, i);
+ ddsd2.ddpfPixelFormat.dwRGBBitCount, i);
+
+ ok(U1(U4(ddsd2).ddpfPixelFormat).dwRBitMask == load_tests[i].surfaces[1].format->dwRBitMask,
+ ok(ddsd2.ddpfPixelFormat.dwRBitMask == load_tests[i].surfaces[1].format->dwRBitMask,
+ "Expected %08x red bits, got %08x in run %d\n", load_tests[i].surfaces[1].format->dwRBitMask,
+ U1(U4(ddsd2).ddpfPixelFormat).dwRBitMask, i);
+ ddsd2.ddpfPixelFormat.dwRBitMask, i);
+
+ ok(U1(U4(ddsd2).ddpfPixelFormat).dwGBitMask == load_tests[i].surfaces[1].format->dwGBitMask,
+ ok(ddsd2.ddpfPixelFormat.dwGBitMask == load_tests[i].surfaces[1].format->dwGBitMask,
+ "Expected %08x green bits, got %08x in run %d\n", load_tests[i].surfaces[1].format->dwGBitMask,
+ U1(U4(ddsd2).ddpfPixelFormat).dwGBitMask, i);
+ ddsd2.ddpfPixelFormat.dwGBitMask, i);
+
+ ok(U1(U4(ddsd2).ddpfPixelFormat).dwBBitMask == load_tests[i].surfaces[1].format->dwBBitMask,
+ ok(ddsd2.ddpfPixelFormat.dwBBitMask == load_tests[i].surfaces[1].format->dwBBitMask,
+ "Expected %08x blue bits, got %08x in run %d\n", load_tests[i].surfaces[1].format->dwBBitMask,
+ U1(U4(ddsd2).ddpfPixelFormat).dwBBitMask, i);
+ ddsd2.ddpfPixelFormat.dwBBitMask, i);
+
+ next:
+ if (Textures[0]) IDirect3DTexture_Release(Textures[0]);
@@ -425,10 +425,10 @@ index 2d08718d131..0a2d575e8cc 100644
ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY;
+ ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat);
+ ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(ddsd.ddpfPixelFormat).dwRBitMask = 0x00FF0000;
+ U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000FF00;
+ U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000FF;
+ ddsd.ddpfPixelFormat.dwRGBBitCount = 32;
+ ddsd.ddpfPixelFormat.dwRBitMask = 0x00FF0000;
+ ddsd.ddpfPixelFormat.dwGBitMask = 0x0000FF00;
+ ddsd.ddpfPixelFormat.dwBBitMask = 0x000000FF;
+
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &src, NULL);
ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr);
@@ -436,13 +436,13 @@ index 2d08718d131..0a2d575e8cc 100644
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &dst, NULL);
ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
+ U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 16;
+ U2(ddsd.ddpfPixelFormat).dwRBitMask = 0xf800;
+ U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x07e0;
+ U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x001f;
+ ddsd.ddpfPixelFormat.dwRGBBitCount = 16;
+ ddsd.ddpfPixelFormat.dwRBitMask = 0xf800;
+ ddsd.ddpfPixelFormat.dwGBitMask = 0x07e0;
+ ddsd.ddpfPixelFormat.dwBBitMask = 0x001f;
+
+ hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &dst2, NULL);
+ ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
+
hr = IDirectDrawSurface_QueryInterface(src, &IID_IDirect3DTexture, (void **)&src_tex);
ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
@@ -463,7 +463,7 @@ index 2d08718d131..0a2d575e8cc 100644
+ /* Source surface has a color key but destination differs in format */
+ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0;
+ hr = IDirect3DTexture_Load(dst2_tex, src_tex);
+ ok(hr == E_FAIL, "Got unexpected hr %#x, expected E_FAIL.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx, expected E_FAIL.\n", hr);
+
/* Both surfaces have a color key: Dest ckey is overwritten */
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x000000ff;

View File

@@ -0,0 +1,34 @@
From b2764b3d21a64c3c194b29b9cb71379456e03b06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 7 Jul 2023 12:44:26 +0200
Subject: [PATCH] dinput: Avoid duplicated objects in keyboard devices.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55205
---
dlls/dinput/keyboard.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index cbcbf94f0f6..3fd75bb10e6 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -265,13 +265,15 @@ static HRESULT keyboard_enum_objects( IDirectInputDevice8W *iface, const DIPROPH
.dwOfs = DIK_ESCAPE,
.dwType = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( DIK_ESCAPE ),
};
+ BOOL ret, mapped[0x100] = {0};
DWORD index, i, dik;
- BOOL ret;
for (i = 0, index = 0; i < 512; ++i)
{
if (!GetKeyNameTextW( i << 16, instance.tszName, ARRAY_SIZE(instance.tszName) )) continue;
if (!(dik = map_dik_code( i, 0, subtype, impl->base.dinput->dwVersion ))) continue;
+ if (mapped[dik]) continue;
+ mapped[dik] = TRUE;
instance.dwOfs = dik;
instance.dwType = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( dik );
ret = try_enum_object( &impl->base, filter, flags, callback, index++, &instance, context );
--
2.40.1

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