Compare commits

...

49 Commits
v4.2 ... v4.5

Author SHA1 Message Date
Alistair Leslie-Hughes
cf0a72b3aa Release v4.5 2019-03-30 16:02:54 +11:00
Alistair Leslie-Hughes
f7bee23139 Rebase against c6ff0e01224e86c7baa31d019fcb0a7bf03e2f96 2019-03-30 16:02:03 +11:00
Alistair Leslie-Hughes
7ba10a3ef2 Rebase against cad72d3cd7a40e2c1f70d19b988e19da62710bf8 2019-03-29 11:49:30 +11:00
Alistair Leslie-Hughes
8f51d290fd Updated ddraw-Rendering_Targets patchset 2019-03-29 08:14:12 +11:00
Alistair Leslie-Hughes
271835fcdd Rebase against 0e8401076679f337655e72fa1726f05fcd89e069 2019-03-28 13:07:06 +11:00
Alistair Leslie-Hughes
a02caca06d Rebase against 829170f3d6b875f7a6f065072cc3334a20ff805e 2019-03-27 11:22:31 +11:00
Alistair Leslie-Hughes
0d4d90ee80 Rebase against c7f323107b3b956d206d8d0ee28851d60f19841c 2019-03-26 13:55:44 +11:00
Alistair Leslie-Hughes
d963a250c9 Rebase against c988910caeebfd1415ad4d036964a67078493e46 2019-03-23 10:56:04 +11:00
Alistair Leslie-Hughes
d82dea3b21 Updated ddraw-version-check patchset 2019-03-22 18:17:08 +11:00
Alistair Leslie-Hughes
055e049821 Updated wined3d-Indexed_Vertex_Blending and wined3d-SWVP-shaders patchset
Thanks Paul Gofman.
2019-03-20 11:02:25 +11:00
Alistair Leslie-Hughes
5ffc00de0a Rebase against 42683dd159385ed2f83fa6d9a8b73ed8b64e04e2 2019-03-20 10:58:11 +11:00
Alistair Leslie-Hughes
8e6af31b99 Rebase against 3e61c7127ed7eb764a8b308fd8897cbc26a93a4a 2019-03-19 09:04:20 +11:00
Alistair Leslie-Hughes
18e878bc40 Updated opencl-version_1_2 patchset. 2019-03-18 13:24:09 +11:00
Alistair Leslie-Hughes
4c19e3f8e1 Updated dinput-remap-joystick patchset 2019-03-18 10:03:40 +11:00
Alistair Leslie-Hughes
b6787bc221 Release v4.4 2019-03-17 17:12:16 +11:00
Zebediah Figura
6c37563f92 Rebase against 05994cd6179626438ef26c13ee45323a6a1f66eb. 2019-03-15 15:57:45 -05:00
Alistair Leslie-Hughes
65e6bb8111 Rebase against fa262317480e52eb3420c4e0ba9bae9e17db4457 2019-03-15 11:44:38 +11:00
Alistair Leslie-Hughes
3d9797093d Added opencl-version_1_2 patchset 2019-03-15 09:51:33 +11:00
Alistair Leslie-Hughes
993b6c9c83 Rebase against f34f13825fd060fda40f0a5b02dc1b420e3a8e1e 2019-03-13 09:54:01 +11:00
Alistair Leslie-Hughes
d866f07818 Added pdh-PdhLookupPerfNameByIndex-processor patchset 2019-03-12 09:19:32 +11:00
Alistair Leslie-Hughes
3d08d08fda Rebase against 5baadda536172d6713fa6fef1196dc2baa773904 2019-03-12 09:07:36 +11:00
Zebediah Figura
01adefa75c Rebase against ab7756619c1b16c761618a68d1b6a06ad437cbe8. 2019-03-07 17:53:33 -06:00
Zebediah Figura
6260ab9bce wined3d-SWVP-shaders, wined3d-Indexed_Vertex_Blending: Updates from Paul Gofman.
Should fix https://bugs.winehq.org/show_bug.cgi?id=46790.
2019-03-07 17:30:08 -06:00
Zebediah Figura
3a1bf0a033 Rebase against 56f34c7489cb463981e987a59aee9f8780fef7cd. 2019-03-06 22:07:08 -06:00
Alistair Leslie-Hughes
06fbe73760 Updated wined3d-SWVP-shaders, wined3d-Indexed_Vertex_Blending patchsets 2019-03-05 09:53:07 +11:00
Alistair Leslie-Hughes
c043d43772 Updated d3dx9_36-DrawText patchset
Thanks github user IIde pointing this out.
2019-03-05 09:18:36 +11:00
Alistair Leslie-Hughes
d3067e60ff Rebase against 6d35c10a7b7155dd552a3ad1a266d205e38f8765 2019-03-05 09:11:28 +11:00
Alistair Leslie-Hughes
923434cd32 Release v4.3 2019-03-03 16:51:57 +11:00
Alistair Leslie-Hughes
f419a53698 Added xaudio2-revert patchset 2019-03-03 16:46:30 +11:00
Zebediah Figura
5e8beb5ff2 Rebase against 1e8f4c059befe4a026ddf5c56e81d720b35c6c2f. 2019-02-28 22:32:39 -06:00
Alistair Leslie-Hughes
37de066533 Revert "Added msasn1-ASN1_CreateModule patchset"
This reverts commit 06ad40cfd0.

It come to out attention that FreeRDP may not be a clean source
for this patch.
2019-03-01 08:08:25 +11:00
Alistair Leslie-Hughes
e108b600b5 Added comctrl-rebar-capture patchset 2019-02-28 16:28:45 +11:00
Alistair Leslie-Hughes
06ad40cfd0 Added msasn1-ASN1_CreateModule patchset 2019-02-28 16:28:39 +11:00
Alistair Leslie-Hughes
bd8f790f9b Added dinput-axis-recalc patchset 2019-02-28 16:22:05 +11:00
Alistair Leslie-Hughes
4a23a62b5d Added dinput-reconnect-joystick patchset 2019-02-28 15:30:07 +11:00
Alistair Leslie-Hughes
e6cfe1ccd8 Added dinput-remap-joystick patchset 2019-02-28 15:30:07 +11:00
Zebediah Figura
b50c875c39 setupapi-Display_Device: Correct rebase. 2019-02-27 21:01:33 -06:00
Zebediah Figura
b02bd9c446 wined3d-SWVP-shaders, wined3d-Indexed_Vertex_Blending: Add new patch sets from Paul Gofman. 2019-02-27 20:27:16 -06:00
Alistair Leslie-Hughes
7c1618b197 Rebase against 474a6771ba03e2c475cd088ff40c97e8285a455f 2019-02-27 12:51:15 +11:00
Alistair Leslie-Hughes
733fa5c485 Rebase against f784cabd3489b20c13afd80fddbbcf5aa1b656b3 2019-02-26 08:54:19 +11:00
Zebediah Figura
b74293fbfe Rebase against b3c5b7da9442af840431cd7f795da20989aad42a. 2019-02-22 22:45:29 -06:00
Alistair Leslie-Hughes
38aa047cad Rebase against 812d03129dea53337367789bac8ab523b9fce21d 2019-02-22 08:51:56 +11:00
Alistair Leslie-Hughes
778998c66e Rebase against c0cc126d579e078f2804112c14f0c18b38f68937 2019-02-21 13:49:36 +11:00
Zebediah Figura
d12fcebb0e ntoskrnl.exe-Resources: Add patch set. 2019-02-19 19:03:35 -06:00
Zebediah Figura
7937739028 ntdll-MemoryWorkingSetExInformation: Add patch. 2019-02-19 18:48:47 -06:00
Zebediah Figura
13b580a0c8 Rebase against 0c738d900a8daccf2c5460972033766d34d59aed. 2019-02-19 18:36:59 -06:00
Alistair Leslie-Hughes
b3c99ebf4b Rebase against 5e86cc0a8f37295072b03b1c13aa205ff3e6f3e4 2019-02-19 11:35:04 +11:00
Alistair Leslie-Hughes
87578b4c82 Updated httpapi-HttpCreateServerSession patchset
Thanks Gijs Vermeulen.
2019-02-19 08:30:45 +11:00
Alistair Leslie-Hughes
be81b6245c Added wmvcore-WMCreateSyncReader patchset 2019-02-18 13:58:09 +11:00
198 changed files with 16264 additions and 11866 deletions

View File

@@ -1,125 +0,0 @@
From 2b29014573fcb38388dd82e33fa16f67b1a43a8c Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Sun, 23 Oct 2016 16:15:45 -0500
Subject: [PATCH] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41591
Signed-off-by: Austin English <austinenglish@gmail.com>
---
dlls/advapi32/advapi32.spec | 4 ++--
dlls/advapi32/registry.c | 24 ++++++++++++++++++++++
.../api-ms-win-core-registry-l1-1-0.spec | 4 ++--
.../api-ms-win-downlevel-advapi32-l1-1-0.spec | 4 ++--
dlls/kernelbase/kernelbase.spec | 4 ++--
include/winreg.h | 3 +++
6 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index e870a5d..042a523 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -648,8 +648,8 @@
@ stdcall RegGetKeySecurity(long long ptr ptr)
@ stdcall RegGetValueA(long str str long ptr ptr ptr)
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr)
-# @ stub RegLoadAppKeyA
-# @ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(str ptr long long long)
+@ stdcall RegLoadAppKeyW(wstr ptr long long long)
@ stdcall RegLoadKeyA(long str str)
@ stdcall RegLoadKeyW(long wstr wstr)
@ stdcall RegLoadMUIStringA(long str str long ptr long str)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 3018372..55df6de 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -3513,3 +3513,27 @@ LONG WINAPI RegDisableReflectionKey(HKEY base)
FIXME("%p: stub\n", base);
return ERROR_SUCCESS;
}
+
+/******************************************************************************
+ * RegLoadAppKeyA [ADVAPI32.@]
+ *
+ */
+LSTATUS WINAPI RegLoadAppKeyA(const char *file, HKEY *result, REGSAM sam, DWORD options, DWORD reserved)
+{
+ FIXME("%s %p %u %u %u: stub\n", wine_dbgstr_a(file), result, sam, options, reserved);
+
+ *result = (HKEY)0xbeefcafe;
+ return ERROR_SUCCESS;
+}
+
+/******************************************************************************
+ * RegLoadAppKeyW [ADVAPI32.@]
+ *
+ */
+LSTATUS WINAPI RegLoadAppKeyW(const WCHAR *file, HKEY *result, REGSAM sam, DWORD options, DWORD reserved)
+{
+ FIXME("%s %p %u %u %u: stub\n", wine_dbgstr_w(file), result, sam, options, reserved);
+
+ *result = (HKEY)0xbeefcafe;
+ return ERROR_SUCCESS;
+}
diff --git a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
index 7a48e3b..f81f027 100644
--- a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
+++ b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
@@ -17,8 +17,8 @@
@ stdcall RegGetKeySecurity(long long ptr ptr) advapi32.RegGetKeySecurity
@ stdcall RegGetValueA(long str str long ptr ptr ptr) advapi32.RegGetValueA
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr) advapi32.RegGetValueW
-@ stub RegLoadAppKeyA
-@ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(str ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(wstr ptr long long long) advapi32.RegLoadAppKeyW
@ stdcall RegLoadKeyA(long str str) advapi32.RegLoadKeyA
@ stdcall RegLoadKeyW(long wstr wstr) advapi32.RegLoadKeyW
@ stdcall RegLoadMUIStringA(long str str long ptr long str) advapi32.RegLoadMUIStringA
diff --git a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
index 5bdad41..b2dcc17 100644
--- a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
+++ b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
@@ -102,8 +102,8 @@
@ stdcall RegGetKeySecurity(long long ptr ptr) advapi32.RegGetKeySecurity
@ stdcall RegGetValueA(long str str long ptr ptr ptr) advapi32.RegGetValueA
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr) advapi32.RegGetValueW
-@ stub RegLoadAppKeyA
-@ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(str ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(wstr ptr long long long) advapi32.RegLoadAppKeyW
@ stdcall RegLoadKeyA(long str str) advapi32.RegLoadKeyA
@ stdcall RegLoadKeyW(long wstr wstr) advapi32.RegLoadKeyW
@ stdcall RegLoadMUIStringA(long str str long ptr long str) advapi32.RegLoadMUIStringA
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 286dae0..c114622 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1288,8 +1288,8 @@
# @ stub RegKrnResetAppKeyLoaded
# @ stub RegKrnSetDllHasThreadStateGlobal
# @ stub RegKrnSetTermsrvRegistryExtensionFlags
-# @ stub RegLoadAppKeyA
-# @ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(str ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(wstr ptr long long long) advapi32.RegLoadAppKeyW
@ stdcall -private RegLoadKeyA(long str str) kernel32.RegLoadKeyA
@ stdcall -private RegLoadKeyW(long wstr wstr) kernel32.RegLoadKeyW
@ stdcall -private RegLoadMUIStringA(long str str long ptr long str) kernel32.RegLoadMUIStringA
diff --git a/include/winreg.h b/include/winreg.h
index 51e9f02..5656eec 100644
--- a/include/winreg.h
+++ b/include/winreg.h
@@ -133,6 +133,9 @@ WINADVAPI LSTATUS WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY
WINADVAPI LSTATUS WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
WINADVAPI LSTATUS WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
#define RegGetValue WINELIB_NAME_AW(RegGetValue)
+WINADVAPI LSTATUS WINAPI RegLoadAppKeyA(const char*,HKEY*,REGSAM,DWORD,DWORD);
+WINADVAPI LSTATUS WINAPI RegLoadAppKeyW(const WCHAR*,HKEY*,REGSAM,DWORD,DWORD);
+#define RegLoadAppKey WINELIB_NAME_AW(RegLoadAppKey)
WINADVAPI LSTATUS WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
WINADVAPI LSTATUS WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
#define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
--
1.9.1

View File

@@ -1 +0,0 @@
Fixes: [41591] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs

View File

@@ -0,0 +1,35 @@
From 37c7da9a71e327dfe86c0c550cabc50968abd04d Mon Sep 17 00:00:00 2001
From: Andrew Shadura <bugzilla@tut.by>
Date: Fri, 1 Feb 2019 08:38:10 +1100
Subject: [PATCH] comctl32: Fixed rebar behaviour when there's capture and no
drag
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=14750
---
dlls/comctl32/rebar.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index aaa1047..29fc854 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -3119,7 +3119,15 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
int yPtMove = (infoPtr->dwStyle & CCS_VERT ? ptMove.x : ptMove.y);
if (GetCapture() != infoPtr->hwndSelf)
- ERR("We are dragging but haven't got capture?!?\n");
+ {
+ if (infoPtr->fStatus & BEGIN_DRAG_ISSUED)
+ {
+ REBAR_Notify_NMREBAR (infoPtr, infoPtr->iGrabbedBand, RBN_ENDDRAG);
+ infoPtr->fStatus &= ~BEGIN_DRAG_ISSUED;
+ }
+ infoPtr->iGrabbedBand = -1;
+ return 0;
+ }
band = REBAR_GetBand(infoPtr, infoPtr->iGrabbedBand);
--
1.9.1

View File

@@ -0,0 +1 @@
Fixes: [14750] comctl32: Fixed rebar behaviour when there's capture and no drag.

View File

@@ -1,140 +0,0 @@
From a26d43a10fb5de70732970b20a29ce4437b33076 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Jan 2017 07:54:39 +0100
Subject: [PATCH] d3d8: Improve ValidatePixelShader stub.
---
dlls/d3d8/d3d8_main.c | 37 +++++++++++++++++--------------------
dlls/d3d8/tests/device.c | 34 ++++++++++++++++++++--------------
2 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c
index 17f35c90..7b28bdf1 100644
--- a/dlls/d3d8/d3d8_main.c
+++ b/dlls/d3d8/d3d8_main.c
@@ -105,39 +105,36 @@ done:
/***********************************************************************
* ValidatePixelShader (D3D8.@)
- *
- * PARAMS
- * toto result?
*/
-HRESULT WINAPI ValidatePixelShader(DWORD* pixelshader, DWORD* reserved1, BOOL boolean, DWORD* toto)
+HRESULT WINAPI ValidatePixelShader(DWORD *pixelshader, DWORD *reserved1, BOOL return_error, char **errors)
{
- HRESULT ret;
- static BOOL warned;
-
- if (TRACE_ON(d3d8) || !warned) {
- FIXME("(%p %p %d %p): stub\n", pixelshader, reserved1, boolean, toto);
- warned = TRUE;
- }
+ const char *message = "";
+ HRESULT hr = E_FAIL;
- if (!pixelshader)
- return E_FAIL;
+ TRACE("(%p %p %d %p): semi-stub\n", pixelshader, reserved1, return_error, errors);
- if (reserved1)
- return E_FAIL;
+ if (!pixelshader)
+ return E_FAIL;
- switch(*pixelshader) {
+ switch (*pixelshader)
+ {
case 0xFFFF0100:
case 0xFFFF0101:
case 0xFFFF0102:
case 0xFFFF0103:
case 0xFFFF0104:
- ret=S_OK;
+ hr = S_OK;
break;
default:
WARN("Invalid shader version token %#x.\n", *pixelshader);
- ret=E_FAIL;
- }
- return ret;
+ message = "(Global Validation Error) Version Token: Unsupported pixel shader version.\n";
+ }
+
+ if (!return_error) message = "";
+ if (errors && (*errors = HeapAlloc(GetProcessHeap(), 0, strlen(message) + 1)))
+ strcpy(*errors, message);
+
+ return hr;
}
void d3d8_resource_cleanup(struct d3d8_resource *resource)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 315640d3..6f8354f4 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -53,7 +53,7 @@ struct device_desc
static DEVMODEW registry_mode;
static HRESULT (WINAPI *ValidateVertexShader)(const DWORD *, const DWORD *, const D3DCAPS8 *, BOOL, char **);
-static HRESULT (WINAPI *ValidatePixelShader)(DWORD *, DWORD *, int, DWORD *);
+static HRESULT (WINAPI *ValidatePixelShader)(DWORD *, DWORD *, BOOL, char **);
static BOOL (WINAPI *pGetCursorInfo)(PCURSORINFO);
@@ -4474,33 +4474,39 @@ static void test_validate_ps(void)
0x00000005, 0x800f0000, 0xb0e40000, 0x80e40000, /* mul r0, t0, r0 */
0x0000ffff, /* end */
};
+ char *errors;
HRESULT hr;
hr = ValidatePixelShader(0, 0, 0, 0);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
hr = ValidatePixelShader(0, 0, 1, 0);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+
+ errors = (void *)0xdeadbeef;
+ hr = ValidatePixelShader(0, 0, 1, &errors);
+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(errors == (void *)0xdeadbeef, "Expected 0xdeadbeef, got %p.\n", errors);
+
hr = ValidatePixelShader(ps, 0, 0, 0);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
-
hr = ValidatePixelShader(ps, 0, 1, 0);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- /* Seems to do some version checking. */
+
*ps = 0xffff0105; /* bogus version */
hr = ValidatePixelShader(ps, 0, 1, 0);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
- /* I've seen that applications always pass the 2nd parameter as 0.
- * Simple test with a non-zero parameter. */
- *ps = 0xffff0101; /* ps_1_1 */
- hr = ValidatePixelShader(ps, ps, 1, 0);
+
+ errors = (void *)0xdeadbeef;
+ hr = ValidatePixelShader(ps, 0, 0, &errors);
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
- /* I've seen the 3rd parameter always passed as either 0 or 1, but passing
- * other values doesn't seem to hurt. */
- hr = ValidatePixelShader(ps, 0, 12345, 0);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- /* What is the 4th parameter? The following seems to work ok. */
- hr = ValidatePixelShader(ps, 0, 1, ps);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(!strcmp(errors, ""), "Got unexpected string '%s'.\n", errors);
+ HeapFree(GetProcessHeap(), 0, errors);
+
+ errors = (void *)0xdeadbeef;
+ hr = ValidatePixelShader(ps, 0, 1, &errors);
+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(strstr(errors, "Validation Error") != NULL, "Got unexpected string '%s'.\n", errors);
+ HeapFree(GetProcessHeap(), 0, errors);
}
static void test_volume_get_container(void)
--
2.20.1

View File

@@ -1 +0,0 @@
Fixes: [40036] Improve stubs for Validate{Vertex,Pixel}Shader

View File

@@ -17,7 +17,7 @@ index 87eaf86..fd4635e 100644
- return E_NOTIMPL;
+ iface->lpVtbl->AddRef(iface);
+ *effect = iface;
+ *new_effect = iface;
+ return S_OK;
}

View File

@@ -180,7 +180,7 @@ index 5522dea..916ce4c 100644
+ DeleteObject(This->bitmap);
+ }
+
+ hr = D3DXCreateTexture(This->device, This->tex_width, This->tex_height, 1, 0,
+ hr = D3DXCreateTexture(This->device, This->tex_width, This->tex_height, 1, D3DUSAGE_DYNAMIC,
+ D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &This->texture);
+ if (FAILED(hr))
+ {

View File

@@ -1,164 +0,0 @@
From 2c16649c78bb8d3751b3fb8ac52c497380d1918b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 28 Jul 2015 17:34:40 +0200
Subject: d3dx9_36/tests: Add initial tests for dummy skininfo interface.
---
dlls/d3dx9_36/tests/mesh.c | 127 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 127 insertions(+)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 0243a61..7f86d89 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -25,6 +25,9 @@
#include <limits.h>
#include "wine/test.h"
#include "d3dx9.h"
+#include "initguid.h"
+#include "rmxftmpl.h"
+#include "rmxfguid.h"
#ifndef NAN
/* From wine/port.h */
@@ -2374,6 +2377,129 @@ static void D3DXLoadMeshTest(void)
free_test_context(test_context);
}
+static ID3DXFileData *get_mesh_data(const char *memory, SIZE_T length)
+{
+ D3DXF_FILELOADMEMORY source;
+ ID3DXFileEnumObject *enumobj = NULL;
+ ID3DXFileData *filedata = NULL;
+ ID3DXFileData *ret = NULL;
+ ID3DXFile *d3dxfile = NULL;
+ SIZE_T i, nb_children;
+ HRESULT hr;
+ GUID guid;
+
+ hr = D3DXFileCreate(&d3dxfile);
+ if (FAILED(hr)) return NULL;
+
+ hr = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES);
+ if (FAILED(hr)) goto cleanup;
+
+ source.lpMemory = (void *)memory;
+ source.dSize = length;
+
+ hr = d3dxfile->lpVtbl->CreateEnumObject(d3dxfile, &source, D3DXF_FILELOAD_FROMMEMORY, &enumobj);
+ if (FAILED(hr)) goto cleanup;
+
+ hr = enumobj->lpVtbl->GetChildren(enumobj, &nb_children);
+ if (FAILED(hr)) goto cleanup;
+
+ for (i = 0; i < nb_children; i++)
+ {
+ hr = enumobj->lpVtbl->GetChild(enumobj, i, &filedata);
+ if (FAILED(hr)) goto cleanup;
+
+ hr = filedata->lpVtbl->GetType(filedata, &guid);
+ if (SUCCEEDED(hr) && IsEqualGUID(&guid, &TID_D3DRMMesh))
+ {
+ ret = filedata;
+ break;
+ }
+ else
+ filedata->lpVtbl->Release(filedata);
+ }
+
+cleanup:
+ if (enumobj) enumobj->lpVtbl->Release(enumobj);
+ if (d3dxfile) d3dxfile->lpVtbl->Release(d3dxfile);
+
+ return ret;
+}
+
+static void D3DXLoadSkinMeshFromXofTest(void)
+{
+ static const char simple_xfile[] =
+ "xof 0303txt 0032"
+ "Mesh {"
+ "3;"
+ "0.0; 0.0; 0.0;,"
+ "0.0; 1.0; 0.0;,"
+ "1.0; 1.0; 0.0;;"
+ "1;"
+ "3; 0, 1, 2;;"
+ "}";
+ ID3DXBuffer *adjacency, *materials, *effects;
+ D3DPRESENT_PARAMETERS d3dpp;
+ IDirect3DDevice9 *device;
+ ID3DXFileData *filedata;
+ ID3DXSkinInfo *skininfo;
+ ID3DXMesh *mesh;
+ IDirect3D9 *d3d;
+ DWORD mat_count;
+ HRESULT hr;
+ HWND hwnd;
+
+ if (!(hwnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
+ {
+ skip("Couldn't create application window\n");
+ return;
+ }
+
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
+ if (!d3d)
+ {
+ skip("Couldn't create IDirect3D9 object\n");
+ DestroyWindow(hwnd);
+ return;
+ }
+
+ ZeroMemory(&d3dpp, sizeof(d3dpp));
+ d3dpp.Windowed = TRUE;
+ d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
+
+ hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device);
+ IDirect3D9_Release(d3d);
+ if (FAILED(hr))
+ {
+ skip("Failed to create IDirect3DDevice9 object %#x\n", hr);
+ DestroyWindow(hwnd);
+ return;
+ }
+
+ filedata = get_mesh_data(simple_xfile, sizeof(simple_xfile) - 1);
+ ok(filedata != NULL, "Failed to load mesh data\n");
+
+ adjacency = materials = effects = NULL;
+ skininfo = NULL;
+ mesh = NULL;
+
+ hr = D3DXLoadSkinMeshFromXof(filedata, 0, device, &adjacency, &materials, &effects, &mat_count, &skininfo, &mesh);
+ ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
+ ok(skininfo != NULL, "Expected non-null skininfo\n");
+
+ /* FIXME: Add additional tests for skininfo interface. */
+
+ if (adjacency) adjacency->lpVtbl->Release(adjacency);
+ if (materials) materials->lpVtbl->Release(materials);
+ if (effects) effects->lpVtbl->Release(effects);
+ if (skininfo) skininfo->lpVtbl->Release(skininfo);
+ if (mesh) mesh->lpVtbl->Release(mesh);
+
+ filedata->lpVtbl->Release(filedata);
+ IDirect3DDevice9_Release(device);
+ DestroyWindow(hwnd);
+}
+
static BOOL compute_box(struct mesh *mesh, float width, float height, float depth)
{
unsigned int i, face;
@@ -10955,6 +11081,7 @@ START_TEST(mesh)
D3DXCreateMeshTest();
D3DXCreateMeshFVFTest();
D3DXLoadMeshTest();
+ D3DXLoadSkinMeshFromXofTest();
D3DXCreateBoxTest();
D3DXCreatePolygonTest();
D3DXCreateSphereTest();
--
2.5.0

View File

@@ -192,10 +192,10 @@ index 8190442..c73981b 100644
+ * specified location and try to create rendering targets in video memory if
+ * possible.
+ */
+ if ((desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) &&
+ SUCCEEDED(hr = wined3d_check_device_format(ddraw->wined3d, WINED3DADAPTER_DEFAULT,
+ WINED3D_DEVICE_TYPE_HAL, mode.format_id, 0,
+ bind_flags, WINED3D_RTYPE_TEXTURE_2D, wined3d_desc.format)))
+ if (bind_flags
+ && SUCCEEDED(hr = wined3d_check_device_format(ddraw->wined3d, WINED3DADAPTER_DEFAULT,
+ WINED3D_DEVICE_TYPE_HAL, mode.format_id, 0,
+ bind_flags, WINED3D_RTYPE_TEXTURE_2D, wined3d_desc.format)))
+ {
+ FIXME("Application wants to create rendering target in system memory, using video memory instead\n");
+ wined3d_desc.bind_flags = bind_flags;

View File

@@ -1,15 +1,15 @@
From 88412e5d16a242a1d0fed2db46ffd7ad7eb87ca8 Mon Sep 17 00:00:00 2001
From 1171e61b81f598728dd5f242494a37dc74fb2870 Mon Sep 17 00:00:00 2001
From: Andrew D'Addesio <andrew@fatbag.net>
Date: Fri, 8 Feb 2019 18:48:33 -1000
Subject: [PATCH] ddraw: Return correct devices based off requested DirectX
version.
---
dlls/ddraw/ddraw.c | 230 +++++++++++++++++++++++++--------------------
1 file changed, 129 insertions(+), 101 deletions(-)
dlls/ddraw/ddraw.c | 233 +++++++++++++++++++++++++--------------------
1 file changed, 132 insertions(+), 101 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 8a1d0a4f..274a0907 100644
index 8a1d0a4f487..691ea7a6ef9 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -47,37 +47,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
@@ -47,8 +47,7 @@ index 8a1d0a4f..274a0907 100644
- /* HAL device */
+ /* RGB Emulation (D3D 1-7) */
{
- "WINE Direct3D7 Hardware acceleration using WineD3D",
+ {
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
+ "WineD3D RGB Software Emulation",
+ "RGB Emulation",
@@ -57,7 +56,8 @@ index 8a1d0a4f..274a0907 100644
+ },
+
+ /* Direct3D HAL (D3D 1-7) */
+ {
{
- "WINE Direct3D7 Hardware acceleration using WineD3D",
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
+ "WineD3D Hardware Acceleration",
"Direct3D HAL",
@@ -77,7 +77,7 @@ index 8a1d0a4f..274a0907 100644
+ "MMX Emulation",
+ &IID_IDirect3DMMXDevice,
+ 0,
+ },
},
+
+ /* Direct3D T&L HAL (D3D7 only) */
+ {
@@ -86,7 +86,7 @@ index 8a1d0a4f..274a0907 100644
+ "Direct3D T&L HAL",
+ &IID_IDirect3DTnLHalDevice,
+ 0,
},
+ },
+
+ /* In the future, we may wish to add the "Reference Rasterizer" and
+ * "Null device", which are only available in DX6-8 and must be explicitly
@@ -141,7 +141,7 @@ index 8a1d0a4f..274a0907 100644
*
* Params:
* callback: Function to call for each enumerated device
@@ -3703,14 +3738,14 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3703,14 +3738,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
dev_caps = device_desc7.dwDevCaps;
@@ -152,15 +152,18 @@ index 8a1d0a4f..274a0907 100644
- device_desc7.deviceGUID = *device_list7[i].device_guid;
- device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
+ device_desc7.deviceGUID = *device_list[i].device_guid;
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps;
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
+ continue;
- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
+ device_desc7.deviceGUID = *device_list[i].device_guid;
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps;
+
+ ret = callback(device_list[i].device_name, device_list[i].device_name, &device_desc7, context);
if (ret != DDENUMRET_OK)
{
TRACE("Application cancelled the enumeration.\n");
@@ -3726,11 +3761,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3726,11 +3764,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
return D3D_OK;
}
@@ -184,7 +187,7 @@ index 8a1d0a4f..274a0907 100644
*
* Versions 1, 2 and 3
*
@@ -3745,18 +3790,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3745,18 +3793,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
*****************************************************************************/
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
{
@@ -212,7 +215,7 @@ index 8a1d0a4f..274a0907 100644
TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
@@ -3765,52 +3810,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
@@ -3765,52 +3813,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
wined3d_mutex_lock();
@@ -310,7 +313,7 @@ index 8a1d0a4f..274a0907 100644
{
TRACE("Application cancelled the enumeration.\n");
wined3d_mutex_unlock();
@@ -3818,29 +3869,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
@@ -3818,29 +3872,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
}
}

View File

@@ -0,0 +1,214 @@
From b5311918d5fbdc15b3321fed444daa0d0c8507de Mon Sep 17 00:00:00 2001
From: Bruno Jesus <bjesus@codeweavers.com>
Date: Thu, 28 Feb 2019 15:56:18 +1100
Subject: [PATCH] dinput: Recalculated Axis after deadzone change.
Wine-bugs: https://bugs.winehq.org/show_bug.cgi?id=41317
---
dlls/dinput/joystick.c | 149 ++++++++++++++++++++++++++-----------------------
1 file changed, 80 insertions(+), 69 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 0ec1ceb..fd3d44d 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -271,6 +271,76 @@ BOOL device_disabled_registry(const char* name)
return do_disable;
}
+static void remap_init(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
+{
+ /* Configure as if nothing changed so the helper functions can only change
+ * what they need, thus reducing code duplication. */
+ remap_props->lDevMin = remap_props->lMin = This->props[obj].lMin;
+ remap_props->lDevMax = remap_props->lMax = This->props[obj].lMax;
+
+ remap_props->lDeadZone = This->props[obj].lDeadZone;
+ remap_props->lSaturation = This->props[obj].lSaturation;
+}
+
+static void remap_apply(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
+{
+ /* Many games poll the joystick immediately after setting the range
+ * for calibration purposes, so the old values need to be remapped
+ * to the new range before it does so */
+ switch (This->base.data_format.wine_df->rgodf[obj].dwOfs){
+ case DIJOFS_X : This->js.lX = joystick_map_axis(remap_props, This->js.lX); break;
+ case DIJOFS_Y : This->js.lY = joystick_map_axis(remap_props, This->js.lY); break;
+ case DIJOFS_Z : This->js.lZ = joystick_map_axis(remap_props, This->js.lZ); break;
+ case DIJOFS_RX : This->js.lRx = joystick_map_axis(remap_props, This->js.lRx); break;
+ case DIJOFS_RY : This->js.lRy = joystick_map_axis(remap_props, This->js.lRy); break;
+ case DIJOFS_RZ : This->js.lRz = joystick_map_axis(remap_props, This->js.lRz); break;
+ case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(remap_props, This->js.rglSlider[0]); break;
+ case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(remap_props, This->js.rglSlider[1]); break;
+ default: break;
+ }
+}
+
+static void remap_range(JoystickGenericImpl *This, int obj, LPCDIPROPRANGE pr)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lMin = pr->lMin;
+ remap_props.lMax = pr->lMax;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new values */
+ This->props[obj].lMin = pr->lMin;
+ This->props[obj].lMax = pr->lMax;
+}
+
+static void remap_deadzone(JoystickGenericImpl *This, int obj, LPCDIPROPDWORD pd)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lDeadZone = pd->dwData;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new value */
+ This->props[obj].lDeadZone = pd->dwData;
+}
+
+static void remap_saturation(JoystickGenericImpl *This, int obj, LPCDIPROPDWORD pd)
+{
+ ObjProps remap_props;
+ remap_init(This, obj, &remap_props);
+
+ remap_props.lSaturation = pd->dwData;
+
+ remap_apply(This, obj, &remap_props);
+
+ /* Store new value */
+ This->props[obj].lSaturation = pd->dwData;
+}
+
/******************************************************************************
* SetProperty : change input device properties
*/
@@ -278,7 +348,6 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
{
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
DWORD i;
- ObjProps remap_props;
TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
@@ -295,69 +364,15 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) {
-
- /* Many games poll the joystick immediately after setting the range
- * for calibration purposes, so the old values need to be remapped
- * to the new range before it does so */
-
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
- for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) {
-
- remap_props.lDevMin = This->props[i].lMin;
- remap_props.lDevMax = This->props[i].lMax;
-
- remap_props.lDeadZone = This->props[i].lDeadZone;
- remap_props.lSaturation = This->props[i].lSaturation;
-
- remap_props.lMin = pr->lMin;
- remap_props.lMax = pr->lMax;
-
- switch (This->base.data_format.wine_df->rgodf[i].dwOfs) {
- case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break;
- case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break;
- case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break;
- case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break;
- case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break;
- case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break;
- case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break;
- case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break;
- default: break;
- }
-
- This->props[i].lMin = pr->lMin;
- This->props[i].lMax = pr->lMax;
- }
+ for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
+ remap_range(This, i, pr);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj);
- if (obj >= 0) {
-
- remap_props.lDevMin = This->props[obj].lMin;
- remap_props.lDevMax = This->props[obj].lMax;
-
- remap_props.lDeadZone = This->props[obj].lDeadZone;
- remap_props.lSaturation = This->props[obj].lSaturation;
-
- remap_props.lMin = pr->lMin;
- remap_props.lMax = pr->lMax;
-
- switch (This->base.data_format.wine_df->rgodf[obj].dwOfs) {
- case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break;
- case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break;
- case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break;
- case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break;
- case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break;
- case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break;
- case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break;
- case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break;
- default: break;
- }
-
- This->props[obj].lMin = pr->lMin;
- This->props[obj].lMax = pr->lMax;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_range(This, obj, pr);
}
break;
}
@@ -366,15 +381,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
if (ph->dwHow == DIPH_DEVICE) {
TRACE("deadzone(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
- This->props[i].lDeadZone = pd->dwData;
+ remap_deadzone(This, i, pd);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
- if (obj >= 0) {
- This->props[obj].lDeadZone = pd->dwData;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_deadzone(This, obj, pd);
}
break;
}
@@ -383,15 +396,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
if (ph->dwHow == DIPH_DEVICE) {
TRACE("saturation(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
- This->props[i].lSaturation = pd->dwData;
+ remap_saturation(This, i, pd);
} else {
int obj = find_property(&This->base.data_format, ph);
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
- if (obj >= 0) {
- This->props[obj].lSaturation = pd->dwData;
- return DI_OK;
- }
+ if (obj >= 0)
+ remap_saturation(This, obj, pd);
}
break;
}
--
1.9.1

View File

@@ -0,0 +1 @@
Fixes: [41317] dinput: Recalculated Axis after deadzone change.

View File

@@ -0,0 +1,240 @@
From 47a1e3618a1629a6f7cca1b84f761eaab3627f75 Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:23:12 +1100
Subject: [PATCH] dinput: Allow reconnecting to disconnected joysticks
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=34297
---
dlls/dinput/joystick_linuxinput.c | 148 +++++++++++++++++++++++++++++---------
1 file changed, 113 insertions(+), 35 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index ace4641..233dd25 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -83,6 +83,13 @@ struct wine_input_absinfo {
LONG flat;
};
+enum wine_joystick_linuxinput_fd_state {
+ WINE_FD_STATE_CLOSED = 0, /* No device has been opened yet */
+ WINE_FD_STATE_OK, /* File descriptor is open and ready for reading */
+ WINE_FD_STATE_DISCONNECTED, /* Read error occurred; might be able to reopen later */
+ WINE_FD_STATE_INVALID, /* Device is no longer available at original pathname */
+};
+
/* implemented in effect_linuxinput.c */
HRESULT linuxinput_create_effect(int* fd, REFGUID rguid, struct list *parent_list_entry, LPDIRECTINPUTEFFECT* peff);
HRESULT linuxinput_get_info_A(int fd, REFGUID rguid, LPDIEFFECTINFOA info);
@@ -122,6 +129,7 @@ struct JoystickImpl
/* joystick private */
int joyfd;
+ enum wine_joystick_linuxinput_fd_state joyfd_state;
int dev_axes_to_di[ABS_MAX];
POINTL povs[4];
@@ -466,6 +474,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
newDevice->generic.base.dinput = dinput;
newDevice->generic.joy_polldev = joy_polldev;
newDevice->joyfd = -1;
+ newDevice->joyfd_state = WINE_FD_STATE_CLOSED;
newDevice->joydev = &joydevs[index];
newDevice->generic.name = newDevice->joydev->name;
list_init(&newDevice->ff_effects);
@@ -669,38 +678,15 @@ static HRESULT joydev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REF
return DIERR_DEVICENOTREG;
}
-
-const struct dinput_device joystick_linuxinput_device = {
- "Wine Linux-input joystick driver",
- joydev_enum_deviceA,
- joydev_enum_deviceW,
- joydev_create_device
-};
-
-/******************************************************************************
- * Acquire : gets exclusive control of the joystick
- */
-static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
+static int joydev_open_evdev(JoystickImpl *This)
{
- JoystickImpl *This = impl_from_IDirectInputDevice8W(iface);
- HRESULT res;
-
- TRACE("(this=%p)\n",This);
+ int fd;
- if ((res = IDirectInputDevice2WImpl_Acquire(iface)) != DI_OK)
+ if ((fd = open(This->joydev->device, O_RDWR)) == -1)
{
- WARN("Failed to acquire: %x\n", res);
- return res;
- }
-
- if ((This->joyfd = open(This->joydev->device, O_RDWR)) == -1)
- {
- if ((This->joyfd = open(This->joydev->device, O_RDONLY)) == -1)
+ if ((fd = open(This->joydev->device, O_RDONLY)) == -1)
{
/* Couldn't open the device at all */
- ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno));
- IDirectInputDevice2WImpl_Unacquire(iface);
- return DIERR_NOTFOUND;
}
else
{
@@ -715,18 +701,53 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
event.type = EV_FF;
event.code = FF_GAIN;
event.value = This->ff_gain;
- if (write(This->joyfd, &event, sizeof(event)) == -1)
+ if (write(fd, &event, sizeof(event)) == -1)
ERR("Failed to set gain (%i): %d %s\n", This->ff_gain, errno, strerror(errno));
if (!This->ff_autocenter)
{
/* Disable autocenter. */
event.code = FF_AUTOCENTER;
event.value = 0;
- if (write(This->joyfd, &event, sizeof(event)) == -1)
+ if (write(fd, &event, sizeof(event)) == -1)
ERR("Failed disabling autocenter: %d %s\n", errno, strerror(errno));
}
}
+ return fd;
+}
+
+
+const struct dinput_device joystick_linuxinput_device = {
+ "Wine Linux-input joystick driver",
+ joydev_enum_deviceA,
+ joydev_enum_deviceW,
+ joydev_create_device
+};
+
+/******************************************************************************
+ * Acquire : gets exclusive control of the joystick
+ */
+static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
+{
+ JoystickImpl *This = impl_from_IDirectInputDevice8W(iface);
+ HRESULT res;
+
+ TRACE("(this=%p)\n",This);
+
+ if ((res = IDirectInputDevice2WImpl_Acquire(iface)) != DI_OK)
+ {
+ WARN("Failed to acquire: %x\n", res);
+ return res;
+ }
+
+ if ((This->joyfd = joydev_open_evdev(This)) == -1)
+ {
+ ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno));
+ IDirectInputDevice2WImpl_Unacquire(iface);
+ return DIERR_NOTFOUND;
+ }
+
+ This->joyfd_state = WINE_FD_STATE_OK;
return DI_OK;
}
@@ -764,6 +785,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
close(This->joyfd);
This->joyfd = -1;
+ This->joyfd_state = WINE_FD_STATE_CLOSED;
}
return res;
}
@@ -808,23 +830,79 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
struct input_event ie;
JoystickImpl *This = impl_from_IDirectInputDevice8A(iface);
- if (This->joyfd==-1)
- return;
+ if (This->joyfd == -1)
+ {
+ int fd;
+ char namebuf[MAX_PATH + 8]; /* 8 == strlen(EVDEVDRIVER) */
+
+ if (This->joyfd_state != WINE_FD_STATE_DISCONNECTED)
+ return;
+ /* Try to reconnect to the device. */
+ fd = joydev_open_evdev(This);
+ if (fd == -1)
+ return;
+ namebuf[sizeof(namebuf) - strlen(EVDEVDRIVER) - 1] = 0;
+ if (ioctl(fd, EVIOCGNAME(sizeof(namebuf) - strlen(EVDEVDRIVER) - 1), namebuf) == -1)
+ {
+ /* Couldn't get the name; assume it's a different device. */
+ ERR("EVIOCGNAME(%s) failed: %d %s", This->joydev->device, errno, strerror(errno));
+ This->joyfd_state = WINE_FD_STATE_INVALID;
+ return;
+ }
+ strcat(namebuf, EVDEVDRIVER); /* Guaranteed to be safe. */
+ if (strcmp(namebuf, This->joydev->name) != 0)
+ {
+ ERR("Device %s changed from \"%s\" to \"%s\"! Can't reconnect.\n", This->joydev->device, This->joydev->name, namebuf);
+ This->joyfd_state = WINE_FD_STATE_INVALID;
+ return;
+ }
+ if (InterlockedCompareExchange(&This->joyfd, fd, -1) == -1)
+ {
+ This->joyfd_state = WINE_FD_STATE_OK;
+ TRACE("Reconnected to \"%s\" on %s", This->joydev->name, This->joydev->device);
+ }
+ else
+ {
+ /* Somebody beat us to it! Throw away our fd and use theirs. */
+ close(fd);
+ }
+ }
while (1)
{
LONG value = 0;
int inst_id = -1;
+ int result;
plfd.fd = This->joyfd;
plfd.events = POLLIN;
- if (poll(&plfd,1,0) != 1)
- return;
+ result = poll(&plfd,1,0);
+ if (result != 1)
+ {
+ if (result == -1)
+ {
+ ERR("poll failed: %d %s\n", errno, strerror(errno));
+ close(This->joyfd);
+ This->joyfd = -1;
+ This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
+ }
+ return;
+ }
/* we have one event, so we can read */
- if (sizeof(ie)!=read(This->joyfd,&ie,sizeof(ie)))
- return;
+ result = read(This->joyfd,&ie,sizeof(ie));
+ if (result != sizeof(ie))
+ {
+ if (result == -1)
+ {
+ ERR("read failed: %d %s\n", errno, strerror(errno));
+ close(This->joyfd);
+ This->joyfd = -1;
+ This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
+ }
+ return;
+ }
TRACE("input_event: type %d, code %d, value %d\n",ie.type,ie.code,ie.value);
switch (ie.type) {
--
1.9.1

View File

@@ -0,0 +1,2 @@
Fixes: [34297] dinput: Allow reconnecting to disconnected joysticks

View File

@@ -0,0 +1,137 @@
From bf98a453bb814564ccf848d76d06c4b544cfa998 Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:21:03 +1100
Subject: [PATCH] dinput: Allow remapping of joystick buttons
Changed
- Change the array to store the origial button.
- Remove lookup loops.
- Changed max Buttons to 32 to match DIJOYSTATE structure.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
---
dlls/dinput/joystick.c | 29 +++++++++++++++++++++++++++++
dlls/dinput/joystick_linux.c | 7 +++++--
dlls/dinput/joystick_linuxinput.c | 2 ++
dlls/dinput/joystick_osx.c | 2 ++
dlls/dinput/joystick_private.h | 4 ++++
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 0ec1ceb..b8b0027 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -950,6 +950,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
int tokens = 0;
int axis = 0;
int pov = 0;
+ int button;
get_app_key(&hkey, &appkey);
@@ -961,6 +962,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
}
+ for (button = 0; button < MAX_MAP_BUTTONS; button++)
+ This->button_map[button] = button;
+
+ if (!get_config_key(hkey, appkey, "ButtonMap", buffer, sizeof(buffer)))
+ {
+ static const char *delim = ",";
+ int button = 0;
+ char *token;
+
+ TRACE("ButtonMap = \"%s\"\n", buffer);
+ for (token = strtok(buffer, delim);
+ token != NULL && button < MAX_MAP_BUTTONS;
+ token = strtok(NULL, delim), button++)
+ {
+ char *s;
+ int value = strtol(token, &s, 10);
+ if (value < 0 || *s != '\0')
+ {
+ ERR("invalid button number: \"%s\"", token);
+ }
+ else
+ {
+ TRACE("mapping physical button %d to DInput button %d", value, button);
+ This->button_map[value] = button;
+ }
+ }
+ }
+
This->axis_map = HeapAlloc(GetProcessHeap(), 0, This->device_axis_count * sizeof(int));
if (!This->axis_map) return DIERR_OUTOFMEMORY;
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index 963e62f..6286746 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -807,10 +807,13 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON)
{
+ int button;
if (jse.number >= This->generic.devcaps.dwButtons) return;
- inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON;
- This->generic.js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00;
+ button = This->generic.button_map[jse.number];
+
+ inst_id = DIDFT_MAKEINSTANCE(button) | DIDFT_PSHBUTTON;
+ This->generic.js.rgbButtons[button] = value = jse.value ? 0x80 : 0x00;
}
else if (jse.type & JS_EVENT_AXIS)
{
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index 910e755..8ea268e 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -836,6 +836,8 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
if (btn & 0x80)
{
btn &= 0x7F;
+ btn = This->generic.button_map[btn];
+
inst_id = DIDFT_MAKEINSTANCE(btn) | DIDFT_PSHBUTTON;
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
}
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index 0701b9f..224e203 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -809,6 +809,8 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface)
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
if (oldVal != newVal)
{
+ button_idx = device->generic.button_map[button_idx];
+
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
}
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
index e758cac..4a382c2 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@
#define MAX_PROPS 164
struct JoystickGenericImpl;
+/* Number of buttons for which to allow remapping */
+#define MAX_MAP_BUTTONS 32
+
typedef void joy_polldev_handler(LPDIRECTINPUTDEVICE8A iface);
typedef struct JoystickGenericImpl
@@ -47,6 +50,7 @@ typedef struct JoystickGenericImpl
char *name;
int device_axis_count; /* Total number of axes in the device */
int *axis_map; /* User axes remapping */
+ int button_map[MAX_MAP_BUTTONS]; /* User button remapping */
LONG deadzone; /* Default dead-zone */
joy_polldev_handler *joy_polldev;
--
1.9.1

View File

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

View File

@@ -1,16 +1,16 @@
From 93ec896e73fe1b9ad7100e4ea22086e940eb8ef4 Mon Sep 17 00:00:00 2001
From e84ed4d3b01ef570a0dc235822c3b4d159c78cb1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 15 Aug 2015 07:41:17 +0200
Subject: [PATCH] gdi32: Perform lazy initialization of fonts to improve
startup performance.
---
dlls/gdi32/dc.c | 8 +++-----
dlls/gdi32/freetype.c | 49 ++++++++++++++++++++++++++++++++++---------------
dlls/gdi32/dc.c | 8 +++----
dlls/gdi32/freetype.c | 49 ++++++++++++++++++++++++++++++-------------
2 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
index 8ee8a52..208c220 100644
index 8ee8a52d..208c2202 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -148,11 +148,9 @@ DC *alloc_dc_ptr( WORD magic )
@@ -29,7 +29,7 @@ index 8ee8a52..208c220 100644
}
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 9f6bdfe..492d29e 100644
index 098faff3..fbdbf858 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -110,6 +110,9 @@
@@ -42,7 +42,7 @@ index 9f6bdfe..492d29e 100644
#ifdef HAVE_FREETYPE
#ifndef HAVE_FT_TRUETYPEENGINETYPE
@@ -3264,6 +3267,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3266,6 +3269,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
{
INT ret = 0;
@@ -50,7 +50,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3306,6 +3310,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3308,6 +3312,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
*/
HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts)
{
@@ -58,7 +58,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3344,6 +3349,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3346,6 +3351,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
{
INT ret = 0;
@@ -66,7 +66,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3665,10 +3671,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
@@ -3667,10 +3673,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource,
LPCWSTR font_file, LPCWSTR font_path )
{
@@ -81,16 +81,16 @@ index 9f6bdfe..492d29e 100644
if (!unix_name || !get_fontdir( unix_name, &fontdir ))
SetLastError( ERROR_INVALID_PARAMETER );
else
@@ -4174,8 +4183,6 @@ static BOOL init_freetype(void)
FT_SimpleVersion = ((FT_Version.major << 16) & 0xff0000) |
((FT_Version.minor << 8) & 0x00ff00) |
((FT_Version.patch ) & 0x0000ff);
@@ -4184,8 +4193,6 @@ static BOOL init_freetype(void)
FT_UInt interpreter_version = 35;
pFT_Property_Set( library, "truetype", "interpreter-version", &interpreter_version );
}
-
- font_driver = &freetype_funcs;
return TRUE;
sym_not_found:
@@ -4361,21 +4368,13 @@ static void reorder_font_list(void)
@@ -4371,21 +4378,13 @@ static void reorder_font_list(void)
default_sans = set_default( default_sans_list );
}
@@ -114,7 +114,7 @@ index 9f6bdfe..492d29e 100644
#ifdef SONAME_LIBFONTCONFIG
init_fontconfig();
@@ -4401,7 +4400,7 @@ BOOL WineEngInit(void)
@@ -4411,7 +4410,7 @@ BOOL WineEngInit(void)
if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL)
{
ERR("Failed to create font mutex\n");
@@ -123,7 +123,7 @@ index 9f6bdfe..492d29e 100644
}
WaitForSingleObject(font_mutex, INFINITE);
@@ -4428,6 +4427,21 @@ BOOL WineEngInit(void)
@@ -4438,6 +4437,21 @@ BOOL WineEngInit(void)
return TRUE;
}
@@ -145,7 +145,7 @@ index 9f6bdfe..492d29e 100644
/* Some fonts have large usWinDescent values, as a result of storing signed short
in unsigned field. That's probably caused by sTypoDescent vs usWinDescent confusion in
some font generation tools. */
@@ -5124,8 +5138,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
@@ -5180,8 +5194,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
static BOOL freetype_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
LPCWSTR output, const DEVMODEW *devmode )
{
@@ -159,7 +159,7 @@ index 9f6bdfe..492d29e 100644
if (!physdev) return FALSE;
push_dc_driver( dev, &physdev->dev, &freetype_funcs );
return TRUE;
@@ -8627,6 +8645,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
@@ -8718,6 +8736,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
{
@@ -168,5 +168,5 @@ index 9f6bdfe..492d29e 100644
lprs->wFlags = TT_AVAILABLE | TT_ENABLED;
lprs->nLanguageID = 0;
--
1.9.1
2.20.1

View File

@@ -1,15 +1,15 @@
From 99f4a556a733ff6036edbcde171beef389449d6f Mon Sep 17 00:00:00 2001
From 547a92d26b034a226b65a64aec229412129bdd61 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 27 May 2017 04:15:55 +0200
Subject: user32: Return a more reasonable display DeviceID.
Subject: [PATCH] user32: Return a more reasonable display DeviceID.
---
dlls/user32/misc.c | 7 ++++++-
dlls/user32/tests/monitor.c | 16 +++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
dlls/user32/tests/monitor.c | 12 ++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index 1898ce1b696..03114650348 100644
index a6b7644020f..c1c812dbd51 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -249,7 +249,12 @@ static const WCHAR adapter_device_deviceid[] = {'P','C','I','\\','V','E','N','_'
@@ -27,33 +27,18 @@ index 1898ce1b696..03114650348 100644
struct display_devices_enum_info
{
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
index dfdca49e792..886d63ccfe2 100644
index 8bf284a5e1c..6a886da1b63 100644
--- a/dlls/user32/tests/monitor.c
+++ b/dlls/user32/tests/monitor.c
@@ -89,12 +89,12 @@ static void test_enumdisplaydevices(void)
}
@@ -225,6 +225,7 @@ static void test_enumdisplaydevices(void)
int adapter_index;
int monitor_index;
BOOL ret;
+ int num;
dd.cb = sizeof(dd);
- while(1)
+ for (num = 0;; num++)
if (!pEnumDisplayDevicesA)
{
- BOOL ret;
HDC dc;
ret = pEnumDisplayDevicesA(NULL, num, &dd, 0);
if(!ret) break;
+
if(dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
{
strcpy(primary_device_name, dd.DeviceName);
@@ -107,7 +107,6 @@ static void test_enumdisplaydevices(void)
ok(dc != NULL, "Failed to CreateDC(\"%s\") err=%d\n", dd.DeviceName, GetLastError());
DeleteDC(dc);
}
- num++;
}
if (primary_num == -1 || !pEnumDisplayMonitors || !pGetMonitorInfoA)
@@ -122,6 +121,17 @@ static void test_enumdisplaydevices(void)
@@ -276,6 +277,17 @@ static void test_enumdisplaydevices(void)
ok(!strcmp(primary_monitor_device_name, primary_device_name),
"monitor device name %s, device name %s\n", primary_monitor_device_name,
primary_device_name);
@@ -72,5 +57,5 @@ index dfdca49e792..886d63ccfe2 100644
struct vid_mode
--
2.12.2
2.20.1

View File

@@ -1,4 +1,4 @@
From 25d8d0cbbab19ec990505c7cf1af4bcfcf7f5bfd Mon Sep 17 00:00:00 2001
From cadd504fc3631e7b0ceee0add7100b4182f9173e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 16 Oct 2018 15:34:38 +1100
Subject: [PATCH] hid: Implement HidD_FlushQueue
@@ -11,7 +11,7 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/hid/hid.spec b/dlls/hid/hid.spec
index cbae14c..549ceea 100644
index e4d4202..505c3d2 100644
--- a/dlls/hid/hid.spec
+++ b/dlls/hid/hid.spec
@@ -1,4 +1,4 @@
@@ -21,12 +21,12 @@ index cbae14c..549ceea 100644
@ stdcall HidD_GetAttributes(long ptr)
@ stub HidD_GetConfiguration
diff --git a/dlls/hid/hidd.c b/dlls/hid/hidd.c
index 614e7c4..fa96bf9 100644
index 4b703ca..a4384aa 100644
--- a/dlls/hid/hidd.c
+++ b/dlls/hid/hidd.c
@@ -145,3 +145,11 @@ BOOLEAN WINAPI HidD_SetOutputReport(HANDLE HidDeviceObject, void *ReportBuffer,
@@ -158,3 +158,11 @@ BOOLEAN WINAPI HidD_SetOutputReport(HANDLE HidDeviceObject, void *ReportBuffer,
TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength);
return DeviceIoControl(HidDeviceObject, IOCTL_HID_SET_OUTPUT_REPORT, ReportBuffer, ReportBufferLength, NULL, 0, NULL, NULL);
return sync_ioctl(HidDeviceObject, IOCTL_HID_SET_OUTPUT_REPORT, ReportBuffer, ReportBufferLength, NULL, 0, NULL);
}
+
+BOOLEAN WINAPI HidD_FlushQueue(HANDLE HidDeviceObject)

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