You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
23960d9862 | ||
|
bca3c546d2 | ||
|
1e3eb08c69 | ||
|
bd8f35fad1 | ||
|
ccd0bc4ccd | ||
|
89af635b94 | ||
|
f05f084d9a | ||
|
93a708bf2b | ||
|
b9f34bbbc3 | ||
|
8be2c25e19 | ||
|
7059b2e1ec | ||
|
7044b0dc98 | ||
|
a1bf11e38a | ||
|
703c84ce70 | ||
|
b79e576574 | ||
|
db1f94bae4 | ||
|
0f52b315d6 | ||
|
ce3fc5723d | ||
|
595f2f9860 | ||
|
c01051f313 | ||
|
d163510e1e | ||
|
c675804204 | ||
|
d729a7b132 | ||
|
2782e6db1e | ||
|
a08376bca0 | ||
|
3371e62824 | ||
|
8218a78955 | ||
|
a8cb853708 | ||
|
6cbb6dc117 |
@@ -1,30 +0,0 @@
|
||||
Contributing to Wine Staging
|
||||
----------------------------
|
||||
|
||||
First of all, thank you for taking the time to contribute to this project.
|
||||
|
||||
### Reporting bugs
|
||||
|
||||
Since WineConf 2015 Wine Staging is an official part of WineHQ, which means you
|
||||
can report problems directly at [bugs.winehq.org](https://bugs.winehq.org/).
|
||||
Most of the time bugs found in Wine Staging also turn out to be present in the
|
||||
development branch, so its recommended to open your bug in the "Wine" product,
|
||||
unless you are sure its really "Wine Staging" specific. For bugs related to our
|
||||
binary packages, please open a bug report in the "Packaging" product.
|
||||
|
||||
### Submitting patches
|
||||
|
||||
**IMPORTANT:** Please use [dev.wine-staging.com](https://dev.wine-staging.com/patches)
|
||||
for patch submissions, we currently do not accept Pull requests on GitHub.
|
||||
|
||||
Wine Staging mainly concentrates on experimental features and patches which are
|
||||
difficult to get into the development branch. If you have a very simple bug fix
|
||||
including tests, there is usually no need to send it to Wine Staging. You can
|
||||
directly contribute it to the
|
||||
[development branch](http://wiki.winehq.org/SubmittingPatches). However, if you
|
||||
already tried that without success, or are working on such a complex area that
|
||||
you do not really think its ready for inclusion, you might want to submit it to
|
||||
our Staging tree. Please open a patch submission request on
|
||||
[dev.wine-staging.com](https://dev.wine-staging.com/patches) including the patch.
|
||||
More information is also available in our
|
||||
[Wiki](https://wiki.winehq.org/Wine-Staging_Patches).
|
@@ -8,7 +8,8 @@ are part of **Wine Staging** and are licensed under the terms of the
|
||||
|
||||
```
|
||||
Copyright (C) 2014-2017 the Wine Staging project authors.
|
||||
Copyright (C) 2018 Alistair Leslie-Hughes
|
||||
Copyright (C) 2018 Alistair Leslie-Hughes, Zebediah Figura
|
||||
Copyright (C) 2019-2020 Alistair Leslie-Hughes, Zebediah Figura, Paul Gofman
|
||||
|
||||
Wine Staging is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
12
README.md
12
README.md
@@ -6,15 +6,14 @@ features, which have not been integrated into the development branch yet. The
|
||||
idea of Wine Staging is to provide experimental features faster to end users and
|
||||
to give developers the possibility to discuss and improve their patches before
|
||||
they are integrated into the main branch. More information about Wine Staging
|
||||
can also be found on our website [wine-staging.com](http://wine-staging.com).
|
||||
can also be found [on the WineHQ wiki](https://wiki.winehq.org/Wine-Staging).
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Ready-to-use packages for Wine Staging are available for a variety of Linux
|
||||
distributions and for Mac OS X. Just follow the
|
||||
[installation instructions](https://wine-staging.com/installation.html)
|
||||
for your operating system.
|
||||
distributions and for Mac OS X. Just follow the [installation
|
||||
instructions](https://wiki.winehq.org/Download) for your operating system.
|
||||
|
||||
On most distributions the `wine-staging` package is installed to
|
||||
`/opt/wine-staging`, such that multiple Wine versions can be installed in
|
||||
@@ -78,5 +77,6 @@ in our [Wiki](https://wiki.winehq.org/Wine-Staging).
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Please see CONTRIBUTING.md for more information about contributing to Wine
|
||||
Staging.
|
||||
For information on contributing to Wine-Staging, please see
|
||||
<https://wiki.winehq.org/Wine-Staging_Contributing>. Note that GitHub pull
|
||||
requests are strongly dispreferred, especially for patches.
|
@@ -1,16 +1,27 @@
|
||||
From f517c6095f355529ccbd44585d22458fb52f9197 Mon Sep 17 00:00:00 2001
|
||||
From e5500b9a3c7d36563725dc7975c2436a02165906 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 15 Nov 2019 15:46:23 +0800
|
||||
Subject: [PATCH 1/5] include: Add adserr.h.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
Subject: [PATCH] include: Add adserr.h.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
include/adserr.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 50 insertions(+)
|
||||
include/Makefile.in | 1 +
|
||||
include/adserr.h | 50 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 include/adserr.h
|
||||
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index cbad4d604f..2e0a10d650 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -7,6 +7,7 @@ SOURCES = \
|
||||
activaut.idl \
|
||||
activdbg.idl \
|
||||
activscp.idl \
|
||||
+ adserr.h \
|
||||
adshlp.h \
|
||||
advpub.h \
|
||||
af_irda.h \
|
||||
diff --git a/include/adserr.h b/include/adserr.h
|
||||
new file mode 100644
|
||||
index 0000000000..83da568763
|
||||
@@ -68,5 +79,5 @@ index 0000000000..83da568763
|
||||
+
|
||||
+#endif /* __ADSERR_H */
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,15 +1,16 @@
|
||||
From ba50fc98ee4690e62899d48efc856c2bc910536c Mon Sep 17 00:00:00 2001
|
||||
From 8044f571b7e674ce9e562488864d48646a9c7b88 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 01:25:02 +0200
|
||||
Subject: advapi32/tests: Extend security label / token integrity tests.
|
||||
Subject: [PATCH] advapi32/tests: Extend security label / token integrity
|
||||
tests.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/Makefile.in | 2 +-
|
||||
dlls/advapi32/tests/security.c | 389 +++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/advapi32/tests/security.c | 389 +++++++++++++++++++++++++++++++-
|
||||
2 files changed, 387 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/Makefile.in b/dlls/advapi32/tests/Makefile.in
|
||||
index 36ce031ef62..4437e6e5de7 100644
|
||||
index 12583e59f57..caee5fae308 100644
|
||||
--- a/dlls/advapi32/tests/Makefile.in
|
||||
+++ b/dlls/advapi32/tests/Makefile.in
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -20,10 +21,10 @@ index 36ce031ef62..4437e6e5de7 100644
|
||||
C_SRCS = \
|
||||
cred.c \
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 0fd41fe82fa..4a03db27e69 100644
|
||||
index a736dbffd22..4529469d932 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7191,13 +7191,19 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7034,13 +7034,19 @@ static void test_token_security_descriptor(void)
|
||||
{
|
||||
static SID low_level = {SID_REVISION, 1, {SECURITY_MANDATORY_LABEL_AUTHORITY},
|
||||
{SECURITY_MANDATORY_LOW_RID}};
|
||||
@@ -46,7 +47,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
PROCESS_INFORMATION info;
|
||||
DWORD size, index, retd;
|
||||
ACCESS_ALLOWED_ACE *ace;
|
||||
@@ -7347,6 +7353,185 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7190,6 +7196,185 @@ static void test_token_security_descriptor(void)
|
||||
/* The security label is also not inherited */
|
||||
if (pAddMandatoryAce)
|
||||
{
|
||||
@@ -103,7 +104,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -165,7 +166,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -215,7 +216,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -232,7 +233,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
ret = InitializeAcl(acl, 256, ACL_REVISION);
|
||||
ok(ret, "InitializeAcl failed with error %u\n", GetLastError());
|
||||
|
||||
@@ -7362,6 +7547,90 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7205,6 +7390,90 @@ static void test_token_security_descriptor(void)
|
||||
|
||||
ret = SetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, sd);
|
||||
ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError());
|
||||
@@ -272,7 +273,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -310,7 +311,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -323,7 +324,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
}
|
||||
else
|
||||
win_skip("SYSTEM_MANDATORY_LABEL not supported\n");
|
||||
@@ -7467,6 +7736,116 @@ static void test_child_token_sd(void)
|
||||
@@ -7312,6 +7581,116 @@ static void test_child_token_sd(void)
|
||||
HeapFree(GetProcessHeap(), 0, sd);
|
||||
}
|
||||
|
||||
@@ -366,7 +367,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+ ok(acl && acl != (void *)0xdeadbeef, "Got invalid SACL\n");
|
||||
+ ok(!defaulted, "SACL defaulted\n");
|
||||
+ ok(acl->AceCount == 1, "Expected exactly one ACE\n");
|
||||
+ ret = pGetAce(acl, 0, (void **)&ace_label);
|
||||
+ ret = GetAce(acl, 0, (void **)&ace_label);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace_label->Header.AceType);
|
||||
@@ -421,7 +422,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+ ok(acl && acl != (void *)0xdeadbeef, "Got invalid SACL\n");
|
||||
+ ok(!defaulted, "SACL defaulted\n");
|
||||
+ ok(acl->AceCount == 1, "Expected exactly one ACE\n");
|
||||
+ ret = pGetAce(acl, 0, (void **)&ace_label);
|
||||
+ ret = GetAce(acl, 0, (void **)&ace_label);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace_label->Header.AceType);
|
||||
@@ -440,7 +441,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
static void test_GetExplicitEntriesFromAclW(void)
|
||||
{
|
||||
static const WCHAR wszCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'};
|
||||
@@ -7653,6 +8032,10 @@ START_TEST(security)
|
||||
@@ -7571,6 +7950,10 @@ START_TEST(security)
|
||||
{
|
||||
if (!strcmp(myARGV[2], "test_token_sd"))
|
||||
test_child_token_sd();
|
||||
@@ -452,5 +453,5 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
test_process_security_child();
|
||||
return;
|
||||
--
|
||||
2.13.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,105 +0,0 @@
|
||||
From 61b96f3dab24d3aec26237c8760d75f964474bc5 Mon Sep 17 00:00:00 2001
|
||||
From: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
Date: Mon, 8 Apr 2019 17:06:58 +0200
|
||||
Subject: [PATCH 2/2] combase: Add GetRestrictedErrorInfo and
|
||||
RoOriginateLanguageException stubs.
|
||||
|
||||
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
---
|
||||
.../api-ms-win-core-winrt-error-l1-1-0.spec | 2 +-
|
||||
.../api-ms-win-core-winrt-error-l1-1-1.spec | 4 ++--
|
||||
dlls/combase/combase.spec | 4 ++--
|
||||
dlls/combase/roapi.c | 19 +++++++++++++++++++
|
||||
4 files changed, 24 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec b/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec
|
||||
index de0a6d8..99f1ca3 100644
|
||||
--- a/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec
|
||||
@@ -1,4 +1,4 @@
|
||||
-@ stub GetRestrictedErrorInfo
|
||||
+@ stdcall GetRestrictedErrorInfo(ptr) combase.GetRestrictedErrorInfo
|
||||
@ stub RoCaptureErrorContext
|
||||
@ stub RoFailFastWithErrorContext
|
||||
@ stub RoGetErrorReportingFlags
|
||||
diff --git a/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec b/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec
|
||||
index b1ad813..0b390f1 100644
|
||||
--- a/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec
|
||||
+++ b/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec
|
||||
@@ -1,4 +1,4 @@
|
||||
-@ stub GetRestrictedErrorInfo
|
||||
+@ stdcall GetRestrictedErrorInfo(ptr) combase.GetRestrictedErrorInfo
|
||||
@ stub IsErrorPropagationEnabled
|
||||
@ stub RoCaptureErrorContext
|
||||
@ stub RoClearError
|
||||
@@ -9,7 +9,7 @@
|
||||
@ stub RoInspectThreadErrorInfo
|
||||
@ stub RoOriginateError
|
||||
@ stub RoOriginateErrorW
|
||||
-@ stub RoOriginateLanguageException
|
||||
+@ stdcall RoOriginateLanguageException(long ptr ptr) combase.RoOriginateLanguageException
|
||||
@ stub RoReportFailedDelegate
|
||||
@ stub RoReportUnhandledError
|
||||
@ stub RoResolveRestrictedErrorInfoReference
|
||||
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
|
||||
index 93575d5..f67527a 100644
|
||||
--- a/dlls/combase/combase.spec
|
||||
+++ b/dlls/combase/combase.spec
|
||||
@@ -180,7 +180,7 @@
|
||||
@ stub GetFuncDescs
|
||||
@ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream
|
||||
@ stub GetHookInterface
|
||||
-@ stub GetRestrictedErrorInfo
|
||||
+@ stdcall GetRestrictedErrorInfo(ptr)
|
||||
@ stub HSTRING_UserFree
|
||||
@ stub HSTRING_UserFree64
|
||||
@ stub HSTRING_UserMarshal
|
||||
@@ -260,7 +260,7 @@
|
||||
@ stub RoInspectThreadErrorInfo
|
||||
@ stub RoOriginateError
|
||||
@ stub RoOriginateErrorW
|
||||
-@ stub RoOriginateLanguageException
|
||||
+@ stdcall RoOriginateLanguageException(long ptr ptr)
|
||||
@ stub RoParameterizedTypeExtraGetTypeSignature
|
||||
@ stdcall RoRegisterActivationFactories(ptr ptr long ptr)
|
||||
@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr)
|
||||
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
|
||||
index c9fe80f..2a6dcdf 100644
|
||||
--- a/dlls/combase/roapi.c
|
||||
+++ b/dlls/combase/roapi.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "initguid.h"
|
||||
#include "roapi.h"
|
||||
#include "roparameterizediid.h"
|
||||
+#include "restrictederrorinfo.h"
|
||||
#include "winstring.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -276,6 +277,24 @@ HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONF
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * GetRestrictedErrorInfo (combase.@)
|
||||
+ */
|
||||
+HRESULT WINAPI GetRestrictedErrorInfo( IRestrictedErrorInfo **info )
|
||||
+{
|
||||
+ FIXME( "(%p)\n", info );
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * RoOriginateLanguageException (combase.@)
|
||||
+ */
|
||||
+BOOL WINAPI RoOriginateLanguageException( HRESULT error, HSTRING message, IUnknown *language_exception )
|
||||
+{
|
||||
+ FIXME("(%x %s %p) stub\n", error, debugstr_hstring(message), language_exception);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* CleanupTlsOleState (combase.@)
|
||||
*/
|
||||
void WINAPI CleanupTlsOleState(void *unknown)
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [46972] combase: Add GetRestrictedErrorInfo/RoOriginateLanguageException stubs.
|
@@ -0,0 +1,57 @@
|
||||
From ad23e816eb724d81032306f8ac6d4faa96ccaf4a Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 12 Nov 2019 18:13:20 +0800
|
||||
Subject: [PATCH] comctl32: Bump version to 6.0.
|
||||
|
||||
An application that I have here checks comctl32.dll version information
|
||||
and refuses to run, changing DLL version to 6.0 makes it run.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/comctl32.h | 2 +-
|
||||
dlls/comctl32/comctl32.rc | 2 +-
|
||||
include/commctrl.h | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
|
||||
index 78e97983381..42b434a96d9 100644
|
||||
--- a/dlls/comctl32/comctl32.h
|
||||
+++ b/dlls/comctl32/comctl32.h
|
||||
@@ -192,7 +192,7 @@ INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
|
||||
-#define COMCTL32_VERSION_MINOR 81
|
||||
+#define COMCTL32_VERSION_MINOR 0
|
||||
|
||||
/* Our internal stack structure of the window procedures to subclass */
|
||||
typedef struct _SUBCLASSPROCS {
|
||||
diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc
|
||||
index c9aa1ba6253..be6e2425193 100644
|
||||
--- a/dlls/comctl32/comctl32.rc
|
||||
+++ b/dlls/comctl32/comctl32.rc
|
||||
@@ -114,7 +114,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
|
||||
#define WINE_FILENAME_STR "comctl32.dll"
|
||||
#define WINE_FILEVERSION COMCTL32_VERSION, COMCTL32_VERSION_MINOR, 4704, 1100
|
||||
-#define WINE_FILEVERSION_STR "5.81"
|
||||
+#define WINE_FILEVERSION_STR "6.00.4704.1100"
|
||||
#define WINE_PRODUCTVERSION WINE_FILEVERSION
|
||||
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSION_STR
|
||||
|
||||
diff --git a/include/commctrl.h b/include/commctrl.h
|
||||
index 700b335fbb7..029a4b45457 100644
|
||||
--- a/include/commctrl.h
|
||||
+++ b/include/commctrl.h
|
||||
@@ -51,7 +51,7 @@ enum _LI_METRIC
|
||||
HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
|
||||
HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
|
||||
|
||||
-#define COMCTL32_VERSION 5 /* dll version */
|
||||
+#define COMCTL32_VERSION 6 /* dll version */
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0400
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -0,0 +1,187 @@
|
||||
From 095e3e2646bc5ba024c166a2ac6829a894c0d1f7 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 10 Jan 2020 09:28:50 +1100
|
||||
Subject: [PATCH] dinput: Support default DIPROP_BUFFERSIZE buffer size
|
||||
|
||||
When a program calls SetProperty with DIPROP_BUFFERSIZE, dinput records
|
||||
this value for GetProperty but only uses it when the device can support
|
||||
that number of buffers otherwise a max value.
|
||||
|
||||
In the case of game "Far Cry 5", it passes through (DWORD)-1 which
|
||||
cause HeapAlloc to fail ((DWORD)-1 * sizeof(DIDEVICEOBJECTDATA)).
|
||||
|
||||
Since there is no real way of working out the max value, I've capped it at 100 as
|
||||
the default value is 20.
|
||||
|
||||
MSDN reference.
|
||||
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ee417908(v=vs.85)
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45732
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dinput/device.c | 14 ++++++++++----
|
||||
dlls/dinput/device_private.h | 3 ++-
|
||||
dlls/dinput/joystick_linux.c | 4 ++++
|
||||
dlls/dinput/joystick_linuxinput.c | 4 ++++
|
||||
dlls/dinput/joystick_osx.c | 4 ++++
|
||||
dlls/dinput/keyboard.c | 3 +++
|
||||
dlls/dinput/mouse.c | 3 +++
|
||||
dlls/dinput/tests/device.c | 14 ++++++++++++++
|
||||
8 files changed, 44 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index 28329d03b5..1604075f84 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -1307,7 +1307,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
|
||||
|
||||
if (pdiph->dwSize != sizeof(DIPROPDWORD)) return DIERR_INVALIDPARAM;
|
||||
|
||||
- pd->dwData = This->queue_len;
|
||||
+ pd->dwData = This->buffersize;
|
||||
TRACE("buffersize = %d\n", pd->dwData);
|
||||
break;
|
||||
}
|
||||
@@ -1396,12 +1396,18 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
|
||||
TRACE("buffersize = %d\n", pd->dwData);
|
||||
|
||||
EnterCriticalSection(&This->crit);
|
||||
+
|
||||
+ This->buffersize = pd->dwData;
|
||||
+
|
||||
+ This->queue_len = This->buffersize > 100 ? 100 : This->buffersize;
|
||||
+ if (This->buffersize > 100)
|
||||
+ WARN("Trying to set large buffer size %d\n", pd->dwData);
|
||||
+
|
||||
HeapFree(GetProcessHeap(), 0, This->data_queue);
|
||||
|
||||
- This->data_queue = !pd->dwData ? NULL : HeapAlloc(GetProcessHeap(), 0,
|
||||
- pd->dwData * sizeof(DIDEVICEOBJECTDATA));
|
||||
+ This->data_queue = !This->queue_len ? NULL : HeapAlloc(GetProcessHeap(), 0,
|
||||
+ This->queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
This->queue_head = This->queue_tail = This->overflow = 0;
|
||||
- This->queue_len = pd->dwData;
|
||||
|
||||
LeaveCriticalSection(&This->crit);
|
||||
break;
|
||||
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
|
||||
index 27e9c26286..23d9e2eebc 100644
|
||||
--- a/dlls/dinput/device_private.h
|
||||
+++ b/dlls/dinput/device_private.h
|
||||
@@ -71,10 +71,11 @@ struct IDirectInputDeviceImpl
|
||||
DI_EVENT_PROC event_proc; /* function to receive mouse & keyboard events */
|
||||
|
||||
LPDIDEVICEOBJECTDATA data_queue; /* buffer for 'GetDeviceData'. */
|
||||
- int queue_len; /* size of the queue - set in 'SetProperty' */
|
||||
+ int queue_len; /* valid size of the queue */
|
||||
int queue_head; /* position to write new event into queue */
|
||||
int queue_tail; /* next event to read from queue */
|
||||
BOOL overflow; /* return DI_BUFFEROVERFLOW in 'GetDeviceData' */
|
||||
+ DWORD buffersize; /* size of the queue - set in 'SetProperty' */
|
||||
|
||||
DataFormat data_format; /* user data format and wine to user format converter */
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
|
||||
index afdf659b4a..1e7bf72936 100644
|
||||
--- a/dlls/dinput/joystick_linux.c
|
||||
+++ b/dlls/dinput/joystick_linux.c
|
||||
@@ -501,6 +501,10 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
|
||||
newDevice->generic.base.ref = 1;
|
||||
newDevice->generic.base.dinput = dinput;
|
||||
newDevice->generic.base.guid = *rguid;
|
||||
+ newDevice->generic.base.buffersize = 20;
|
||||
+ newDevice->generic.base.queue_len = 20;
|
||||
+ newDevice->generic.base.data_queue = HeapAlloc(GetProcessHeap(), 0,
|
||||
+ newDevice->generic.base.queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
InitializeCriticalSection(&newDevice->generic.base.crit);
|
||||
newDevice->generic.base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->generic.base.crit");
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
|
||||
index b5418d805c..98283a1eed 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -471,6 +471,10 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
|
||||
newDevice->generic.base.ref = 1;
|
||||
newDevice->generic.base.guid = *rguid;
|
||||
newDevice->generic.base.dinput = dinput;
|
||||
+ newDevice->generic.base.buffersize = 20;
|
||||
+ newDevice->generic.base.queue_len = 20;
|
||||
+ newDevice->generic.base.data_queue = HeapAlloc(GetProcessHeap(), 0,
|
||||
+ newDevice->generic.base.queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
newDevice->generic.joy_polldev = joy_polldev;
|
||||
newDevice->joyfd = -1;
|
||||
newDevice->joydev = &joydevs[index];
|
||||
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
|
||||
index 990f5d1f07..c48cad1f5a 100644
|
||||
--- a/dlls/dinput/joystick_osx.c
|
||||
+++ b/dlls/dinput/joystick_osx.c
|
||||
@@ -1168,6 +1168,10 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
|
||||
newDevice->generic.base.ref = 1;
|
||||
newDevice->generic.base.dinput = dinput;
|
||||
newDevice->generic.base.guid = *rguid;
|
||||
+ newDevice->generic.base.buffersize = 20;
|
||||
+ newDevice->generic.base.queue_len = 20;
|
||||
+ newDevice->generic.base.data_queue = HeapAlloc(GetProcessHeap(), 0,
|
||||
+ newDevice->generic.base.queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
InitializeCriticalSection(&newDevice->generic.base.crit);
|
||||
newDevice->generic.base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->generic.base.crit");
|
||||
|
||||
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
|
||||
index 47f28cac52..15a6be4dee 100644
|
||||
--- a/dlls/dinput/keyboard.c
|
||||
+++ b/dlls/dinput/keyboard.c
|
||||
@@ -268,6 +268,9 @@ static SysKeyboardImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput)
|
||||
InitializeCriticalSection(&newDevice->base.crit);
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit");
|
||||
newDevice->subtype = get_keyboard_subtype();
|
||||
+ newDevice->base.buffersize = 20;
|
||||
+ newDevice->base.queue_len = 20;
|
||||
+ newDevice->base.data_queue = HeapAlloc(GetProcessHeap(), 0, newDevice->base.queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
|
||||
/* Create copy of default data format */
|
||||
if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed;
|
||||
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
|
||||
index 08ace2f4e9..59c8c9dad8 100644
|
||||
--- a/dlls/dinput/mouse.c
|
||||
+++ b/dlls/dinput/mouse.c
|
||||
@@ -214,6 +214,9 @@ static SysMouseImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput)
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysMouseImpl*->base.crit");
|
||||
newDevice->base.dinput = dinput;
|
||||
newDevice->base.event_proc = dinput_mouse_hook;
|
||||
+ newDevice->base.buffersize = 20;
|
||||
+ newDevice->base.queue_len = 20;
|
||||
+ newDevice->base.data_queue = HeapAlloc(GetProcessHeap(), 0, newDevice->base.queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
|
||||
get_app_key(&hkey, &appkey);
|
||||
if (!get_config_key(hkey, appkey, "MouseWarpOverride", buffer, sizeof(buffer)))
|
||||
diff --git a/dlls/dinput/tests/device.c b/dlls/dinput/tests/device.c
|
||||
index a2a5a65686..4dd16c70d2 100644
|
||||
--- a/dlls/dinput/tests/device.c
|
||||
+++ b/dlls/dinput/tests/device.c
|
||||
@@ -106,8 +106,22 @@ static void test_object_info(IDirectInputDeviceA *device, HWND hwnd)
|
||||
dp.diph.dwHeaderSize = sizeof(DIPROPHEADER);
|
||||
dp.diph.dwHow = DIPH_DEVICE;
|
||||
dp.diph.dwObj = 0;
|
||||
+ dp.dwData = -1;
|
||||
+
|
||||
+ hr = IDirectInputDevice_GetProperty(device, DIPROP_BUFFERSIZE, &dp.diph);
|
||||
+ ok(hr == DI_OK, "Failed: %08x\n", hr);
|
||||
+ ok(dp.dwData == 20, "got %d\n", dp.dwData);
|
||||
+
|
||||
+ dp.dwData = -1;
|
||||
+ hr = IDirectInputDevice_SetProperty(device, DIPROP_BUFFERSIZE, (LPCDIPROPHEADER)&dp.diph);
|
||||
+ ok(hr == DI_OK, "SetProperty() failed: %08x\n", hr);
|
||||
+
|
||||
dp.dwData = 0;
|
||||
+ hr = IDirectInputDevice_GetProperty(device, DIPROP_BUFFERSIZE, &dp.diph);
|
||||
+ ok(hr == DI_OK, "Failed: %08x\n", hr);
|
||||
+ ok(dp.dwData == -1, "got %d\n", dp.dwData);
|
||||
|
||||
+ dp.dwData = 0;
|
||||
hr = IDirectInputDevice_SetProperty(device, DIPROP_BUFFERSIZE, (LPCDIPROPHEADER)&dp.diph);
|
||||
ok(hr == DI_OK, "SetProperty() failed: %08x\n", hr);
|
||||
cnt = 5;
|
||||
--
|
||||
2.17.1
|
||||
|
1
patches/dinput-DIPROP_BUFFERSIZE/definition
Normal file
1
patches/dinput-DIPROP_BUFFERSIZE/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [45732] Far Cry 5 Cannot Steer Land Vehicles
|
@@ -1,18 +1,18 @@
|
||||
From 47a1e3618a1629a6f7cca1b84f761eaab3627f75 Mon Sep 17 00:00:00 2001
|
||||
From dd42a25720d9d711137e84a449319fc197b2639f 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 +++++++++++++++++++++++++++++---------
|
||||
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
|
||||
index 98283a1eedd..439e7d84bd4 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -83,6 +83,13 @@ struct wine_input_absinfo {
|
||||
@@ -84,6 +84,13 @@ struct wine_input_absinfo {
|
||||
LONG flat;
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ index ace4641..233dd25 100644
|
||||
/* 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
|
||||
@@ -123,6 +130,7 @@ struct JoystickImpl
|
||||
|
||||
/* joystick private */
|
||||
int joyfd;
|
||||
@@ -34,15 +34,15 @@ index ace4641..233dd25 100644
|
||||
|
||||
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;
|
||||
@@ -477,6 +485,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
|
||||
newDevice->generic.base.queue_len * sizeof(DIDEVICEOBJECTDATA));
|
||||
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
|
||||
@@ -684,38 +693,15 @@ static HRESULT joydev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REF
|
||||
return DIERR_DEVICENOTREG;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ index ace4641..233dd25 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -715,18 +701,53 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
|
||||
@@ -730,18 +716,53 @@ static HRESULT WINAPI JoystickWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
|
||||
event.type = EV_FF;
|
||||
event.code = FF_GAIN;
|
||||
event.value = This->ff_gain;
|
||||
@@ -141,7 +141,7 @@ index ace4641..233dd25 100644
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
@@ -764,6 +785,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
|
||||
@@ -779,6 +800,7 @@ static HRESULT WINAPI JoystickWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
|
||||
|
||||
close(This->joyfd);
|
||||
This->joyfd = -1;
|
||||
@@ -149,7 +149,7 @@ index ace4641..233dd25 100644
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -808,23 +830,79 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
|
||||
@@ -823,23 +845,79 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
|
||||
struct input_event ie;
|
||||
JoystickImpl *This = impl_from_IDirectInputDevice8A(iface);
|
||||
|
||||
@@ -236,5 +236,5 @@ index ace4641..233dd25 100644
|
||||
TRACE("input_event: type %d, code %d, value %d\n",ie.type,ie.code,ie.value);
|
||||
switch (ie.type) {
|
||||
--
|
||||
1.9.1
|
||||
2.24.1
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
Fixes: [34297] dinput: Allow reconnecting to disconnected joysticks
|
||||
|
||||
Depends: dinput-DIPROP_BUFFERSIZE
|
||||
|
@@ -0,0 +1,166 @@
|
||||
From b86977f6822d286b595c756c814c2cc986968050 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 22 Dec 2019 19:35:25 +1100
|
||||
Subject: [PATCH 1/2] directmanipulation: Support IDirectManipulationContent in
|
||||
IDirectManipulationPrimaryContent interface
|
||||
|
||||
Based of patch by Gijs Vermeulen.
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 110 ++++++++++++++++++-
|
||||
1 file changed, 109 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index ca60e76db6e..05601abbd45 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -177,10 +177,10 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
-
|
||||
struct primarycontext
|
||||
{
|
||||
IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
|
||||
+ IDirectManipulationContent IDirectManipulationContent_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
@@ -189,6 +189,11 @@ static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent
|
||||
return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
|
||||
}
|
||||
|
||||
+static inline struct primarycontext *impl_from_IDirectManipulationContent(IDirectManipulationContent *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationContent_iface);
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
@@ -201,6 +206,12 @@ static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *
|
||||
*ppv = &This->IDirectManipulationPrimaryContent_iface;
|
||||
return S_OK;
|
||||
}
|
||||
+ else if(IsEqualGUID(riid, &IID_IDirectManipulationContent))
|
||||
+ {
|
||||
+ IUnknown_AddRef(iface);
|
||||
+ *ppv = &This->IDirectManipulationContent_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
|
||||
FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
@@ -313,6 +324,102 @@ static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
|
||||
primary_GetCenterPoint
|
||||
};
|
||||
|
||||
+
|
||||
+static HRESULT WINAPI content_QueryInterface(IDirectManipulationContent *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ return IDirectManipulationPrimaryContent_QueryInterface(&This->IDirectManipulationPrimaryContent_iface,
|
||||
+ riid, ppv);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI content_AddRef(IDirectManipulationContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ return IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI content_Release(IDirectManipulationContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ return IDirectManipulationPrimaryContent_Release(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetContentRect(IDirectManipulationContent *iface, RECT *size)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p\n", This, size);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_SetContentRect(IDirectManipulationContent *iface, const RECT *size)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p\n", This, size);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetViewport(IDirectManipulationContent *iface, REFIID riid, void **object)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, debugstr_guid(riid), object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetTag(IDirectManipulationContent *iface, REFIID riid, void **object, UINT32 *id)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %p, %p\n", This, debugstr_guid(riid), object, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_SetTag(IDirectManipulationContent *iface, IUnknown *object, UINT32 id)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, object, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetOutputTransform(IDirectManipulationContent *iface,
|
||||
+ float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetContentTransform(IDirectManipulationContent *iface,
|
||||
+ float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_SyncContentTransform(IDirectManipulationContent *iface,
|
||||
+ const float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirectManipulationContentVtbl contentVtbl =
|
||||
+{
|
||||
+ content_QueryInterface,
|
||||
+ content_AddRef,
|
||||
+ content_Release,
|
||||
+ content_GetContentRect,
|
||||
+ content_SetContentRect,
|
||||
+ content_GetViewport,
|
||||
+ content_GetTag,
|
||||
+ content_SetTag,
|
||||
+ content_GetOutputTransform,
|
||||
+ content_GetContentTransform,
|
||||
+ content_SyncContentTransform
|
||||
+};
|
||||
+
|
||||
struct directviewport
|
||||
{
|
||||
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
|
||||
@@ -473,6 +580,7 @@ static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *i
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
|
||||
+ primary->IDirectManipulationContent_iface.lpVtbl = &contentVtbl;
|
||||
primary->ref = 1;
|
||||
|
||||
*object = &primary->IDirectManipulationPrimaryContent_iface;
|
||||
--
|
||||
2.24.0
|
||||
|
@@ -0,0 +1,34 @@
|
||||
From 8e284d9f96e2f3c623d6f520c530aaadad943fcd Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 22 Dec 2019 20:54:43 +1100
|
||||
Subject: [PATCH 2/2] directmanipulation: Fake success in some functions
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 05601abbd45..b42c1f84387 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -357,7 +357,7 @@ static HRESULT WINAPI content_SetContentRect(IDirectManipulationContent *iface,
|
||||
{
|
||||
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
FIXME("%p, %p\n", This, size);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI content_GetViewport(IDirectManipulationContent *iface, REFIID riid, void **object)
|
||||
@@ -540,7 +540,7 @@ static HRESULT WINAPI viewport_SetViewportRect(IDirectManipulationViewport2 *ifa
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
FIXME("%p, %p\n", This, viewport);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI viewport_ZoomToRect(IDirectManipulationViewport2 *iface, const float left,
|
||||
--
|
||||
2.24.0
|
||||
|
@@ -0,0 +1,166 @@
|
||||
From 410d340084e24732e3d7423f74dbe8aa92dddd09 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 9 Jan 2020 14:51:36 -0600
|
||||
Subject: [PATCH] dsound: Use an SRW lock for buffer_list_lock.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48408
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/dsound/buffer.c | 4 ++--
|
||||
dlls/dsound/dsound.c | 15 +++++++--------
|
||||
dlls/dsound/dsound_private.h | 2 +-
|
||||
dlls/dsound/mixer.c | 4 ++--
|
||||
dlls/dsound/primary.c | 4 ++--
|
||||
5 files changed, 14 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
|
||||
index c61868a7820..82a23eb8907 100644
|
||||
--- a/dlls/dsound/buffer.c
|
||||
+++ b/dlls/dsound/buffer.c
|
||||
@@ -644,7 +644,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(IDirectSoundBuffer8 *iface,
|
||||
|
||||
if (x1 || x2)
|
||||
{
|
||||
- RtlAcquireResourceShared(&This->device->buffer_list_lock, TRUE);
|
||||
+ AcquireSRWLockShared(&This->device->buffer_list_lock);
|
||||
LIST_FOR_EACH_ENTRY(iter, &This->buffer->buffers, IDirectSoundBufferImpl, entry )
|
||||
{
|
||||
RtlAcquireResourceShared(&iter->lock, TRUE);
|
||||
@@ -665,7 +665,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(IDirectSoundBuffer8 *iface,
|
||||
}
|
||||
RtlReleaseResource(&iter->lock);
|
||||
}
|
||||
- RtlReleaseResource(&This->device->buffer_list_lock);
|
||||
+ ReleaseSRWLockShared(&This->device->buffer_list_lock);
|
||||
}
|
||||
|
||||
return hres;
|
||||
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
|
||||
index 4dcea9e29e9..e991210621f 100644
|
||||
--- a/dlls/dsound/dsound.c
|
||||
+++ b/dlls/dsound/dsound.c
|
||||
@@ -181,7 +181,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
|
||||
InitializeCriticalSection(&(device->mixlock));
|
||||
device->mixlock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DirectSoundDevice.mixlock");
|
||||
|
||||
- RtlInitializeResource(&(device->buffer_list_lock));
|
||||
+ InitializeSRWLock(&device->buffer_list_lock);
|
||||
|
||||
init_eax_device(device);
|
||||
|
||||
@@ -242,7 +242,6 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, device->cp_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, device->buffer);
|
||||
- RtlDeleteResource(&device->buffer_list_lock);
|
||||
device->mixlock.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&device->mixlock);
|
||||
HeapFree(GetProcessHeap(),0,device);
|
||||
@@ -616,7 +615,7 @@ HRESULT DirectSoundDevice_AddBuffer(
|
||||
|
||||
TRACE("(%p, %p)\n", device, pDSB);
|
||||
|
||||
- RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE);
|
||||
+ AcquireSRWLockExclusive(&device->buffer_list_lock);
|
||||
|
||||
if (device->buffers)
|
||||
newbuffers = HeapReAlloc(GetProcessHeap(),0,device->buffers,sizeof(IDirectSoundBufferImpl*)*(device->nrofbuffers+1));
|
||||
@@ -633,7 +632,7 @@ HRESULT DirectSoundDevice_AddBuffer(
|
||||
hr = DSERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
- RtlReleaseResource(&(device->buffer_list_lock));
|
||||
+ ReleaseSRWLockExclusive(&device->buffer_list_lock);
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -648,7 +647,7 @@ void DirectSoundDevice_RemoveBuffer(DirectSoundDevice * device, IDirectSoundBuff
|
||||
|
||||
TRACE("(%p, %p)\n", device, pDSB);
|
||||
|
||||
- RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE);
|
||||
+ AcquireSRWLockExclusive(&device->buffer_list_lock);
|
||||
|
||||
if (device->nrofbuffers == 1) {
|
||||
assert(device->buffers[0] == pDSB);
|
||||
@@ -666,7 +665,7 @@ void DirectSoundDevice_RemoveBuffer(DirectSoundDevice * device, IDirectSoundBuff
|
||||
device->nrofbuffers--;
|
||||
TRACE("buffer count is now %d\n", device->nrofbuffers);
|
||||
|
||||
- RtlReleaseResource(&(device->buffer_list_lock));
|
||||
+ ReleaseSRWLockExclusive(&device->buffer_list_lock);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -873,14 +872,14 @@ static HRESULT WINAPI IDirectSound8Impl_SetCooperativeLevel(IDirectSound8 *iface
|
||||
level==DSSCL_PRIORITY ? "DSSCL_PRIORITY" : "DSSCL_EXCLUSIVE");
|
||||
}
|
||||
|
||||
- RtlAcquireResourceExclusive(&device->buffer_list_lock, TRUE);
|
||||
+ AcquireSRWLockExclusive(&device->buffer_list_lock);
|
||||
EnterCriticalSection(&device->mixlock);
|
||||
if ((level == DSSCL_WRITEPRIMARY) != (device->priolevel == DSSCL_WRITEPRIMARY))
|
||||
hr = DSOUND_ReopenDevice(device, level == DSSCL_WRITEPRIMARY);
|
||||
if (SUCCEEDED(hr))
|
||||
device->priolevel = level;
|
||||
LeaveCriticalSection(&device->mixlock);
|
||||
- RtlReleaseResource(&device->buffer_list_lock);
|
||||
+ ReleaseSRWLockExclusive(&device->buffer_list_lock);
|
||||
return hr;
|
||||
}
|
||||
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index dcb67d56948..87786c6b11b 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -83,7 +83,7 @@ struct DirectSoundDevice
|
||||
DWORD writelead, buflen, ac_frames, frag_frames, playpos, pad, stopped;
|
||||
int nrofbuffers;
|
||||
IDirectSoundBufferImpl** buffers;
|
||||
- RTL_RWLOCK buffer_list_lock;
|
||||
+ RTL_SRWLOCK buffer_list_lock;
|
||||
CRITICAL_SECTION mixlock;
|
||||
IDirectSoundBufferImpl *primary;
|
||||
DWORD speaker_config;
|
||||
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
|
||||
index 023622a9f98..3006d249d43 100644
|
||||
--- a/dlls/dsound/mixer.c
|
||||
+++ b/dlls/dsound/mixer.c
|
||||
@@ -856,9 +856,9 @@ DWORD CALLBACK DSOUND_mixthread(void *p)
|
||||
if (!dev->ref)
|
||||
break;
|
||||
|
||||
- RtlAcquireResourceShared(&(dev->buffer_list_lock), TRUE);
|
||||
+ AcquireSRWLockShared(&dev->buffer_list_lock);
|
||||
DSOUND_PerformMix(dev);
|
||||
- RtlReleaseResource(&(dev->buffer_list_lock));
|
||||
+ ReleaseSRWLockShared(&dev->buffer_list_lock);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
|
||||
index 852ec51b7ff..8d42fe0ed90 100644
|
||||
--- a/dlls/dsound/primary.c
|
||||
+++ b/dlls/dsound/primary.c
|
||||
@@ -472,7 +472,7 @@ HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passe
|
||||
}
|
||||
|
||||
/* **** */
|
||||
- RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE);
|
||||
+ AcquireSRWLockExclusive(&device->buffer_list_lock);
|
||||
EnterCriticalSection(&(device->mixlock));
|
||||
|
||||
if (device->priolevel == DSSCL_WRITEPRIMARY) {
|
||||
@@ -508,7 +508,7 @@ HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passe
|
||||
|
||||
out:
|
||||
LeaveCriticalSection(&(device->mixlock));
|
||||
- RtlReleaseResource(&(device->buffer_list_lock));
|
||||
+ ReleaseSRWLockExclusive(&device->buffer_list_lock);
|
||||
/* **** */
|
||||
|
||||
return err;
|
||||
--
|
||||
2.24.1
|
||||
|
1
patches/dsound-SRW/definition
Normal file
1
patches/dsound-SRW/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [48408] dsound: Use an SRW lock for buffer_list_lock.
|
@@ -1,4 +1,4 @@
|
||||
From 34fefc056a65053060d7de738087f2527b7ed6bb Mon Sep 17 00:00:00 2001
|
||||
From 32344f3d3cb10c07b4dc2c5547d2226e293f730b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 10 Feb 2015 16:34:05 +0100
|
||||
Subject: [PATCH] dxva2: Implement semi-stub for Direct3DDeviceManager9
|
||||
@@ -6,15 +6,15 @@ Subject: [PATCH] dxva2: Implement semi-stub for Direct3DDeviceManager9
|
||||
|
||||
---
|
||||
dlls/dxva2/Makefile.in | 2 +
|
||||
dlls/dxva2/devicemanager.c | 212 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/dxva2/devicemanager.c | 213 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/dxva2/dxva2_private.h | 21 ++++
|
||||
dlls/dxva2/main.c | 7 +-
|
||||
4 files changed, 240 insertions(+), 2 deletions(-)
|
||||
4 files changed, 241 insertions(+), 2 deletions(-)
|
||||
create mode 100644 dlls/dxva2/devicemanager.c
|
||||
create mode 100644 dlls/dxva2/dxva2_private.h
|
||||
|
||||
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
|
||||
index 44e125e9b5f..5c3e3842d79 100644
|
||||
index 44e125e9b5..5c3e3842d7 100644
|
||||
--- a/dlls/dxva2/Makefile.in
|
||||
+++ b/dlls/dxva2/Makefile.in
|
||||
@@ -1,6 +1,8 @@
|
||||
@@ -28,10 +28,10 @@ index 44e125e9b5f..5c3e3842d79 100644
|
||||
main.c
|
||||
diff --git a/dlls/dxva2/devicemanager.c b/dlls/dxva2/devicemanager.c
|
||||
new file mode 100644
|
||||
index 00000000000..15d78aa7ff0
|
||||
index 0000000000..bba0fbc619
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/devicemanager.c
|
||||
@@ -0,0 +1,212 @@
|
||||
@@ -0,0 +1,213 @@
|
||||
+/*
|
||||
+ * Copyright 2014 Sebastian Lackner for Pipelight
|
||||
+ *
|
||||
@@ -187,6 +187,7 @@ index 00000000000..15d78aa7ff0
|
||||
+ FIXME("(%p)->(%p, %p, %d): semi-stub\n", This, hDevice, ppDevice, fBlock);
|
||||
+
|
||||
+ *ppDevice = (IDirect3DDevice9 *)hDevice;
|
||||
+ IDirect3DDevice9_AddRef(*ppDevice);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
@@ -246,7 +247,7 @@ index 00000000000..15d78aa7ff0
|
||||
+}
|
||||
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
|
||||
new file mode 100644
|
||||
index 00000000000..d6e59fc6da8
|
||||
index 0000000000..d6e59fc6da
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/dxva2_private.h
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -272,7 +273,7 @@ index 00000000000..d6e59fc6da8
|
||||
+
|
||||
+extern HRESULT devicemanager_create( UINT *resetToken, void **ppv ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
|
||||
index 782f0dfa3d4..df8f2030104 100644
|
||||
index 782f0dfa3d..df8f203010 100644
|
||||
--- a/dlls/dxva2/main.c
|
||||
+++ b/dlls/dxva2/main.c
|
||||
@@ -19,8 +19,11 @@
|
||||
@@ -300,5 +301,5 @@ index 782f0dfa3d4..df8f2030104 100644
|
||||
|
||||
HRESULT WINAPI DXVA2CreateVideoService( IDirect3DDevice9 *device, REFIID riid, void **ppv )
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,28 +0,0 @@
|
||||
From 36195993f4774dc100437f2aef60201041ee752a Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 26 Dec 2016 21:17:29 +0800
|
||||
Subject: gdiplus: Ignore an externally set DC origin.
|
||||
|
||||
gdiplus maintains its own graphics state.
|
||||
|
||||
FIXME: perhaps some other places need a similar fix.
|
||||
---
|
||||
dlls/gdiplus/graphics.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
|
||||
index f9a6f3e..e086dfc 100644
|
||||
--- a/dlls/gdiplus/graphics.c
|
||||
+++ b/dlls/gdiplus/graphics.c
|
||||
@@ -497,6 +497,8 @@ static GpStatus alpha_blend_pixels_hrgn(GpGraphics *graphics, INT dst_x, INT dst
|
||||
|
||||
save = SaveDC(graphics->hdc);
|
||||
|
||||
+ SetViewportOrgEx(graphics->hdc, 0, 0, NULL);
|
||||
+
|
||||
if (hrgn)
|
||||
ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND);
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# Fixes: [35372] Ignore externally set DC state in gdiplus
|
||||
Disabled: true
|
@@ -0,0 +1,76 @@
|
||||
From fdde823d2213a71de08a7d96827b6657b7d8bfd8 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 19 Dec 2019 12:49:07 +0800
|
||||
Subject: [PATCH 1/3] gdiplus: GdipCreateBitmapFromHBITMAP should use palette
|
||||
from the GDI bitmap.
|
||||
|
||||
This patch fixes painting bitmaps with bpp <= 8.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/gdiplus/image.c | 21 ++++++++++-----------
|
||||
1 file changed, 10 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
|
||||
index c3e538d6dba..aed931dd7df 100644
|
||||
--- a/dlls/gdiplus/image.c
|
||||
+++ b/dlls/gdiplus/image.c
|
||||
@@ -5111,6 +5111,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi
|
||||
GpStatus retval;
|
||||
PixelFormat format;
|
||||
BitmapData lockeddata;
|
||||
+ char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
|
||||
+ BITMAPINFO *pbmi = (BITMAPINFO *)bmibuf;
|
||||
|
||||
TRACE("%p %p %p\n", hbm, hpal, bitmap);
|
||||
|
||||
@@ -5160,8 +5162,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi
|
||||
if (retval == Ok)
|
||||
{
|
||||
HDC hdc;
|
||||
- char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
|
||||
- BITMAPINFO *pbmi = (BITMAPINFO *)bmibuf;
|
||||
INT src_height;
|
||||
|
||||
hdc = CreateCompatibleDC(NULL);
|
||||
@@ -5181,29 +5181,28 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi
|
||||
GdipBitmapUnlockBits(*bitmap, &lockeddata);
|
||||
}
|
||||
|
||||
- if (retval == Ok && hpal)
|
||||
+ /* According to the tests hpal is ignored */
|
||||
+ if (retval == Ok && pbmi->bmiHeader.biBitCount <= 8)
|
||||
{
|
||||
- PALETTEENTRY entry[256];
|
||||
- ColorPalette *palette=NULL;
|
||||
+ ColorPalette *palette;
|
||||
int i, num_palette_entries;
|
||||
|
||||
- num_palette_entries = GetPaletteEntries(hpal, 0, 256, entry);
|
||||
+ num_palette_entries = pbmi->bmiHeader.biClrUsed;
|
||||
if (!num_palette_entries)
|
||||
- retval = GenericError;
|
||||
+ num_palette_entries = 1 << pbmi->bmiHeader.biBitCount;
|
||||
|
||||
palette = heap_alloc_zero(sizeof(ColorPalette) + sizeof(ARGB) * (num_palette_entries-1));
|
||||
if (!palette)
|
||||
retval = OutOfMemory;
|
||||
-
|
||||
- if (retval == Ok)
|
||||
+ else
|
||||
{
|
||||
palette->Flags = 0;
|
||||
palette->Count = num_palette_entries;
|
||||
|
||||
for (i=0; i<num_palette_entries; i++)
|
||||
{
|
||||
- palette->Entries[i] = 0xff000000 | entry[i].peRed << 16 |
|
||||
- entry[i].peGreen << 8 | entry[i].peBlue;
|
||||
+ palette->Entries[i] = 0xff000000 | pbmi->bmiColors[i].rgbRed << 16 |
|
||||
+ pbmi->bmiColors[i].rgbGreen << 8 | pbmi->bmiColors[i].rgbBlue;
|
||||
}
|
||||
|
||||
retval = GdipSetImagePalette(&(*bitmap)->image, palette);
|
||||
--
|
||||
2.24.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user