You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
117 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
da76250fad | ||
|
9d9c5c700a | ||
|
0b96046f15 | ||
|
cc31308c32 | ||
|
559b29238c | ||
|
e2d51dfc4b | ||
|
d3de5eadd9 | ||
|
4fa70d510c | ||
|
505a83ad9e | ||
|
a1e634bca9 | ||
|
13a418812a | ||
|
965789d221 | ||
|
2a2c8b5228 | ||
|
c210ef9f59 | ||
|
dab36ebe1e | ||
|
1ca1b3b602 | ||
|
2b16926188 | ||
|
bbbe9cbbc7 | ||
|
1142823d53 | ||
|
390b1f4127 | ||
|
1942fb8bc1 | ||
|
52f252eeb6 | ||
|
8493f61af5 | ||
|
6b7e43830c | ||
|
4482bd3493 | ||
|
b285e35fca | ||
|
a88d536fba | ||
|
e5cf862a14 | ||
|
df9ad11eef | ||
|
94caef272e | ||
|
d745d08cd7 | ||
|
a6448966cf | ||
|
01fbf6d356 | ||
|
e57244a59e | ||
|
fe6a869e0b | ||
|
a45cfa1ee2 | ||
|
abbfbb8e15 | ||
|
6882ba5e7b | ||
|
b97718a0a9 | ||
|
1fe536ee75 | ||
|
2d8c5f88c3 | ||
|
ef85449de2 | ||
|
d94c192f10 | ||
|
fcff74d6c6 | ||
|
22ba0ef2a3 | ||
|
95679a2f40 | ||
|
a7a75d0d06 | ||
|
e930be3974 | ||
|
d7080ec990 | ||
|
22d9eec489 | ||
|
eb5a19f4fd | ||
|
db6b479557 | ||
|
f14d68c258 | ||
|
117d2b2107 | ||
|
8273be2218 | ||
|
adda594159 | ||
|
710e29cc68 | ||
|
6c167535e3 | ||
|
e9b0c33d65 | ||
|
d44a516142 | ||
|
453c5cda07 | ||
|
d3d87f1a2c | ||
|
42e2a72d37 | ||
|
d7bbcc7ad9 | ||
|
4625289771 | ||
|
cda4a1e125 | ||
|
1039d808e2 | ||
|
6173bd8b0d | ||
|
ba6e2398d7 | ||
|
2dcacd0dbf | ||
|
1039396c8e | ||
|
f8cc3baab3 | ||
|
7665942477 | ||
|
0cd181d0ce | ||
|
a580edefe1 | ||
|
fe6cfefe64 | ||
|
6900845545 | ||
|
3e3ebf5cfc | ||
|
f48794a9ce | ||
|
27397d1764 | ||
|
ca7fc8fb51 | ||
|
cc0df4cd1b | ||
|
8791ceb20d | ||
|
09808df495 | ||
|
9c995c8d8e | ||
|
b72829659d | ||
|
88ffa2bda8 | ||
|
2524bc48fe | ||
|
00ec1171cc | ||
|
277ed0c6fb | ||
|
0c2c469c7b | ||
|
7f36a96808 | ||
|
566a2bcdfd | ||
|
4eb322dc41 | ||
|
182d6c76e3 | ||
|
3e931ce80f | ||
|
716e192182 | ||
|
fba1e773c7 | ||
|
26a1ee0ee9 | ||
|
9d65092519 | ||
|
49dcc78363 | ||
|
64774ec3e5 | ||
|
4211bac798 | ||
|
aaa21bda9c | ||
|
9d5115a9ee | ||
|
9cb0330037 | ||
|
abe75a7741 | ||
|
be92c5d768 | ||
|
6d45ccd523 | ||
|
6dbab0f2e5 | ||
|
e0766792bd | ||
|
df3886edb6 | ||
|
7bcf1f6358 | ||
|
cd4d265f07 | ||
|
cf29ed121d | ||
|
09634de79c | ||
|
68cc39d3ba |
@@ -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("%d, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
|
||||
+
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
--
|
||||
2.40.1
|
||||
|
1
patches/d3d12core-D3D12GetInterface/definition
Normal file
1
patches/d3d12core-D3D12GetInterface/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [55135] d3d12core: Add D3D12GetInterface stub
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -0,0 +1,127 @@
|
||||
From cf47173eec41f4427248796a781e3aa4463a79db Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mu=C5=BCy=C5=82o?= <galtgendo@o2.pl>
|
||||
Date: Wed, 7 Jun 2023 08:17:59 +1000
|
||||
Subject: [PATCH] d3dx9: Improve handling of Sprite render states
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/sprite.c | 76 +++++++++++++++++++++++-------------------
|
||||
1 file changed, 41 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c
|
||||
index 1a072e52cda..0ce2ab977f3 100644
|
||||
--- a/dlls/d3dx9_36/sprite.c
|
||||
+++ b/dlls/d3dx9_36/sprite.c
|
||||
@@ -193,7 +193,7 @@ static HRESULT WINAPI d3dx9_sprite_SetWorldViewLH(ID3DXSprite *iface,
|
||||
}
|
||||
|
||||
/* Helper function */
|
||||
-static void set_states(struct d3dx9_sprite *object)
|
||||
+static void set_states(struct d3dx9_sprite *object, DWORD flags)
|
||||
{
|
||||
D3DXMATRIX mat;
|
||||
D3DVIEWPORT9 vp;
|
||||
@@ -204,32 +204,35 @@ static void set_states(struct d3dx9_sprite *object)
|
||||
IDirect3DDevice9_SetNPatchMode(object->device, 0.0f);
|
||||
|
||||
/* Render states */
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAFUNC, D3DCMP_GREATER);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAREF, 0x00);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHATESTENABLE, object->alphacmp_caps);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_BLENDOP, D3DBLENDOP_ADD);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPING, TRUE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPLANEENABLE, 0);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE |
|
||||
- D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_FOGENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_LIGHTING, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_RANGEFOGENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SPECULARENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRGBWRITEENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_STENCILENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_VERTEXBLEND, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_WRAP0, 0);
|
||||
+ if (!(flags & D3DXSPRITE_DONOTMODIFY_RENDERSTATE))
|
||||
+ {
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAFUNC, D3DCMP_GREATER);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAREF, 0x00);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHATESTENABLE, object->alphacmp_caps);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_BLENDOP, D3DBLENDOP_ADD);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPING, TRUE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPLANEENABLE, 0);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE |
|
||||
+ D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_FOGENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_LIGHTING, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_RANGEFOGENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SPECULARENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRGBWRITEENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_STENCILENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_VERTEXBLEND, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_WRAP0, 0);
|
||||
+ }
|
||||
|
||||
/* Texture stage states */
|
||||
IDirect3DDevice9_SetTextureStageState(object->device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||
@@ -266,12 +269,15 @@ static void set_states(struct d3dx9_sprite *object)
|
||||
IDirect3DDevice9_SetSamplerState(object->device, 0, D3DSAMP_SRGBTEXTURE, 0);
|
||||
|
||||
/* Matrices */
|
||||
- D3DXMatrixIdentity(&mat);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view);
|
||||
- IDirect3DDevice9_GetViewport(object->device, &vp);
|
||||
- D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat);
|
||||
+ if (!(flags & D3DXSPRITE_OBJECTSPACE))
|
||||
+ {
|
||||
+ D3DXMatrixIdentity(&mat);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view);
|
||||
+ IDirect3DDevice9_GetViewport(object->device, &vp);
|
||||
+ D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_sprite_Begin(ID3DXSprite *iface, DWORD flags)
|
||||
@@ -317,7 +323,7 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
|
||||
hr=IDirect3DDevice9_BeginStateBlock(This->device);
|
||||
if(hr!=D3D_OK) return hr;
|
||||
|
||||
- set_states(This);
|
||||
+ set_states(This, flags);
|
||||
|
||||
IDirect3DDevice9_SetVertexDeclaration(This->device, This->vdecl);
|
||||
IDirect3DDevice9_SetStreamSource(This->device, 0, NULL, 0, sizeof(struct sprite_vertex));
|
||||
@@ -330,7 +336,7 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
|
||||
}
|
||||
|
||||
/* Apply device state */
|
||||
- set_states(This);
|
||||
+ set_states(This, flags);
|
||||
|
||||
This->flags=flags;
|
||||
This->ready=TRUE;
|
||||
--
|
||||
2.40.1
|
||||
|
1
patches/d3dx9-sprite-state/definition
Normal file
1
patches/d3dx9-sprite-state/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [54034] d3dx9: Improve sprite rendering state handling.
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f78fc333748a6c4f664bb10ee2115c86690b3b16 Mon Sep 17 00:00:00 2001
|
||||
From e9f5c886b6b40ca77eb1dd7f0d21bbdc483b7a95 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,12 +9,12 @@ 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..2e11bb2b62d 100644
|
||||
index 74647820126..9f0aad2fc4f 100644
|
||||
--- a/dlls/dbghelp/Makefile.in
|
||||
+++ b/dlls/dbghelp/Makefile.in
|
||||
@@ -2,7 +2,7 @@ MODULE = dbghelp.dll
|
||||
IMPORTLIB = dbghelp
|
||||
IMPORTS = $(ZLIB_PE_LIBS)
|
||||
IMPORTS = kernelbase $(ZLIB_PE_LIBS)
|
||||
EXTRAINCL = $(ZLIB_PE_CFLAGS)
|
||||
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
|
||||
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="L\"${bindir}\""
|
||||
@@ -22,10 +22,10 @@ index 22be2612eeb..2e11bb2b62d 100644
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
|
||||
index 3c1e225e195..4468f7fa4ed 100644
|
||||
index a2a60752a68..a2bca11048f 100644
|
||||
--- a/dlls/dbghelp/elf_module.c
|
||||
+++ b/dlls/dbghelp/elf_module.c
|
||||
@@ -1445,6 +1445,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
@@ -1457,6 +1457,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 3c1e225e195..4468f7fa4ed 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -19,7 +19,7 @@ index 8d608656143..cc8adccf049 100644
|
||||
+{
|
||||
+ DDCAPS *caps = ctx;
|
||||
+
|
||||
+ switch (format->u1.dwZBufferBitDepth)
|
||||
+ switch (format->dwZBufferBitDepth)
|
||||
+ {
|
||||
+ case 8:
|
||||
+ caps->dwZBufferBitDepths |= DDBD_8;
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -1,29 +0,0 @@
|
||||
From ff117878cb3a0c74a50355ca64ac36c5fe6cee67 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 10 Mar 2017 22:07:37 +0100
|
||||
Subject: ddraw: Silence noisy FIXME about unimplemented
|
||||
D3DPROCESSVERTICES_UPDATEEXTENTS.
|
||||
|
||||
---
|
||||
dlls/ddraw/executebuffer.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
|
||||
index 393c52c1e2..9b64c687d3 100644
|
||||
--- a/dlls/ddraw/executebuffer.c
|
||||
+++ b/dlls/ddraw/executebuffer.c
|
||||
@@ -302,7 +302,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
|
||||
ci->wStart, ci->wDest, ci->dwCount, ci->dwFlags);
|
||||
|
||||
if (ci->dwFlags & D3DPROCESSVERTICES_UPDATEEXTENTS)
|
||||
- FIXME("D3DPROCESSVERTICES_UPDATEEXTENTS not implemented.\n");
|
||||
+ {
|
||||
+ static int once;
|
||||
+ if (!once++) FIXME("D3DPROCESSVERTICES_UPDATEEXTENTS not implemented.\n");
|
||||
+ }
|
||||
if (ci->dwFlags & D3DPROCESSVERTICES_NOCOLOR)
|
||||
FIXME("D3DPROCESSVERTICES_NOCOLOR not implemented.\n");
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,17 +1,18 @@
|
||||
From 01097ee44ab6835a4c139261c188ae6535bfb311 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 | 77 ++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 63 insertions(+), 14 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 c001d1ef29a..d1ff222a653 100644
|
||||
index 6cc190ee7fb..2fd9329aa68 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -341,12 +341,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
|
||||
@@ -364,12 +364,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
|
||||
return type | (0x0000ff00 & (instance << 8));
|
||||
}
|
||||
|
||||
@@ -39,7 +40,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
{
|
||||
static const WCHAR *subkey = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
|
||||
HKEY hkey;
|
||||
@@ -357,8 +371,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
|
||||
@@ -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] */
|
||||
@@ -53,7 +54,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
|
||||
free( keyname );
|
||||
|
||||
@@ -378,7 +395,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;
|
||||
|
||||
@@ -64,7 +65,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
|
||||
if (!hkey)
|
||||
{
|
||||
@@ -413,7 +432,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
@@ -436,7 +455,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
HKEY hkey;
|
||||
WCHAR *guid_str;
|
||||
DIDEVICEINSTANCEW didev;
|
||||
@@ -73,7 +74,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
|
||||
didev.dwSize = sizeof(didev);
|
||||
IDirectInputDevice8_GetDeviceInfo(&This->IDirectInputDevice8W_iface, &didev);
|
||||
@@ -421,7 +440,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
@@ -444,7 +463,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
|
||||
return FALSE;
|
||||
|
||||
@@ -82,7 +83,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
|
||||
if (!hkey)
|
||||
{
|
||||
@@ -441,15 +460,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
@@ -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;
|
||||
@@ -106,7 +107,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
}
|
||||
|
||||
static BOOL set_app_data( struct dinput_device *dev, int offset, UINT_PTR app_data )
|
||||
@@ -1896,13 +1920,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
|
||||
@@ -1935,13 +1959,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
|
||||
load_success = load_mapping_settings( impl, format, username_buf );
|
||||
}
|
||||
|
||||
@@ -129,7 +130,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
genre = format->rgoAction[i].dwSemantic & DIGENRE_ANY;
|
||||
if (devMask == genre || (devMask == DIGENRE_ANY && genre != DIMOUSE_MASK && genre != DIKEYBOARD_MASK))
|
||||
{
|
||||
@@ -1934,6 +1963,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
|
||||
@@ -1973,6 +2002,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +145,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
if (!has_actions) return DI_NOEFFECT;
|
||||
if (flags & (DIDBAM_DEFAULT|DIDBAM_PRESERVE|DIDBAM_INITIALIZE|DIDBAM_HWDEFAULTS))
|
||||
FIXME( "Unimplemented flags %#lx\n", flags );
|
||||
@@ -1951,6 +1988,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
@@ -1990,6 +2027,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
DIPROPSTRING dps;
|
||||
WCHAR username_buf[MAX_PATH];
|
||||
DWORD username_len = MAX_PATH;
|
||||
@@ -152,7 +153,7 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
int i, action = 0, num_actions = 0;
|
||||
unsigned int offset = 0;
|
||||
const DIDATAFORMAT *df;
|
||||
@@ -1983,12 +2021,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
@@ -2022,12 +2060,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
data_format.dwFlags = DIDF_RELAXIS;
|
||||
data_format.dwDataSize = format->dwDataSize;
|
||||
|
||||
@@ -177,6 +178,81 @@ index c001d1ef29a..d1ff222a653 100644
|
||||
|
||||
/* Construct the dataformat and actionmap */
|
||||
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 } };
|
||||
|
||||
+static const GUID NULL_GUID = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+
|
||||
enum {
|
||||
DITEST_AXIS,
|
||||
DITEST_BUTTON,
|
||||
@@ -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=%#lx\n", hr);
|
||||
|
||||
+ /* Test that after changing actionformat SetActionMap has effect and that second
|
||||
+ * SetActionMap call with same empty actionformat has no effect */
|
||||
+ af.dwDataSize = 4 * 1;
|
||||
+ af.dwNumActions = 1;
|
||||
+
|
||||
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
|
||||
+ ok (hr != DI_NOEFFECT, "SetActionMap should have effect as actionformat has changed hr=%08x\n", hr);
|
||||
+
|
||||
+ 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);
|
||||
+
|
||||
af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
|
||||
af.dwNumActions = ARRAY_SIZE(actionMapping);
|
||||
|
||||
@@ -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 */
|
||||
+ af.rgoAction[0].dwObjID = 0;
|
||||
+ af.rgoAction[0].dwHow = 0;
|
||||
+ memset(&af.rgoAction[0].guidInstance, 0, sizeof(GUID));
|
||||
+ af.rgoAction[1].dwObjID = 0;
|
||||
+ af.rgoAction[1].dwHow = 0;
|
||||
+ memset(&af.rgoAction[1].guidInstance, 0, sizeof(GUID));
|
||||
+
|
||||
+ hr = IDirectInputDevice8_SetActionMap(pKey, &af, NULL, DIDSAM_FORCESAVE);
|
||||
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
|
||||
+
|
||||
+ if (hr == DI_SETTINGSNOTSAVED)
|
||||
+ {
|
||||
+ skip ("Can't test saving settings if SetActionMap returns DI_SETTINGSNOTSAVED\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ af.rgoAction[0].dwObjID = other_results[0];
|
||||
+ af.rgoAction[0].dwHow = DIAH_USERCONFIG;
|
||||
+ af.rgoAction[0].guidInstance = GUID_SysKeyboard;
|
||||
+ af.rgoAction[1].dwObjID = other_results[1];
|
||||
+ af.rgoAction[1].dwHow = DIAH_USERCONFIG;
|
||||
+ af.rgoAction[1].guidInstance = GUID_SysKeyboard;
|
||||
+
|
||||
+ hr = IDirectInputDevice8_BuildActionMap(pKey, &af, NULL, 0);
|
||||
+ ok (SUCCEEDED(hr), "BuildActionMap failed hr=%08x\n", hr);
|
||||
+
|
||||
+ ok (other_results[0] == af.rgoAction[0].dwObjID,
|
||||
+ "Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[0], af.rgoAction[0].dwObjID);
|
||||
+ ok (af.rgoAction[0].dwHow == DIAH_UNMAPPED, "dwHow should have been DIAH_UNMAPPED\n");
|
||||
+ ok (IsEqualGUID(&NULL_GUID, &af.rgoAction[0].guidInstance), "Action should not be mapped\n");
|
||||
+
|
||||
+ ok (other_results[1] == af.rgoAction[1].dwObjID,
|
||||
+ "Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[1], af.rgoAction[1].dwObjID);
|
||||
+ ok (af.rgoAction[1].dwHow == DIAH_UNMAPPED, "dwHow should have been DIAH_UNMAPPED\n");
|
||||
+ ok (IsEqualGUID(&NULL_GUID, &af.rgoAction[1].guidInstance), "Action should not be mapped\n");
|
||||
+
|
||||
IDirectInputDevice_Release(pKey);
|
||||
IDirectInput_Release(pDI);
|
||||
}
|
||||
--
|
||||
2.39.2
|
||||
2.34.1
|
||||
|
||||
|
@@ -1,73 +0,0 @@
|
||||
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.
|
||||
|
||||
---
|
||||
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 e826cc89c1e..a4815f24958 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -1741,8 +1741,15 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
|
||||
/* Count the actions */
|
||||
for (i = 0; i < format->dwNumActions; i++)
|
||||
- if (IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance ))
|
||||
+ {
|
||||
+ 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 && 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 ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
|
||||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
|
||||
+ {
|
||||
+ 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;
|
||||
+
|
||||
+ if (type == DIDFT_PSHBUTTON) type = DIDFT_BUTTON;
|
||||
+ else if (type == DIDFT_RELAXIS) type = DIDFT_AXIS;
|
||||
+
|
||||
+ obj = dataformat_to_odf_by_type(df, inst, type);
|
||||
+ TRACE("obj %p, inst 0x%08lx, type 0x%08lx\n", obj, inst, type);
|
||||
+ if(obj)
|
||||
+ {
|
||||
+ memcpy(&obj_df[action], obj, df->dwObjSize);
|
||||
+
|
||||
+ 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;
|
||||
+
|
||||
+ action++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (action == 0)
|
||||
+ {
|
||||
+ free( obj_df );
|
||||
+ return DI_NOEFFECT;
|
||||
}
|
||||
+ data_format.dwNumObjs = action;
|
||||
|
||||
IDirectInputDevice8_SetDataFormat( iface, &data_format );
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
@@ -1,3 +1,5 @@
|
||||
Fixes: [34108] dinput: Improve support for user Joystick configuration.
|
||||
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
|
||||
Fixes: [35815] dinput: Allow remapping of joystick buttons.
|
||||
# Seeing active work...
|
||||
Disabled: true
|
||||
|
@@ -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
|
||||
|
@@ -0,0 +1,64 @@
|
||||
From bdf952bf0711a7cf22fee840197234bd413ae611 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 7 Jul 2023 12:45:04 +0200
|
||||
Subject: [PATCH] dinput: Enumerate lower keyboard scancodes values first.
|
||||
|
||||
Windows usually doesn't have scancodes higher than 0x7f, or extended
|
||||
scancodes higher than 0x17f, but X11 does for several XF86 keys.
|
||||
|
||||
We want to enumerate the basic keys first including in the extended
|
||||
scancode range, so they appear before the XF86 keys in the dinput
|
||||
device object list.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55205
|
||||
---
|
||||
dlls/dinput/keyboard.c | 24 ++++++++++++++----------
|
||||
1 file changed, 14 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
|
||||
index 3fd75bb10e6..1f1db883b80 100644
|
||||
--- a/dlls/dinput/keyboard.c
|
||||
+++ b/dlls/dinput/keyboard.c
|
||||
@@ -256,6 +256,7 @@ static BOOL try_enum_object( struct dinput_device *impl, const DIPROPHEADER *fil
|
||||
static HRESULT keyboard_enum_objects( IDirectInputDevice8W *iface, const DIPROPHEADER *filter,
|
||||
DWORD flags, enum_object_callback callback, void *context )
|
||||
{
|
||||
+ static const UINT vsc_base[] = {0, 0x100, 0x80, 0x180};
|
||||
struct keyboard *impl = impl_from_IDirectInputDevice8W( iface );
|
||||
BYTE subtype = GET_DIDEVICE_SUBTYPE( impl->base.instance.dwDevType );
|
||||
DIDEVICEOBJECTINSTANCEW instance =
|
||||
@@ -266,18 +267,21 @@ static HRESULT keyboard_enum_objects( IDirectInputDevice8W *iface, const DIPROPH
|
||||
.dwType = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( DIK_ESCAPE ),
|
||||
};
|
||||
BOOL ret, mapped[0x100] = {0};
|
||||
- DWORD index, i, dik;
|
||||
+ DWORD index, i, dik, vsc;
|
||||
|
||||
- for (i = 0, index = 0; i < 512; ++i)
|
||||
+ for (i = 0, index = 0; i < ARRAY_SIZE(vsc_base); ++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 );
|
||||
- if (ret != DIENUM_CONTINUE) return DIENUM_STOP;
|
||||
+ for (vsc = vsc_base[i]; vsc < vsc_base[i] + 0x80; vsc++)
|
||||
+ {
|
||||
+ if (!GetKeyNameTextW( vsc << 16, instance.tszName, ARRAY_SIZE(instance.tszName) )) continue;
|
||||
+ if (!(dik = map_dik_code( vsc, 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 );
|
||||
+ if (ret != DIENUM_CONTINUE) return DIENUM_STOP;
|
||||
+ }
|
||||
}
|
||||
|
||||
return DIENUM_CONTINUE;
|
||||
--
|
||||
2.40.1
|
||||
|
2
patches/dinput-scancode/definition
Normal file
2
patches/dinput-scancode/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [55205] dinput: Improve keyboard devices scancode support.
|
||||
# PR 3264
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user