Compare commits

...

62 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
9807a02bb3 Release v4.18 2019-10-19 13:37:33 +11:00
Alistair Leslie-Hughes
eab8fd69f7 Rebase against 8c74027ba60a360f24cf232ee233e71262d8f1ff 2019-10-19 13:36:30 +11:00
Alistair Leslie-Hughes
b95882c061 Updated advapi32-LsaLookupSids patchset
Fix test in last rebase.
2019-10-18 10:10:00 +11:00
Alistair Leslie-Hughes
49b240d88c Rebase against 0fe003435e90dc32dd405a62af8fbcc20afc925d 2019-10-18 08:54:48 +11:00
Alistair Leslie-Hughes
c96aa29030 Added user32-InternalGetWindowIcon patchset 2019-10-14 10:40:38 +11:00
Alistair Leslie-Hughes
d432608737 Updated dinput-joy-mappings patchset 2019-10-11 14:20:41 +11:00
Alistair Leslie-Hughes
db09443c86 Updated ntdll-RtlIpv4StringToAddress reference 2019-10-11 13:34:43 +11:00
Alistair Leslie-Hughes
da73254259 Updated dinput-joy-mappings patchset
- Use heap_alloc/free
- Remove use of const buffers.
- Add "dinput: Dont allow Fixed actions to be changed."
2019-10-11 13:30:49 +11:00
Alistair Leslie-Hughes
a246130f81 Rebase against 89d9bcb1f19a03ffafa9a93a5f32049b4bfdaa00 2019-10-09 08:38:54 +11:00
Paul Gofman
042a633c8a Rebase against 15bf3eee2cf05ce98011458fc5e715f4524c4ebd 2019-10-04 02:11:27 +03:00
Zebediah Figura
cf04b8d6ac eventfd_synchronization: Cherry-pick some fixes. 2019-10-02 20:37:48 -05:00
Alistair Leslie-Hughes
6be963ebfd Rebase against 5e8eb5f4c54c3a6d3c92fd414372da2fbd5bd91a 2019-10-03 08:54:04 +10:00
Alistair Leslie-Hughes
5b066d6aed Disable user32-rawinput patchset
This is causing regressions across the board.
https://bugs.winehq.org/show_bug.cgi?id=47834

Star Craft 2, Borderlands, StarCitizen, Halo Online
2019-10-02 10:41:41 +10:00
Alistair Leslie-Hughes
c24cb89257 Rebase against b360cd67e8f7f8c01f09457bacb032fd4a248d0a 2019-10-02 10:11:40 +10:00
Paul Gofman
3d5bb83e05 Updated wined3d-zero-inf-shaders patchset.
Avoid infinity resulting from overflow in POW with multiply_setting set to 1.
2019-10-01 21:52:15 +03:00
Alistair Leslie-Hughes
0c7512f5f5 Updated user32-rawinput patchset 2019-09-29 18:06:18 +10:00
Alistair Leslie-Hughes
9fe5cabf21 Release v4.17 2019-09-28 13:26:48 +10:00
Paul Gofman
99c474f018 Updated d3d11-Deferred_Context patchset.
Fix device reference leak on command list release.
2019-09-27 17:30:48 +03:00
Paul Gofman
c942f42ee5 Remove wined3d-DXTn patchset.
Should be obsolete since 5a6efe632918fd18758897c39910d52791d46053
mainstream commit.
2019-09-27 17:30:48 +03:00
Paul Gofman
670a9e20c0 Updated d3d11-Deferred_Context patchset.
Add basic test for drawing with deferred context.
2019-09-27 17:30:27 +03:00
Paul Gofman
0c815a486b Updated d3d11-Deferred_Context patchset.
Fix test failures.
2019-09-27 16:42:57 +03:00
Paul Gofman
cdfddb170a Updated d3dx9_36-CloneEffect patchset.
Fix test failures.
2019-09-27 16:42:57 +03:00
Paul Gofman
c58f817de8 Updated d3dx9-32bpp_Alpha_Channel patchset.
Removed todo_wine from relevant test.
2019-09-27 16:42:57 +03:00
Paul Gofman
c7d0330ce8 Updated ddraw-Rendering_Targets patchset. 2019-09-27 04:09:44 +03:00
Paul Gofman
c6f7b46951 Updated d3dx9_36-Texture_Align patchset. 2019-09-27 04:04:51 +03:00
Paul Gofman
84a644848c Updated wined3d-SWVP-shaders patchset. 2019-09-27 03:53:25 +03:00
Paul Gofman
b24b3a88cc Rebase against f4ecef456595325f973487173cad3ac1269d87f9. 2019-09-27 01:05:22 +03:00
Alistair Leslie-Hughes
ced72a6a0a Add missing file 2019-09-25 19:35:51 +10:00
Alistair Leslie-Hughes
e09468ec17 Updated user32-rawinput patchset 2019-09-25 14:26:05 +10:00
Alistair Leslie-Hughes
81ac4ea01a Fix rebase 2019-09-25 14:05:04 +10:00
Alistair Leslie-Hughes
053de1b617 Drop mfplat-MFGetConfigurationDWORD patchset
Mixing Native/Builtin mfplat isn't supported.
2019-09-25 12:55:41 +10:00
Alistair Leslie-Hughes
47891c1826 Disable user32-rawinput
As Rémi Bernon patches will soon supersede this, disabled once again.
2019-09-25 12:55:30 +10:00
Alistair Leslie-Hughes
dd7f7cc1ba Rebase against ae8f605ede0054c8e380e809c196f2621d9cf423 2019-09-25 12:45:16 +10:00
Zebediah Figura
649c35ff92 Rebase against ae8f605ede0054c8e380e809c196f2621d9cf423. 2019-09-23 18:54:36 -05:00
Zebediah Figura
7c57b6eba4 Rebase against 27da4fa4498c3b6e0e46c72a9cdd13b620726e92. 2019-09-20 17:04:56 -05:00
Alistair Leslie-Hughes
c0389b0479 Enable user32-rawinput patchset 2019-09-20 08:59:46 +10:00
Alistair Leslie-Hughes
fd3b1a04e7 Added dsdmo-new-dll patchset 2019-09-19 11:54:33 +10:00
Alistair Leslie-Hughes
fab929969c Added dmime-PChannel-range patchset 2019-09-19 11:47:24 +10:00
Zebediah Figura
ccdf3d98ff uxtheme-GTK_Theming: Depend on uxtheme-CloseThemeClass. 2019-09-18 20:35:15 -05:00
Alistair Leslie-Hughes
1e58aad446 Correct GTK patchset change 2019-09-19 11:14:24 +10:00
Zebediah Figura
8dc124ce70 uxtheme-GTK_Theming: Various build fixes.
Don't add a new autoconf macro, just use the existing one.
2019-09-18 19:24:49 -05:00
Zebediah Figura
b6054fa105 Add some references to bug reports. 2019-09-18 18:39:54 -05:00
Zebediah Figura
fe6b2652ef ntdll-NtContinue: Fix rebase. 2019-09-18 18:23:55 -05:00
Alistair Leslie-Hughes
692d7d43e0 Rebase against e83f427a65726bfdefd2712a96f228e720c8b274 2019-09-19 08:53:36 +10:00
Alistair Leslie-Hughes
6bee4b6e76 Rebase against 12c09051b48507cf8bb37d500719661d0c6ad9f0 2019-09-18 08:15:22 +10:00
Alistair Leslie-Hughes
c323ef47c7 Release v4.16 2019-09-14 17:17:30 +10:00
Zebediah Figura
9e6693ed13 ntdll-Interrupt-0x2e: Fully handle interrupt 0x2e on the signal stack. 2019-09-13 17:12:40 -05:00
Zebediah Figura
29bdd4cd85 ntdll-Signal_Handler: Restore accidentally deleted hunk. 2019-09-13 17:03:26 -05:00
Zebediah Figura
39d7dcb2c6 Rebase against 3bf7473b880eea8b8dcaa43487afda2d7b1fbd03. 2019-09-13 17:03:00 -05:00
Alistair Leslie-Hughes
2e4d0f4727 Updated wined3d-zero-inf-shaders patchset 2019-09-13 09:28:30 +10:00
Alistair Leslie-Hughes
fd818b1914 Update mfplat-MFGetConfigurationDWORD patchset 2019-09-13 09:28:30 +10:00
Alistair Leslie-Hughes
26e542b4e5 Rebase against 85d8d1390467147fca416236fd50bb6ea2e2c8e4 2019-09-13 09:28:30 +10:00
Alistair Leslie-Hughes
6ef7be2566 Updated directmanipulation-new-dll patchset 2019-09-12 09:00:15 +10:00
Alistair Leslie-Hughes
5b012f08d5 Added mfplat-MFGetConfigurationDWORD patchset 2019-09-12 09:00:15 +10:00
Alistair Leslie-Hughes
8390ba0d95 Added wined3d-zero-inf-shaders patchset 2019-09-12 08:33:01 +10:00
Alistair Leslie-Hughes
fb18deb95f Rebase against 1413f577c592cd4aaeb3dba1a8adbe3e04d62d29 2019-09-11 09:26:34 +10:00
Alistair Leslie-Hughes
27b33a4be9 Remove setupapi-Display_Device patchset
This has been reported as fixed upstream and is no longer required.

Thanks Zhiyi Zhang.
2019-09-10 18:16:20 +10:00
Zebediah Figura
a15bdaa0ba Rebase against 01b19b63a454aa455928c10c694895fdba901aba. 2019-09-09 18:52:44 -05:00
Zebediah Figura
734918298c Rebase against 765815729fc4af2472e60551364e3b29dccfbcff. 2019-09-06 17:38:54 -05:00
Alistair Leslie-Hughes
bc1aa54891 Rebase against 92c00c51b21594987d342b5ce00c174ab4e84595 2019-09-05 08:52:02 +10:00
Alistair Leslie-Hughes
2da0d341f6 Rebase against 363b8809f37b3ea5915ea4240b3d397fd2355e2e 2019-09-04 08:23:20 +10:00
Alistair Leslie-Hughes
155cb0b051 Rebase against 0c2f5f8b15a4f7bb7008c3efb12b4cd3c774a3a1 2019-09-04 08:02:11 +10:00
124 changed files with 9085 additions and 4265 deletions

View File

@@ -1,4 +1,4 @@
From 5e4c31d0796f2e559889d4f84cdb571130217e7d Mon Sep 17 00:00:00 2001
From 14f3c7debf91be0e5b36299f330541f3146d00ca Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:58:40 +0100
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
@@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index f50133d..1bc7b59 100644
index be9ff88fe44..44c4426c9ff 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1815,7 +1815,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
@@ -1781,7 +1781,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
@@ -21,7 +21,7 @@ index f50133d..1bc7b59 100644
}
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1823,7 +1823,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1789,7 +1789,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
@@ -31,18 +31,18 @@ index f50133d..1bc7b59 100644
void get_logfont_from_font(IDWriteFont *iface, LOGFONTW *lf)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index f27fe9f..ee1eb5a 100644
index b9c712cd7fb..358d13963a7 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -5622,7 +5622,7 @@ static const IDWriteTextFormat2Vtbl dwritetextformatvtbl = {
@@ -5715,7 +5715,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
{
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
- CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat2_iface) : NULL;
+ CONTAINING_RECORD((IDWriteTextFormat2 *)iface, struct dwrite_textformat, IDWriteTextFormat2_iface) : NULL;
- CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
}
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
--
1.9.1
2.23.0

View File

@@ -1,7 +1,7 @@
From 83517396c266c2de290670128d678770f5d79cc9 Mon Sep 17 00:00:00 2001
From 486ec8b5ea1b39195d92cfdbfe3a334280780a14 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 28 Apr 2015 23:00:08 +0800
Subject: advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
Subject: [PATCH] advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
---
dlls/advapi32/security.c | 7 +++++--
@@ -9,10 +9,10 @@ Subject: advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index d27b2e7..2362dd5 100644
index a7707f15d39..73c1f054d5c 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -191,7 +191,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
@@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 };
static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 };
static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 };
@@ -21,7 +21,7 @@ index d27b2e7..2362dd5 100644
static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 };
static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 };
static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 };
@@ -2206,7 +2206,10 @@ LookupAccountSidW(
@@ -1185,7 +1185,10 @@ LookupAccountSidW(
ac = Domain_Admins;
break;
case DOMAIN_GROUP_RID_USERS:
@@ -34,20 +34,23 @@ index d27b2e7..2362dd5 100644
case DOMAIN_GROUP_RID_GUESTS:
ac = Domain_Guests;
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 573119f..490ce26 100644
index 5f65ed385dd..a9d745cfe39 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -2578,8 +2578,8 @@ static void test_process_security(void)
@@ -3003,11 +3003,11 @@ static void test_process_security(void)
dom_size = sizeof(domain);
ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use );
ok(ret, "LookupAccountSid failed with %d\n", ret);
- todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
+ ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH)
skip("Non-English locale (test with hardcoded 'None')\n");
else
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
res = GetTokenInformation( token, TokenUser, NULL, 0, &size );
ok(!res, "Expected failure, got %d\n", res);
--
2.3.5
2.17.1

View File

@@ -0,0 +1,3 @@
# Originally sent 2015 April by Qian Hong, apparently dropped off the list:
# <https://www.winehq.org/pipermail/wine-patches/2015-April/138515.html>
# Some of the patches were labeled as for Cygwin.

View File

@@ -1,17 +1,18 @@
From 9f36741fe5895aaf8aa5a954b78db09e32c2db3a Mon Sep 17 00:00:00 2001
From 896b9be78dfd979ddea8f098ae66473956d4147c Mon Sep 17 00:00:00 2001
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
Date: Sat, 24 Sep 2016 06:51:24 +0300
Subject: [PATCH] d3d11: Add stub deferred rendering context.
---
dlls/d3d11/device.c | 1267 +++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 1129 insertions(+), 138 deletions(-)
dlls/d3d11/device.c | 1268 +++++++++++++++++++++++++++++++++-----
dlls/d3d11/tests/d3d11.c | 4 +-
2 files changed, 1132 insertions(+), 140 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 8f9a850..b7cdd49 100644
index 31c7f35fc25..dca5a88caa0 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -25,6 +25,16 @@
@@ -22,6 +22,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
@@ -28,7 +29,7 @@ index 8f9a850..b7cdd49 100644
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
@@ -2886,218 +2896,1186 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
@@ -2883,218 +2893,1186 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
wined3d_private_store_cleanup(&context->private_store);
}
@@ -1351,13 +1352,14 @@ index 8f9a850..b7cdd49 100644
iface, byte_code, byte_code_length, class_linkage, shader);
if (class_linkage)
@@ -3365,9 +4343,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
@@ -3362,10 +4340,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device2 *iface, UINT flags,
ID3D11DeviceContext **context)
{
- FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context);
+ struct d3d11_deferred_context *object;
- *context = NULL;
- return E_NOTIMPL;
+ TRACE("iface %p, flags %#x, context %p.\n", iface, flags, context);
+
@@ -1365,7 +1367,7 @@ index 8f9a850..b7cdd49 100644
+ return E_OUTOFMEMORY;
+
+ object->ID3D11DeviceContext_iface.lpVtbl = &d3d11_deferred_context_vtbl;
+ object->device = iface;
+ object->device = (ID3D11Device *)iface;
+ object->refcount = 1;
+
+ ID3D11Device2_AddRef(iface);
@@ -1376,6 +1378,28 @@ index 8f9a850..b7cdd49 100644
}
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device2 *iface, HANDLE resource, REFIID iid,
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index da4627d7a85..dadeac27662 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -2231,6 +2231,8 @@ static void test_create_deferred_context(void)
hr = ID3D11Device_CreateDeferredContext(device, 0, &context);
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Failed to create deferred context, hr %#x.\n", hr);
+ if (SUCCEEDED(hr))
+ ID3D11DeviceContext_Release(context);
refcount = ID3D11Device_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
@@ -2243,7 +2245,7 @@ static void test_create_deferred_context(void)
expected_refcount = get_refcount(device) + 1;
hr = ID3D11Device_CreateDeferredContext(device, 0, &context);
- todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
if (FAILED(hr))
goto done;
refcount = get_refcount(device);
--
1.9.1
2.23.0

View File

@@ -1,4 +1,4 @@
From 837daae12d4c7fd40a35511d8d45299b46e91b38 Mon Sep 17 00:00:00 2001
From 701a77256d55032b60e454279013984844dffd78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 19 Jan 2017 16:54:42 +0100
Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
@@ -13,11 +13,11 @@ Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
6 files changed, 70 insertions(+)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 4c90d820..8065839d 100644
index 18a0d72117..a6117942ef 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1306,6 +1306,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
return wined3d_buffer_gl_map(buffer_gl, offset, size, (BYTE **)&map_desc->data, flags);
@@ -1104,6 +1104,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
return WINED3D_OK;
}
+static HRESULT buffer_resource_sub_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -40,8 +40,8 @@ index 4c90d820..8065839d 100644
+
static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
{
if (sub_resource_idx)
@@ -1325,6 +1343,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
struct wined3d_buffer *buffer = buffer_from_resource(resource);
@@ -1262,6 +1280,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
buffer_resource_preload,
buffer_unload,
buffer_resource_sub_resource_map,
@@ -50,10 +50,10 @@ index 4c90d820..8065839d 100644
};
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index a1b2cbd2..dd4ca20c 100644
index bba940f42c..ff31c004b0 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -361,6 +361,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
@@ -383,6 +383,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
return wined3d_cs_map(resource->device->cs, resource, sub_resource_idx, map_desc, box, flags);
}
@@ -69,10 +69,10 @@ index a1b2cbd2..dd4ca20c 100644
{
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 87998d55..45ee3d3d 100644
index ff25f64043..37054833c5 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2698,6 +2698,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -3024,6 +3024,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3D_OK;
}
@@ -109,7 +109,7 @@ index 87998d55..45ee3d3d 100644
static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
{
struct wined3d_texture_sub_resource *sub_resource;
@@ -2749,6 +2779,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
@@ -3076,6 +3106,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
texture_resource_preload,
wined3d_texture_gl_unload,
texture_resource_sub_resource_map,
@@ -118,10 +118,10 @@ index 87998d55..45ee3d3d 100644
};
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index ee702211..f4944564 100644
index edd4a70d97..742126c4d2 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -220,6 +220,7 @@
@@ -216,6 +216,7 @@
@ cdecl wined3d_resource_get_parent(ptr)
@ cdecl wined3d_resource_get_priority(ptr)
@ cdecl wined3d_resource_map(ptr long ptr ptr long)
@@ -130,10 +130,10 @@ index ee702211..f4944564 100644
@ cdecl wined3d_resource_set_parent(ptr ptr)
@ cdecl wined3d_resource_set_priority(ptr long)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 9a01ed29..9f8f784e 100644
index 5ce23f85f6..740e535217 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3096,6 +3096,8 @@ struct wined3d_resource_ops
@@ -3414,6 +3414,8 @@ struct wined3d_resource_ops
void (*resource_unload)(struct wined3d_resource *resource);
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
@@ -143,10 +143,10 @@ index 9a01ed29..9f8f784e 100644
};
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index dc491d3b..8e0cf665 100644
index 3e46c23c14..c60597bb4c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1835,6 +1835,13 @@ struct wined3d_map_desc
@@ -1833,6 +1833,13 @@ struct wined3d_map_desc
void *data;
};
@@ -160,7 +160,7 @@ index dc491d3b..8e0cf665 100644
struct wined3d_sub_resource_data
{
const void *data;
@@ -2606,6 +2613,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
@@ -2600,6 +2607,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
@@ -170,5 +170,5 @@ index dc491d3b..8e0cf665 100644
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
--
2.19.1
2.23.0

View File

@@ -1,14 +1,14 @@
From 4984f8e6033facccfa7b27b4b0f83e6615abc972 Mon Sep 17 00:00:00 2001
From c093321833140c3aadacae32c43d160e83483d17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 19 Jan 2017 16:56:56 +0100
Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
---
dlls/d3d11/device.c | 1072 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 1041 insertions(+), 31 deletions(-)
dlls/d3d11/device.c | 1073 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 1042 insertions(+), 31 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index fbc875c6fee..74ae6f8f333 100644
index dca5a88caa..738f1d19d4 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -17,11 +17,181 @@
@@ -193,7 +193,7 @@ index fbc875c6fee..74ae6f8f333 100644
/* ID3D11DeviceContext - deferred context */
struct d3d11_deferred_context
{
@@ -29,9 +199,531 @@ struct d3d11_deferred_context
@@ -29,9 +199,532 @@ struct d3d11_deferred_context
ID3D11Device *device;
LONG refcount;
@@ -646,6 +646,7 @@ index fbc875c6fee..74ae6f8f333 100644
+ {
+ free_deferred_calls(&cmdlist->commands);
+ wined3d_private_store_cleanup(&cmdlist->private_store);
+ ID3D11Device_Release(cmdlist->device);
+ HeapFree(GetProcessHeap(), 0, cmdlist);
+ }
+
@@ -725,7 +726,7 @@ index fbc875c6fee..74ae6f8f333 100644
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
@@ -1226,7 +1918,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
@@ -1226,7 +1919,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
ID3D11CommandList *command_list, BOOL restore_state)
{
@@ -747,7 +748,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
@@ -2938,6 +3643,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
@@ -2938,6 +3644,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
if (!refcount)
{
@@ -755,7 +756,7 @@ index fbc875c6fee..74ae6f8f333 100644
wined3d_private_store_cleanup(&context->private_store);
ID3D11Device_Release(context->device);
HeapFree(GetProcessHeap(), 0, context);
@@ -2989,43 +3695,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
@@ -2989,43 +3696,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
@@ -848,7 +849,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
@@ -3038,53 +3787,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
@@ -3038,53 +3788,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
{
@@ -1027,7 +1028,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
@@ -3113,7 +3978,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
@@ -3113,7 +3979,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
D3D11_PRIMITIVE_TOPOLOGY topology)
{
@@ -1045,7 +1046,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
@@ -3173,8 +4047,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
@@ -3173,8 +4048,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
ID3D11DepthStencilView *depth_stencil_view)
{
@@ -1075,7 +1076,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
@@ -3194,15 +4088,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
@@ -3194,15 +4089,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
{
@@ -1122,7 +1123,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
@@ -3244,13 +4167,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
@@ -3244,13 +4168,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
ID3D11RasterizerState *rasterizer_state)
{
@@ -1159,7 +1160,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
@@ -3365,8 +4309,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
@@ -3365,8 +4310,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
@@ -1179,7 +1180,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
@@ -3379,36 +4333,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
@@ -3379,36 +4334,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
@@ -1247,7 +1248,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
@@ -3709,7 +4689,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
@@ -3709,7 +4690,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
{
@@ -1264,7 +1265,7 @@ index fbc875c6fee..74ae6f8f333 100644
}
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
@@ -3734,9 +4722,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
@@ -3734,9 +4723,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
BOOL restore, ID3D11CommandList **command_list)
{
@@ -1296,8 +1297,8 @@ index fbc875c6fee..74ae6f8f333 100644
}
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
@@ -4351,6 +5359,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
object->device = iface;
@@ -4351,6 +5360,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
object->device = (ID3D11Device *)iface;
object->refcount = 1;
+ list_init(&object->commands);
@@ -1306,5 +1307,5 @@ index fbc875c6fee..74ae6f8f333 100644
wined3d_private_store_init(&object->private_store);
--
2.20.1
2.21.0

View File

@@ -0,0 +1,183 @@
From 31a800096eb212cda55f6fbea955f05c650ea2c1 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Fri, 27 Sep 2019 16:26:04 +0300
Subject: [PATCH] d3d11/tests: Add a basic test for drawing with deferred
context.
---
dlls/d3d11/tests/d3d11.c | 101 +++++++++++++++++++++++++++++++--------
1 file changed, 81 insertions(+), 20 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e653fb30b2..202179174b 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -1692,10 +1692,11 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context *
ok_(__FILE__, line)(!ref, "Device has %u references left.\n", ref);
}
-#define draw_quad(context) draw_quad_vs_(__LINE__, context, NULL, 0)
-#define draw_quad_vs(a, b, c) draw_quad_vs_(__LINE__, a, b, c)
+#define draw_quad(context) draw_quad_vs_(__LINE__, context, NULL, 0, (context)->immediate_context)
+#define draw_quad_vs(a, b, c) draw_quad_vs_(__LINE__, a, b, c, (a)->immediate_context)
+#define draw_quad_ext(a, b, c, d) draw_quad_vs_(__LINE__, a, b, c, d)
static void draw_quad_vs_(unsigned int line, struct d3d11_test_context *context,
- const DWORD *vs_code, size_t vs_code_size)
+ const DWORD *vs_code, size_t vs_code_size, ID3D11DeviceContext *draw_context)
{
static const D3D11_INPUT_ELEMENT_DESC default_layout_desc[] =
{
@@ -1764,14 +1765,14 @@ static void draw_quad_vs_(unsigned int line, struct d3d11_test_context *context,
if (!context->vb)
context->vb = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, sizeof(quad), quad);
- ID3D11DeviceContext_IASetInputLayout(context->immediate_context, context->input_layout);
- ID3D11DeviceContext_IASetPrimitiveTopology(context->immediate_context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
+ ID3D11DeviceContext_IASetInputLayout(draw_context, context->input_layout);
+ ID3D11DeviceContext_IASetPrimitiveTopology(draw_context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
stride = sizeof(*quad);
offset = 0;
- ID3D11DeviceContext_IASetVertexBuffers(context->immediate_context, 0, 1, &context->vb, &stride, &offset);
- ID3D11DeviceContext_VSSetShader(context->immediate_context, context->vs, NULL, 0);
+ ID3D11DeviceContext_IASetVertexBuffers(draw_context, 0, 1, &context->vb, &stride, &offset);
+ ID3D11DeviceContext_VSSetShader(draw_context, context->vs, NULL, 0);
- ID3D11DeviceContext_Draw(context->immediate_context, 4, 0);
+ ID3D11DeviceContext_Draw(draw_context, 4, 0);
}
#define draw_quad_z(context, z) draw_quad_z_(__LINE__, context, z)
@@ -1807,19 +1808,27 @@ static void draw_quad_z_(unsigned int line, struct d3d11_test_context *context,
(ID3D11Resource *)context->vs_cb, 0, NULL, &data, 0, 0);
ID3D11DeviceContext_VSSetConstantBuffers(context->immediate_context, 0, 1, &context->vs_cb);
- draw_quad_vs_(__LINE__, context, vs_code, sizeof(vs_code));
+ draw_quad_vs_(__LINE__, context, vs_code, sizeof(vs_code), context->immediate_context);
}
-static void set_quad_color(struct d3d11_test_context *context, const struct vec4 *color)
+static void set_quad_color_ext(struct d3d11_test_context *context, const struct vec4 *color,
+ ID3D11DeviceContext *draw_context)
{
- ID3D11DeviceContext_UpdateSubresource(context->immediate_context,
+ ID3D11DeviceContext_UpdateSubresource(draw_context,
(ID3D11Resource *)context->ps_cb, 0, NULL, color, 0, 0);
}
-#define draw_color_quad(a, b) draw_color_quad_(__LINE__, a, b, NULL, 0)
-#define draw_color_quad_vs(a, b, c, d) draw_color_quad_(__LINE__, a, b, c, d)
+static void set_quad_color(struct d3d11_test_context *context, const struct vec4 *color)
+{
+ set_quad_color_ext(context, color, context->immediate_context);
+}
+
+#define draw_color_quad(a, b) draw_color_quad_(__LINE__, a, b, NULL, 0, (a)->immediate_context)
+#define draw_color_quad_vs(a, b, c, d) draw_color_quad_(__LINE__, a, b, c, d, (a)->immediate_context)
+#define draw_color_quad_ext(a, b, c, d, e) draw_color_quad_(__LINE__, a, b, c, d, e)
static void draw_color_quad_(unsigned int line, struct d3d11_test_context *context,
- const struct vec4 *color, const DWORD *vs_code, size_t vs_code_size)
+ const struct vec4 *color, const DWORD *vs_code, size_t vs_code_size,
+ ID3D11DeviceContext *draw_context)
{
static const DWORD ps_color_code[] =
{
@@ -1856,12 +1865,12 @@ static void draw_color_quad_(unsigned int line, struct d3d11_test_context *conte
if (!context->ps_cb)
context->ps_cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, sizeof(*color), NULL);
- ID3D11DeviceContext_PSSetShader(context->immediate_context, context->ps, NULL, 0);
- ID3D11DeviceContext_PSSetConstantBuffers(context->immediate_context, 0, 1, &context->ps_cb);
+ ID3D11DeviceContext_PSSetShader(draw_context, context->ps, NULL, 0);
+ ID3D11DeviceContext_PSSetConstantBuffers(draw_context, 0, 1, &context->ps_cb);
- set_quad_color(context, color);
+ set_quad_color_ext(context, color, draw_context);
- draw_quad_vs_(line, context, vs_code, vs_code_size);
+ draw_quad_vs_(line, context, vs_code, vs_code_size, draw_context);
}
static void test_create_device(void)
@@ -2088,6 +2097,59 @@ static void test_create_device(void)
DestroyWindow(window);
}
+static void test_draw_deferred_context(void)
+{
+ static const struct vec4 red = {1.0f, 0.0f, 0.0f, 1.0f};
+ static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ static const float black[] = {0.0f, 0.0f, 0.0f, 0.0f};
+ ID3D11DeviceContext *context, *deferred_context;
+ struct d3d11_test_context test_context;
+ ID3D11CommandList *command_list;
+ ID3D11Device *device;
+ DWORD color;
+ HRESULT hr;
+
+ if (!init_test_context(&test_context, NULL))
+ return;
+
+ device = test_context.device;
+ context = test_context.immediate_context;
+
+ hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred_context);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+
+ ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xffffffff, "Got unexpected color 0x%08x.\n", color);
+
+ ID3D11DeviceContext_ClearRenderTargetView(deferred_context, test_context.backbuffer_rtv, black);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred_context, FALSE, &command_list);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+
+ ID3D11DeviceContext_ExecuteCommandList(context, command_list, TRUE);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color);
+ ID3D11CommandList_Release(command_list);
+
+ ID3D11DeviceContext_OMSetRenderTargets(deferred_context, 1, &test_context.backbuffer_rtv, NULL);
+
+ draw_color_quad_ext(&test_context, &red, NULL, 0, deferred_context);
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred_context, TRUE, &command_list);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ID3D11DeviceContext_ExecuteCommandList(context, command_list, TRUE);
+
+ color = get_texture_color(test_context.backbuffer, 320, 240);
+ ok(color == 0xff0000ff, "Got unexpected color 0x%08x.\n", color);
+ ID3D11CommandList_Release(command_list);
+
+ ID3D11DeviceContext_Release(deferred_context);
+ release_test_context(&test_context);
+}
+
static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
{
struct device_desc device_desc;
@@ -29400,11 +29462,11 @@ START_TEST(d3d11)
}
print_adapter_info();
-
queue_test(test_create_device);
queue_for_each_feature_level(test_device_interfaces);
queue_test(test_get_immediate_context);
queue_test(test_create_deferred_context);
+ queue_test(test_draw_deferred_context);
queue_test(test_create_texture1d);
queue_test(test_texture1d_interfaces);
queue_test(test_create_texture2d);
@@ -29538,6 +29600,5 @@ START_TEST(d3d11)
queue_test(test_render_a8);
queue_test(test_standard_pattern);
queue_test(test_desktop_window);
-
run_queued_tests();
}
--
2.21.0

View File

@@ -1,18 +1,19 @@
From b2bae3c7d8f8b6dfc7587b7a7a3147f5650096a7 Mon Sep 17 00:00:00 2001
From bbc93f065045b7854f4446d9199c2c22c6251d3d Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 30 Jul 2017 23:50:18 +0200
Subject: d3dx9: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for
32 bpp BMP with alpha.
Subject: [PATCH] d3dx9: Return D3DFMT_A8R8G8B8 in
D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha.
---
dlls/d3dx9_36/surface.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
dlls/d3dx9_36/surface.c | 18 ++++++++++++++++++
dlls/d3dx9_36/tests/surface.c | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index c82c22289..abb1c0e5c 100644
index a2eca9cbdb..b670657125 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -954,6 +954,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
@@ -980,6 +980,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
}
}
@@ -37,6 +38,19 @@ index c82c22289..abb1c0e5c 100644
if (frame)
IWICBitmapFrameDecode_Release(frame);
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 04ce57fa4f..db0c9c7291 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -616,7 +616,7 @@ static void test_D3DXGetImageInfo(void)
ok(info.Format == D3DFMT_X8R8G8B8, "Got unexpected format %u.\n", info.Format);
hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), &info);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
- todo_wine ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
+ ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
/* Grayscale PNG */
hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, sizeof(png_grayscale), &info);
--
2.20.1
2.21.0

View File

@@ -1,17 +1,18 @@
From a625d57a2c3d125604ec3c8fe1381ed2df3d72ac Mon Sep 17 00:00:00 2001
From a31e5531eb8f3be5fddf9f81f48f191b1a10c2aa Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 16 Mar 2015 08:18:33 +0100
Subject: [PATCH] d3dx9_36: Improve stub for ID3DXEffectImpl_CloneEffect.
---
dlls/d3dx9_36/effect.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
dlls/d3dx9_36/effect.c | 4 +++-
dlls/d3dx9_36/tests/effect.c | 16 +++++-----------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index 87eaf86..fd4635e 100644
index 7d686a435d..f8d8ab9cd2 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -4381,7 +4381,9 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
@@ -4100,7 +4100,9 @@ static HRESULT WINAPI d3dx_effect_CloneEffect(ID3DXEffect *iface, IDirect3DDevic
if (!device)
return D3DERR_INVALIDCALL;
@@ -22,6 +23,45 @@ index 87eaf86..fd4635e 100644
}
#if D3DX_SDK_VERSION >= 27
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 5c4a3c5e77..ff15426938 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -7419,29 +7419,23 @@ static void test_effect_clone(void)
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
hr = effect->lpVtbl->CloneEffect(effect, device, &cloned);
-todo_wine
ok(hr == D3D_OK, "Got result %#x.\n", hr);
-if (hr == D3D_OK)
-{
- ok(cloned != effect, "Expected new effect instance.\n");
+
+ todo_wine ok(cloned != effect, "Expected new effect instance.\n");
cloned->lpVtbl->Release(cloned);
-}
/* Try with different device. */
device2 = create_device(&window2);
hr = effect->lpVtbl->CloneEffect(effect, device2, &cloned);
-todo_wine
ok(hr == D3D_OK, "Got result %#x.\n", hr);
-if (hr == D3D_OK)
-{
- ok(cloned != effect, "Expected new effect instance.\n");
+ todo_wine ok(cloned != effect, "Expected new effect instance.\n");
hr = cloned->lpVtbl->GetDevice(cloned, &device3);
ok(hr == S_OK, "Failed to get effect device.\n");
- ok(device3 == device2, "Unexpected device instance.\n");
+ todo_wine ok(device3 == device2, "Unexpected device instance, device3 %p, device2 %p.\n", device3, device2);
IDirect3DDevice9_Release(device3);
cloned->lpVtbl->Release(cloned);
-}
+
IDirect3DDevice9_Release(device2);
DestroyWindow(window2);
effect->lpVtbl->Release(effect);
--
1.9.1
2.21.0

View File

@@ -1 +1 @@
Fixes: Initial implementation for d3dx9_36.D3DXDisassembleShader
Fixes: [46649] Multiple applications need D3DXDisassembleShader() implementation (Tom Clancy's Rainbow Six: Vegas 2, The Void)

View File

@@ -1 +1 @@
Fixes: Implement semi-stub for D3DXOptimizeVertices
Fixes: [47776] Timeshift needs D3DXOptimizeVertices()

View File

@@ -1,464 +0,0 @@
From 3fb7038ed7f1ebbadd60465f68ed0e61ba81e730 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Fri, 30 Mar 2018 08:22:02 +0000
Subject: [PATCH] d3dx9_36: add DXTn support
---
dlls/d3dx9_24/Makefile.in | 2 +-
dlls/d3dx9_25/Makefile.in | 2 +-
dlls/d3dx9_26/Makefile.in | 2 +-
dlls/d3dx9_27/Makefile.in | 2 +-
dlls/d3dx9_28/Makefile.in | 2 +-
dlls/d3dx9_29/Makefile.in | 2 +-
dlls/d3dx9_30/Makefile.in | 2 +-
dlls/d3dx9_31/Makefile.in | 2 +-
dlls/d3dx9_32/Makefile.in | 2 +-
dlls/d3dx9_33/Makefile.in | 2 +-
dlls/d3dx9_34/Makefile.in | 2 +-
dlls/d3dx9_35/Makefile.in | 2 +-
dlls/d3dx9_36/Makefile.in | 2 +-
dlls/d3dx9_36/surface.c | 102 +++++++++++++++++++++++++++++++---
dlls/d3dx9_36/tests/surface.c | 8 +--
dlls/d3dx9_37/Makefile.in | 2 +-
dlls/d3dx9_38/Makefile.in | 2 +-
dlls/d3dx9_39/Makefile.in | 2 +-
dlls/d3dx9_40/Makefile.in | 2 +-
dlls/d3dx9_41/Makefile.in | 2 +-
dlls/d3dx9_42/Makefile.in | 2 +-
dlls/d3dx9_43/Makefile.in | 2 +-
22 files changed, 118 insertions(+), 32 deletions(-)
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
index a327292b8..b43b1be81 100644
--- a/dlls/d3dx9_24/Makefile.in
+++ b/dlls/d3dx9_24/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=24
MODULE = d3dx9_24.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
index ccf374832..edcba8b59 100644
--- a/dlls/d3dx9_25/Makefile.in
+++ b/dlls/d3dx9_25/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=25
MODULE = d3dx9_25.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
index 21ef9e00b..72d0e0ce1 100644
--- a/dlls/d3dx9_26/Makefile.in
+++ b/dlls/d3dx9_26/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=26
MODULE = d3dx9_26.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
index 3adea191c..24763cb10 100644
--- a/dlls/d3dx9_27/Makefile.in
+++ b/dlls/d3dx9_27/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=27
MODULE = d3dx9_27.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
index bd75a23d2..ce041b069 100644
--- a/dlls/d3dx9_28/Makefile.in
+++ b/dlls/d3dx9_28/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=28
MODULE = d3dx9_28.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
index 491c105ab..99ab2ded7 100644
--- a/dlls/d3dx9_29/Makefile.in
+++ b/dlls/d3dx9_29/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=29
MODULE = d3dx9_29.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
index 44e28b79f..bcf0b1c82 100644
--- a/dlls/d3dx9_30/Makefile.in
+++ b/dlls/d3dx9_30/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=30
MODULE = d3dx9_30.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
index 0f16d27fd..7c980fbb8 100644
--- a/dlls/d3dx9_31/Makefile.in
+++ b/dlls/d3dx9_31/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=31
MODULE = d3dx9_31.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
index 99357dcce..e493bd8a6 100644
--- a/dlls/d3dx9_32/Makefile.in
+++ b/dlls/d3dx9_32/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=32
MODULE = d3dx9_32.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index 5a92dca61..fba4106af 100644
--- a/dlls/d3dx9_33/Makefile.in
+++ b/dlls/d3dx9_33/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=33
MODULE = d3dx9_33.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
index 84cca56ec..e03d8ebd5 100644
--- a/dlls/d3dx9_34/Makefile.in
+++ b/dlls/d3dx9_34/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=34
MODULE = d3dx9_34.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
index 640f30620..ea19e55b2 100644
--- a/dlls/d3dx9_35/Makefile.in
+++ b/dlls/d3dx9_35/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=35
MODULE = d3dx9_35.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index b8a173ce0..3f96b6656 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -1,7 +1,7 @@
EXTRADEFS = -DD3DX_SDK_VERSION=36
MODULE = d3dx9_36.dll
IMPORTLIB = d3dx9
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
DELAYIMPORTS = windowscodecs
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 8e9b834d8..83c30338e 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -25,6 +25,8 @@
#include "ole2.h"
#include "wincodec.h"
+#include "wine/wined3d.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
@@ -1798,6 +1800,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
}
}
+typedef BOOL (__cdecl *dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
+
+static dxtn_conversion_func get_dxtn_conversion_func(D3DFORMAT format, BOOL encode)
+{
+ switch (format)
+ {
+ case D3DFMT_DXT1:
+ return encode ? wined3d_dxt1_encode : wined3d_dxt1_decode;
+ case D3DFMT_DXT3:
+ return encode ? wined3d_dxt3_encode : wined3d_dxt3_decode;
+ case D3DFMT_DXT5:
+ return encode ? wined3d_dxt5_encode : wined3d_dxt5_decode;
+ default:
+ return NULL;
+ }
+}
+
/************************************************************
* D3DXLoadSurfaceFromMemory
*
@@ -1837,10 +1857,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
{
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
IDirect3DSurface9 *surface;
+ void *tmp_src_memory = NULL, *tmp_dst_memory = NULL;
+ dxtn_conversion_func pre_convert = NULL, post_convert = NULL;
D3DSURFACE_DESC surfdesc;
D3DLOCKED_RECT lockrect;
struct volume src_size, dst_size;
- HRESULT hr;
+ HRESULT hr = D3D_OK;
TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n",
dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format,
@@ -1921,18 +1943,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
}
else /* Stretching or format conversion. */
{
- if (!is_conversion_from_supported(srcformatdesc)
- || !is_conversion_to_supported(destformatdesc))
+ UINT tmp_src_pitch, tmp_dst_pitch;
+
+ pre_convert = get_dxtn_conversion_func(srcformatdesc->format, FALSE);
+ post_convert = get_dxtn_conversion_func(destformatdesc->format, TRUE);
+
+ if ((!pre_convert && !is_conversion_from_supported(srcformatdesc)) ||
+ (!post_convert && !is_conversion_to_supported(destformatdesc)))
{
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
unlock_surface(dst_surface, dst_rect, surface, FALSE);
return E_NOTIMPL;
}
+ /* handle pre-conversion */
+ if (pre_convert)
+ {
+ tmp_src_memory = HeapAlloc(GetProcessHeap(), 0, src_size.width * src_size.height * sizeof(DWORD));
+ if (!tmp_src_memory)
+ {
+ hr = E_OUTOFMEMORY;
+ goto done;
+ }
+ tmp_src_pitch = src_size.width * sizeof(DWORD);
+ if (!pre_convert(src_memory, tmp_src_memory, src_pitch, tmp_src_pitch,
+ WINED3DFMT_B8G8R8A8_UNORM, src_size.width, src_size.height))
+ {
+ hr = E_FAIL;
+ goto done;
+ }
+ srcformatdesc = get_format_info(D3DFMT_A8R8G8B8);
+ }
+ else
+ {
+ tmp_src_memory = (void *)src_memory;
+ tmp_src_pitch = src_pitch;
+ }
+
+ /* handle post-conversion */
+ if (post_convert)
+ {
+ tmp_dst_memory = HeapAlloc(GetProcessHeap(), 0, dst_size.width * dst_size.height * sizeof(DWORD));
+ if (!tmp_dst_memory)
+ {
+ hr = E_OUTOFMEMORY;
+ goto done;
+ }
+ tmp_dst_pitch = dst_size.width * sizeof(DWORD);
+ destformatdesc = get_format_info(D3DFMT_A8R8G8B8);
+ }
+ else
+ {
+ tmp_dst_memory = lockrect.pBits;
+ tmp_dst_pitch = lockrect.Pitch;
+ }
+
if ((filter & 0xf) == D3DX_FILTER_NONE)
{
- convert_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc,
- lockrect.pBits, lockrect.Pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
+ convert_argb_pixels(tmp_src_memory, tmp_src_pitch, 0, &src_size, srcformatdesc,
+ tmp_dst_memory, tmp_dst_pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
}
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
{
@@ -1941,12 +2010,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
/* Always apply a point filter until D3DX_FILTER_LINEAR,
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
- point_filter_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc,
- lockrect.pBits, lockrect.Pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
+ point_filter_argb_pixels(tmp_src_memory, tmp_src_pitch, 0, &src_size, srcformatdesc,
+ tmp_dst_memory, tmp_dst_pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
+ }
+
+ /* handle post-conversion */
+ if (post_convert)
+ {
+ if (!post_convert(tmp_dst_memory, lockrect.pBits, tmp_dst_pitch, lockrect.Pitch,
+ WINED3DFMT_B8G8R8A8_UNORM, dst_size.width, dst_size.height))
+ {
+ hr = E_FAIL;
+ }
}
}
- return unlock_surface(dst_surface, dst_rect, surface, TRUE);
+done:
+ if (pre_convert)
+ HeapFree(GetProcessHeap(), 0, tmp_src_memory);
+ if (post_convert)
+ HeapFree(GetProcessHeap(), 0, tmp_dst_memory);
+
+ unlock_surface(dst_surface, dst_rect, surface, TRUE);
+ return hr;
}
/************************************************************
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 4a10492a0..d59ff028a 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -1242,7 +1242,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT3 format.\n");
+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT3 format.\n");
check_release((IUnknown*)newsurf, 1);
check_release((IUnknown*)tex, 0);
}
@@ -1268,7 +1268,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n");
+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n");
check_release((IUnknown*)newsurf, 1);
check_release((IUnknown*)tex, 0);
}
@@ -1281,10 +1281,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT1 format.\n");
+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT1 format.\n");
hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0);
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels from DXT1 format.\n");
+ ok(SUCCEEDED(hr), "Failed to convert pixels from DXT1 format.\n");
check_release((IUnknown*)newsurf, 1);
check_release((IUnknown*)tex, 0);
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
index d16a0ce05..669482dee 100644
--- a/dlls/d3dx9_37/Makefile.in
+++ b/dlls/d3dx9_37/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=37
MODULE = d3dx9_37.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
index 4a02ab417..1f43705e7 100644
--- a/dlls/d3dx9_38/Makefile.in
+++ b/dlls/d3dx9_38/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=38
MODULE = d3dx9_38.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
index 5a3840574..690ed7d31 100644
--- a/dlls/d3dx9_39/Makefile.in
+++ b/dlls/d3dx9_39/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=39
MODULE = d3dx9_39.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
index 581e18dba..8e6984683 100644
--- a/dlls/d3dx9_40/Makefile.in
+++ b/dlls/d3dx9_40/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=40
MODULE = d3dx9_40.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
index 63a0be753..37fb2f3e6 100644
--- a/dlls/d3dx9_41/Makefile.in
+++ b/dlls/d3dx9_41/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=41
MODULE = d3dx9_41.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
index ff391a202..2d706c5f8 100644
--- a/dlls/d3dx9_42/Makefile.in
+++ b/dlls/d3dx9_42/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=42
MODULE = d3dx9_42.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
index e009a41c5..d539f6b22 100644
--- a/dlls/d3dx9_43/Makefile.in
+++ b/dlls/d3dx9_43/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DD3DX_SDK_VERSION=43
MODULE = d3dx9_43.dll
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
PARENTSRC = ../d3dx9_36
DELAYIMPORTS = windowscodecs
--
2.22.0

View File

@@ -1,5 +0,0 @@
Depends: wined3d-DXTn
Fixes: [33768] Fix texture corruption in CSI: Fatal Conspiracy
Fixes: [37391] Exception during start of fr-043 caused by missing DXTn support
Fixes: [34692] Fix wrong colors in Wolfenstein (2009)
Fixes: [24983] Fix crash in Space Rangers2 caused by missing DXTn support

View File

@@ -1,54 +0,0 @@
From e83a145da4b9e2c0c4b2b449aa72ce129344c5e5 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Tue, 4 Nov 2014 22:22:03 +0100
Subject: d3dx9_36: Align texture dimensions to block size for compressed
textures in D3DXCheckTextureRequirements.
---
dlls/d3dx9_36/tests/texture.c | 10 ++++++++++
dlls/d3dx9_36/texture.c | 8 ++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
index 61132bb..11a3b92 100644
--- a/dlls/d3dx9_36/tests/texture.c
+++ b/dlls/d3dx9_36/tests/texture.c
@@ -374,6 +374,16 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
ok(height == 4, "Returned height %d, expected %d\n", height, 4);
ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5);
+
+ format = D3DFMT_DXT5;
+ width = 5; height = 5;
+ mipmaps = 1;
+ hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT);
+ ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK);
+ ok(width == 8, "Returned width %d, expected %d\n", width, 8);
+ ok(height == 8, "Returned height %d, expected %d\n", height, 8);
+ ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
+ ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5);
}
else
{
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index 7ebe264..fa0106c 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -333,10 +333,10 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN
if (fmt->block_width != 1 || fmt->block_height != 1)
{
- if (w < fmt->block_width)
- w = fmt->block_width;
- if (h < fmt->block_height)
- h = fmt->block_height;
+ if (w % fmt->block_width)
+ w += fmt->block_width - w % fmt->block_width;
+ if (h % fmt->block_height)
+ h += fmt->block_height - h % fmt->block_height;
}
if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w)))
--
2.1.3

View File

@@ -1,11 +1,10 @@
From b78cfe9c6453db477e0ba69b343e3ed128b345bd Mon Sep 17 00:00:00 2001
From 1a21bd1a5584a1d2b54a8a6df9944d44a83b05d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 29 Jul 2015 17:09:50 +0200
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
Based on a patch by Henri Verbeet.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
---
dlls/ddraw/ddraw.c | 6 +++---
dlls/ddraw/ddraw_private.h | 3 ++-
@@ -14,10 +13,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
4 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 2f94e325db..82bf315fe7 100644
index 68e9286590..1141739e78 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -4342,7 +4342,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
@@ -4296,7 +4296,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
wined3d_mutex_lock();
@@ -26,7 +25,7 @@ index 2f94e325db..82bf315fe7 100644
{
*device = &object->IDirect3DDevice7_iface;
}
@@ -4371,7 +4371,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
@@ -4325,7 +4325,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
return CLASS_E_NOAGGREGATION;
wined3d_mutex_lock();
@@ -35,7 +34,7 @@ index 2f94e325db..82bf315fe7 100644
{
*device = &device_impl->IDirect3DDevice3_iface;
}
@@ -4397,7 +4397,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
@@ -4351,7 +4351,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
iface, debugstr_guid(riid), surface, device);
wined3d_mutex_lock();
@@ -45,10 +44,10 @@ index 2f94e325db..82bf315fe7 100644
*device = &device_impl->IDirect3DDevice2_iface;
}
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 19f21a8923..e2fe323b68 100644
index 771b2a44d1..4bf0e46462 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -304,6 +304,7 @@ struct d3d_device
@@ -307,6 +307,7 @@ struct d3d_device
IUnknown IUnknown_inner;
LONG ref;
UINT version;
@@ -56,8 +55,8 @@ index 19f21a8923..e2fe323b68 100644
IUnknown *outer_unknown;
struct wined3d_device *wined3d_device;
@@ -350,7 +351,7 @@ struct d3d_device
BOOL recording;
@@ -354,7 +355,7 @@ struct d3d_device
struct wined3d_stateblock *recording;
};
-HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUnknown *rt_iface,
@@ -66,10 +65,10 @@ index 19f21a8923..e2fe323b68 100644
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 054e2dccc9..0170639de8 100644
index 43e5d0aa92..5d18a129f7 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1850,7 +1850,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
@@ -1854,7 +1854,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
return DDERR_INVALIDCAPS;
}
@@ -78,7 +77,7 @@ index 054e2dccc9..0170639de8 100644
{
WARN("Surface %p is not in video memory.\n", target_impl);
wined3d_mutex_unlock();
@@ -1926,7 +1926,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
@@ -1930,7 +1930,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
return DDERR_INVALIDPIXELFORMAT;
}
@@ -87,7 +86,7 @@ index 054e2dccc9..0170639de8 100644
{
WARN("Surface %p is not in video memory.\n", target_impl);
IDirectDrawSurface4_AddRef(target);
@@ -1975,7 +1975,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
@@ -1979,7 +1979,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
return DDERR_INVALIDPIXELFORMAT;
}
@@ -96,7 +95,7 @@ index 054e2dccc9..0170639de8 100644
{
WARN("Surface %p is not in video memory.\n", target_impl);
IDirectDrawSurface_AddRef(target);
@@ -6976,7 +6976,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
@@ -6933,7 +6933,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
return WINED3D_ZB_TRUE;
}
@@ -105,7 +104,7 @@ index 054e2dccc9..0170639de8 100644
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
{
static const D3DMATRIX ident =
@@ -6999,6 +6999,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -6956,6 +6956,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
device->ref = 1;
device->version = version;
@@ -113,7 +112,7 @@ index 054e2dccc9..0170639de8 100644
if (outer_unknown)
device->outer_unknown = outer_unknown;
@@ -7049,14 +7050,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -7009,14 +7010,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
return D3D_OK;
}
@@ -135,7 +134,7 @@ index 054e2dccc9..0170639de8 100644
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
@@ -7079,7 +7084,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
@@ -7039,7 +7044,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_OUTOFMEMORY;
}
@@ -144,7 +143,7 @@ index 054e2dccc9..0170639de8 100644
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
@@ -7097,7 +7102,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
@@ -7057,7 +7062,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_OUTOFMEMORY;
}
@@ -154,10 +153,10 @@ index 054e2dccc9..0170639de8 100644
WARN("Failed to initialize device, hr %#x.\n", hr);
heap_free(object);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index cac05c39dc..1fc78eeab7 100644
index 66e5a9e616..31ccce29b8 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -226,7 +226,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
{
HRESULT hr;
@@ -166,7 +165,7 @@ index cac05c39dc..1fc78eeab7 100644
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
{
This->device1 = NULL;
@@ -6175,7 +6175,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
@@ -6197,7 +6197,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
{
@@ -211,5 +210,5 @@ index cac05c39dc..1fc78eeab7 100644
}
else
--
2.20.1
2.21.0

View File

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

View File

@@ -1,21 +1,29 @@
From 920014b62ddd2218477e3d82f45c4515742f9e28 Mon Sep 17 00:00:00 2001
From bce769d9179ffbcbc634e73ad124528e28c5c7a8 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 2/3] dinput: Allow empty Joystick mappings.
Subject: [PATCH] dinput: Allow empty Joystick mappings.
---
dlls/dinput/device.c | 82 +++++++++++++++++++++++++++++++++++++--------
dlls/dinput/joystick.c | 2 ++
dlls/dinput/keyboard.c | 2 ++
dlls/dinput/mouse.c | 2 ++
dlls/dinput8/tests/device.c | 50 +++++++++++++++++++++++++++
5 files changed, 124 insertions(+), 14 deletions(-)
dlls/dinput/device.c | 82 ++++++++++++++++++++++++++++++-------
dlls/dinput/joystick.c | 4 +-
dlls/dinput/keyboard.c | 2 +
dlls/dinput/mouse.c | 2 +
dlls/dinput8/tests/device.c | 50 ++++++++++++++++++++++
5 files changed, 125 insertions(+), 15 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 2150db7..a7cfe36 100644
index d1bf934a827..6107ab26538 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -643,12 +643,30 @@ static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
@@ -30,6 +30,7 @@
#include <string.h>
#include "wine/debug.h"
#include "wine/unicode.h"
+#include "wine/heap.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
@@ -643,12 +644,29 @@ static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
return type | (0x0000ff00 & (obj_instance << 8));
}
@@ -27,14 +35,13 @@ index 2150db7..a7cfe36 100644
+ 'M','a','p','p','i','n','g','s','\\','%','s','\\','%','s','\\','%','s','\0'};
+ WCHAR *keyname;
+
+ keyname = HeapAlloc(GetProcessHeap(), 0,
+ sizeof(WCHAR) * (lstrlenW(subkey) + strlenW(username) + strlenW(device) + strlenW(guid)));
+ keyname = heap_alloc(sizeof(WCHAR) * (lstrlenW(subkey) + strlenW(username) + strlenW(device) + strlenW(guid)));
+ sprintfW(keyname, subkey, username, device, guid);
+
+ /* Remove old key mappings so there will be no overlapping mappings */
+ RegDeleteKeyW(HKEY_CURRENT_USER, keyname);
+
+ HeapFree(GetProcessHeap(), 0, keyname);
+ heap_free(keyname);
+}
+
/*
@@ -97,12 +104,12 @@ index 2150db7..a7cfe36 100644
- lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
- mapped += 1;
+ lpdiaf->rgoAction[i].dwHow = DIAH_USERCONFIG;
}
+ }
+ else
+ {
+ memset(&lpdiaf->rgoAction[i].guidInstance, 0, sizeof(GUID));
+ lpdiaf->rgoAction[i].dwHow = DIAH_UNMAPPED;
+ }
}
+
}
@@ -187,10 +194,19 @@ index 2150db7..a7cfe36 100644
This->num_actions = num_actions;
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index b146712..267f932 100644
index 66d6cfdffb9..73215dac0d5 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -907,6 +907,8 @@ HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
@@ -847,7 +847,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
else
lstrcpynW(username, lpszUserName, size);
- load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username);
+ load_success = load_mapping_settings(&This->base, lpdiaf, username);
heap_free(username);
}
@@ -957,6 +957,8 @@ HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
hr = JoystickWGenericImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
@@ -200,10 +216,10 @@ index b146712..267f932 100644
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index 42c0759..5c5aa14 100644
index b5e665933ec..0747f5d8c8b 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -693,6 +693,8 @@ static HRESULT WINAPI SysKeyboardAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
@@ -690,6 +690,8 @@ static HRESULT WINAPI SysKeyboardAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
hr = SysKeyboardWImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
@@ -213,10 +229,10 @@ index 42c0759..5c5aa14 100644
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
index f3ec8e4..0adba03 100644
index 52a766b2a1a..796f1fa2977 100644
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -863,6 +863,8 @@ static HRESULT WINAPI SysMouseAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
@@ -862,6 +862,8 @@ static HRESULT WINAPI SysMouseAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
hr = SysMouseWImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
@@ -226,7 +242,7 @@ index f3ec8e4..0adba03 100644
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 1bfb34a..46a1e4a 100644
index f3e7b542355..bec2a6b863c 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -38,6 +38,8 @@ struct enum_data {
@@ -301,5 +317,5 @@ index 1bfb34a..46a1e4a 100644
IDirectInput_Release(pDI);
}
--
1.9.1
2.17.1

View File

@@ -1,20 +1,34 @@
From af785463a8e9fc8ff47ead4143151e9831cbbddf Mon Sep 17 00:00:00 2001
From ed590782f6149f56c0e4c6747cea5a297543047b Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:21:24 +1000
Subject: [PATCH] dinput: Support username in Config dialog.
---
dlls/dinput/config.c | 183 ++++++++++++++++++++++++++++++-------------
dlls/dinput/config.c | 187 ++++++++++++++++++++++++-----------
dlls/dinput/device.c | 2 +-
dlls/dinput/device_private.h | 1 +
dlls/dinput/dinput_main.c | 27 +++++++
4 files changed, 156 insertions(+), 57 deletions(-)
dlls/dinput/dinput_main.c | 28 ++++++
4 files changed, 161 insertions(+), 57 deletions(-)
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
index bf44898..cd2c4b9 100644
index bf44898589..c7a33d2da0 100644
--- a/dlls/dinput/config.c
+++ b/dlls/dinput/config.c
@@ -29,6 +29,9 @@ typedef struct {
@@ -18,17 +18,23 @@
#define NONAMELESSUNION
+
#include "wine/unicode.h"
#include "objbase.h"
#include "dinput_private.h"
#include "device_private.h"
#include "resource.h"
+#include "wine/heap.h"
+
typedef struct {
int nobjects;
IDirectInputDevice8W *lpdid;
DIDEVICEINSTANCEW ddi;
DIDEVICEOBJECTINSTANCEW ddo[256];
@@ -24,7 +38,7 @@ index bf44898..cd2c4b9 100644
} DeviceData;
typedef struct {
@@ -38,10 +41,11 @@ typedef struct {
@@ -38,10 +44,11 @@ typedef struct {
typedef struct {
IDirectInput8W *lpDI;
@@ -37,7 +51,7 @@ index bf44898..cd2c4b9 100644
} ConfigureDevicesData;
/*
@@ -57,27 +61,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
@@ -57,27 +64,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
return DIENUM_CONTINUE;
}
@@ -71,15 +85,15 @@ index bf44898..cd2c4b9 100644
IDirectInputDevice_EnumObjects(lpdid, collect_objects, (LPVOID) device, DIDFT_ALL);
- data->ndevices++;
+ device->user_afs = HeapAlloc(GetProcessHeap(), 0, sizeof(*device->user_afs)*data->nusernames);
+ memset(device->user_afs, 0, sizeof(*device->user_afs)*data->nusernames);
+ device->user_afs = heap_alloc(sizeof(*device->user_afs) * data->nusernames);
+ memset(device->user_afs, 0, sizeof(*device->user_afs) * data->nusernames);
+ for (i = 0; i < data->nusernames; i++)
+ {
+ DIACTIONFORMATW *user_af = &device->user_afs[i];
+ user_af->dwNumActions = data->original_lpdiaf->dwNumActions;
+ user_af->guidActionMap = data->original_lpdiaf->guidActionMap;
+ user_af->rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*data->original_lpdiaf->dwNumActions);
+ memset(user_af->rgoAction, 0, sizeof(DIACTIONW)*data->original_lpdiaf->dwNumActions);
+ user_af->rgoAction = heap_alloc(sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ memset(user_af->rgoAction, 0, sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ for (j = 0; j < user_af->dwNumActions; j++)
+ {
+ user_af->rgoAction[j].dwSemantic = data->original_lpdiaf->rgoAction[j].dwSemantic;
@@ -92,7 +106,7 @@ index bf44898..cd2c4b9 100644
return DIENUM_CONTINUE;
}
@@ -170,10 +189,18 @@ static DeviceData* get_cur_device(HWND dialog)
@@ -170,10 +192,18 @@ static DeviceData* get_cur_device(HWND dialog)
return &data->devices_data.devices[sel];
}
@@ -113,7 +127,7 @@ index bf44898..cd2c4b9 100644
}
static int dialog_display_only(HWND dialog)
@@ -182,40 +209,36 @@ static int dialog_display_only(HWND dialog)
@@ -182,40 +212,36 @@ static int dialog_display_only(HWND dialog)
return data->display_only;
}
@@ -155,8 +169,8 @@ index bf44898..cd2c4b9 100644
+ {
IDirectInputDevice8_Release(devices_data->devices[i].lpdid);
+ for (j=0; j < data->nusernames; j++)
+ HeapFree(GetProcessHeap(), 0, devices_data->devices[i].user_afs[j].rgoAction);
+ HeapFree(GetProcessHeap(), 0, devices_data->devices[i].user_afs);
+ heap_free(devices_data->devices[i].user_afs[j].rgoAction);
+ heap_free(devices_data->devices[i].user_afs);
+ }
HeapFree(GetProcessHeap(), 0, devices_data->devices);
@@ -167,7 +181,7 @@ index bf44898..cd2c4b9 100644
}
static void fill_device_object_list(HWND dialog)
@@ -231,6 +254,7 @@ static void fill_device_object_list(HWND dialog)
@@ -231,6 +257,7 @@ static void fill_device_object_list(HWND dialog)
/* Add each object */
for (i=0; i < device->nobjects; i++)
{
@@ -175,7 +189,7 @@ index bf44898..cd2c4b9 100644
int action = -1;
item.mask = LVIF_TEXT | LVIF_PARAM;
@@ -241,12 +265,20 @@ static void fill_device_object_list(HWND dialog)
@@ -241,12 +268,20 @@ static void fill_device_object_list(HWND dialog)
/* Add the item */
SendDlgItemMessageW(dialog, IDC_DEVICEOBJECTSLIST, LVM_INSERTITEMW, 0, (LPARAM) &item);
@@ -198,7 +212,7 @@ index bf44898..cd2c4b9 100644
{
action = j;
break;
@@ -260,7 +292,7 @@ static void fill_device_object_list(HWND dialog)
@@ -260,7 +295,7 @@ static void fill_device_object_list(HWND dialog)
static void show_suitable_actions(HWND dialog)
{
DeviceData *device = get_cur_device(dialog);
@@ -207,7 +221,7 @@ index bf44898..cd2c4b9 100644
int i, added = 0;
int obj = lv_get_cur_item(dialog);
@@ -329,24 +361,35 @@ static void assign_action(HWND dialog)
@@ -329,24 +364,35 @@ static void assign_action(HWND dialog)
lv_set_action(dialog, obj, action, lpdiaf);
}
@@ -255,7 +269,7 @@ index bf44898..cd2c4b9 100644
}
static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -358,21 +401,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -358,21 +404,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
ConfigureDevicesData *data = (ConfigureDevicesData*) lParam;
/* Initialize action format and enumerate devices */
@@ -279,7 +293,7 @@ index bf44898..cd2c4b9 100644
fill_device_object_list(dialog);
ShowCursor(TRUE);
@@ -414,6 +452,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -414,6 +455,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
break;
case IDC_CONTROLLERCOMBO:
@@ -287,7 +301,7 @@ index bf44898..cd2c4b9 100644
switch (HIWORD(wParam))
{
@@ -424,12 +463,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -424,12 +466,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
break;
case IDOK:
@@ -301,13 +315,13 @@ index bf44898..cd2c4b9 100644
EndDialog(dialog, 0);
destroy_data(dialog);
break;
@@ -452,15 +491,47 @@ HRESULT _configure_devices(IDirectInput8W *iface,
@@ -452,15 +494,48 @@ HRESULT _configure_devices(IDirectInput8W *iface,
LPVOID pvRefData
)
{
+ int i;
+ DWORD default_username_size = MAX_PATH;
+ WCHAR *default_username = 0;
+ DWORD size;
+ WCHAR *username = NULL;
ConfigureDevicesData data;
data.lpDI = iface;
- data.lpdiaf = lpdiCDParams->lprgFormats;
@@ -317,16 +331,17 @@ index bf44898..cd2c4b9 100644
+ if (lpdiCDParams->lptszUserNames == NULL)
+ {
+ /* Get default user name */
+ default_username = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*MAX_PATH);
+ GetUserNameW(NULL, &size);
+ username = heap_alloc(size * sizeof(WCHAR) );
+ GetUserNameW(username, &size);
+ data.nusernames = 1;
+ data.usernames = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *));
+ data.usernames[0] = default_username;
+ GetUserNameW(default_username, &default_username_size);
+ data.usernames = heap_alloc(sizeof(WCHAR *));
+ data.usernames[0] = username;
+ }
+ else
+ {
+ WCHAR *p = lpdiCDParams->lptszUserNames;
+ data.usernames = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *)*data.nusernames);
+ data.usernames = heap_alloc(sizeof(WCHAR *) * data.nusernames);
+ for (i = 0; i < data.nusernames; i++)
+ {
+ if (*p)
@@ -345,13 +360,13 @@ index bf44898..cd2c4b9 100644
DialogBoxParamW(DINPUT_instance, (const WCHAR *)MAKEINTRESOURCE(IDD_CONFIGUREDEVICES),
lpdiCDParams->hwnd, ConfigureDevicesDlgProc, (LPARAM)&data);
+ HeapFree(GetProcessHeap(), 0, default_username);
+ HeapFree(GetProcessHeap(), 0, data.usernames);
+ heap_free(username);
+ heap_free(data.usernames);
+
return DI_OK;
}
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index b441743..0c94326 100644
index 6107ab2653..30483fe691 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -692,7 +692,7 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
@@ -364,10 +379,10 @@ index b441743..0c94326 100644
WCHAR *guid_str = NULL;
DIDEVICEINSTANCEW didev;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index af8d99d..36b71f7 100644
index ea794d7396..114e3971ed 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -123,6 +123,7 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
@@ -125,6 +125,7 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
@@ -376,10 +391,18 @@ index af8d99d..36b71f7 100644
extern HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index 198c6a8..ee319f0 100644
index 0855cb41cd..7af377026c 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -1251,9 +1251,34 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
@@ -39,6 +39,7 @@
#define NONAMELESSUNION
#include "wine/debug.h"
+#include "wine/heap.h"
#include "wine/unicode.h"
#include "wine/asm.h"
#include "windef.h"
@@ -1253,9 +1254,34 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
/* Copy parameters */
diCDParamsW.dwSize = sizeof(DICONFIGUREDEVICESPARAMSW);
@@ -414,15 +437,15 @@ index 198c6a8..ee319f0 100644
diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiCDParams->lprgFormats->dwNumActions);
_copy_diactionformatAtoW(&diafW, lpdiCDParams->lprgFormats);
@@ -1281,6 +1306,8 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
@@ -1283,6 +1309,8 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
HeapFree(GetProcessHeap(), 0, diafW.rgoAction);
+ HeapFree(GetProcessHeap(), 0, (void*) diCDParamsW.lptszUserNames);
+ heap_free((void*) diCDParamsW.lptszUserNames);
+
return hr;
}
--
1.9.1
2.17.1

View File

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

View File

@@ -0,0 +1,26 @@
From 5d5892c9403b77bd3f17acebfee1acc7e95003a0 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 30 Jul 2019 09:30:41 +1000
Subject: [PATCH 1/4] directmanipulation: Fake success from
IDirectManipulationViewport2 ActivateConfiguration.
---
dlls/directmanipulation/directmanipulation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index 4f16963d42..f1e008bc7f 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -370,7 +370,7 @@ static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport
{
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
FIXME("%p, %d\n", This, configuration);
- return E_NOTIMPL;
+ return S_OK;
}
static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
--
2.17.1

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