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
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ed9681d9df | ||
|
1196bcb86b | ||
|
9afb244a8e | ||
|
5681cd5466 | ||
|
1d3c799e6f | ||
|
a49aa40ac8 | ||
|
1998c0570d | ||
|
245fc7913d | ||
|
a1afc6f151 | ||
|
3287f0fc9b | ||
|
671295089e | ||
|
197e08b441 | ||
|
cd1862609a | ||
|
8725e273cc | ||
|
b9204d93c9 | ||
|
e1259ef094 | ||
|
bccec28691 | ||
|
f25c0ce411 | ||
|
7fd92efae8 | ||
|
968a9068f4 | ||
|
5e5b163eba | ||
|
5bc08f5e70 | ||
|
eb91fab43e | ||
|
5b59788752 | ||
|
5634d119e0 | ||
|
52f92a42de | ||
|
6f185a694c | ||
|
0bb3121273 | ||
|
77619384a4 | ||
|
77ef8ff7ef | ||
|
831b1f895e | ||
|
071fe01910 | ||
|
1b7ebd3bb8 | ||
|
6ce73c283d | ||
|
f3e2363b52 | ||
|
6e49a945cf | ||
|
92cc7818b2 |
@@ -1,25 +0,0 @@
|
||||
From bd48f0d6b1476a77520f0bf5f82ac08e9dbf9acd Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:54:01 +0100
|
||||
Subject: amstream: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/amstream/mediastreamfilter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/amstream/mediastreamfilter.c b/dlls/amstream/mediastreamfilter.c
|
||||
index 5abcb2f..a7ff6e8 100644
|
||||
--- a/dlls/amstream/mediastreamfilter.c
|
||||
+++ b/dlls/amstream/mediastreamfilter.c
|
||||
@@ -42,7 +42,7 @@ typedef struct {
|
||||
|
||||
static inline IMediaStreamFilterImpl *impl_from_IMediaStreamFilter(IMediaStreamFilter *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, IMediaStreamFilterImpl, filter);
|
||||
+ return CONTAINING_RECORD((IBaseFilter *)iface, IMediaStreamFilterImpl, filter.IBaseFilter_iface);
|
||||
}
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
--
|
||||
2.7.4
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From b4586e37df817f205c8bebe319b4765dea5c62d5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 24 Sep 2017 19:21:06 +0200
|
||||
Subject: evr: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/evr/evr.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c
|
||||
index c2d2933211e..5533f38a649 100644
|
||||
--- a/dlls/evr/evr.c
|
||||
+++ b/dlls/evr/evr.c
|
||||
@@ -136,7 +136,7 @@ static const IUnknownVtbl evr_inner_vtbl =
|
||||
|
||||
static inline evr_filter *impl_from_IBaseFilter(IBaseFilter *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, evr_filter, filter);
|
||||
+ return CONTAINING_RECORD(iface, evr_filter, filter.IBaseFilter_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI filter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1,26 +1,26 @@
|
||||
From 7f05362e86a285551a5694e98fa9abecb99018a0 Mon Sep 17 00:00:00 2001
|
||||
From 19efcf925a49a5d7e0b82eb6e4797b0ac725f2dc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 17 Jan 2016 17:07:35 +0100
|
||||
Subject: [PATCH] ext-ms-win-xaml-pal-l1-1-0: Add dll and add stub for
|
||||
XamlBehaviorEnabled.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in | 4 +++
|
||||
.../ext-ms-win-xaml-pal-l1-1-0.spec | 6 ++++
|
||||
dlls/ext-ms-win-xaml-pal-l1-1-0/main.c | 35 +++++++++++++++++++
|
||||
configure.ac | 1 +
|
||||
dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in | 4 +++
|
||||
.../ext-ms-win-xaml-pal-l1-1-0.spec | 6 ++++
|
||||
dlls/ext-ms-win-xaml-pal-l1-1-0/main.c | 35 ++++++++++++++++++++++
|
||||
4 files changed, 46 insertions(+)
|
||||
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
|
||||
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
|
||||
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 420f6311db3..30718491bb8 100644
|
||||
index 8484c83..a9b51d2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3289,6 +3289,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-credui-l1-1-0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-cryptui-l1-1-0)
|
||||
@@ -3255,6 +3255,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-shell-comctl32-init-l1-1-0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-shell-comdlg32-l1-1-0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-shell-shell32-l1-2-0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-uxtheme-themes-l1-1-0)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-xaml-pal-l1-1-0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/faultrep)
|
||||
@@ -28,7 +28,7 @@ index 420f6311db3..30718491bb8 100644
|
||||
WINE_CONFIG_MAKEFILE(dlls/feclient)
|
||||
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in b/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..6382d85272b
|
||||
index 0000000..6382d85
|
||||
--- /dev/null
|
||||
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
@@ -38,7 +38,7 @@ index 00000000000..6382d85272b
|
||||
+ main.c
|
||||
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec b/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
|
||||
new file mode 100644
|
||||
index 00000000000..c167f5e753e
|
||||
index 0000000..c167f5e
|
||||
--- /dev/null
|
||||
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
|
||||
@@ -0,0 +1,6 @@
|
||||
@@ -50,7 +50,7 @@ index 00000000000..c167f5e753e
|
||||
+@ stub XamlPalUninitialize
|
||||
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c b/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
|
||||
new file mode 100644
|
||||
index 00000000000..3e282758f41
|
||||
index 0000000..3e28275
|
||||
--- /dev/null
|
||||
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
|
||||
@@ -0,0 +1,35 @@
|
||||
@@ -90,5 +90,5 @@ index 00000000000..3e282758f41
|
||||
+ return TRUE;
|
||||
+}
|
||||
--
|
||||
2.17.0
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,91 +0,0 @@
|
||||
From 72d00367b9863fd84d47623b6811552e155fca84 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 5 Feb 2019 10:00:26 +1100
|
||||
Subject: [PATCH] bcrypt: Add BCryptDestroySecret/BCryptSecretAgreement stubs
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 4 ++--
|
||||
dlls/bcrypt/bcrypt_main.c | 16 ++++++++++++++++
|
||||
include/bcrypt.h | 3 +++
|
||||
3 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 052a099..dfe08e7 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -11,7 +11,7 @@
|
||||
@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
|
||||
@ stdcall BCryptDestroyHash(ptr)
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
-@ stub BCryptDestroySecret
|
||||
+@ stdcall BCryptDestroySecret(ptr)
|
||||
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long)
|
||||
@ stdcall BCryptDuplicateKey(ptr ptr ptr long long)
|
||||
@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@@ -44,7 +44,7 @@
|
||||
@ stdcall BCryptRemoveContextFunction(long wstr long wstr)
|
||||
@ stdcall BCryptRemoveContextFunctionProvider(long wstr long wstr wstr)
|
||||
@ stub BCryptResolveProviders
|
||||
-@ stub BCryptSecretAgreement
|
||||
+@ stdcall BCryptSecretAgreement(ptr ptr ptr long)
|
||||
@ stub BCryptSetAuditingInterface
|
||||
@ stub BCryptSetContextFunctionProperty
|
||||
@ stdcall BCryptSetProperty(ptr wstr ptr long long)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 80bd14b..36451c9 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1556,6 +1556,22 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle,
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE key, BCRYPT_SECRET_HANDLE *secret, ULONG flags)
|
||||
+{
|
||||
+ FIXME( "%p, %p, %p, %08x\n", handle, key, secret, flags );
|
||||
+
|
||||
+ if(secret)
|
||||
+ *secret = (BCRYPT_SECRET_HANDLE *)0xDEADFEED;
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
|
||||
+{
|
||||
+ FIXME( "%p\n", secret );
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index ba78c1d..866914c 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -211,6 +211,7 @@ typedef PVOID BCRYPT_ALG_HANDLE;
|
||||
typedef PVOID BCRYPT_KEY_HANDLE;
|
||||
typedef PVOID BCRYPT_HANDLE;
|
||||
typedef PVOID BCRYPT_HASH_HANDLE;
|
||||
+typedef PVOID BCRYPT_SECRET_HANDLE;
|
||||
|
||||
/* Flags for BCryptGenRandom */
|
||||
#define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001
|
||||
@@ -228,6 +229,7 @@ NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR,
|
||||
NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDuplicateHash(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG, ULONG *, BCRYPT_ALGORITHM_IDENTIFIER **, ULONG);
|
||||
@@ -242,6 +244,7 @@ NTSTATUS WINAPI BCryptHash(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, PUCH
|
||||
NTSTATUS WINAPI BCryptHashData(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptImportKeyPair(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, BCRYPT_KEY_HANDLE *, UCHAR *, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *, LPCWSTR, LPCWSTR, ULONG);
|
||||
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE, BCRYPT_SECRET_HANDLE *, ULONG);
|
||||
NTSTATUS WINAPI BCryptSetProperty(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptVerifySignature(BCRYPT_KEY_HANDLE, void *, UCHAR *, ULONG, UCHAR *, ULONG, ULONG);
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,78 +0,0 @@
|
||||
From 315b52406fbddcaf9289b2a47e8498fba49f8278 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 5 Feb 2019 10:09:59 +1100
|
||||
Subject: [PATCH] bcrypt: Add BCryptDeriveKey stub
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 7 +++++++
|
||||
include/bcrypt.h | 15 +++++++++++++++
|
||||
3 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index dfe08e7..4946ee5 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -7,7 +7,7 @@
|
||||
@ stdcall BCryptCreateHash(ptr ptr ptr long ptr long long)
|
||||
@ stdcall BCryptDecrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@ stub BCryptDeleteContext
|
||||
-@ stub BCryptDeriveKey
|
||||
+@ stdcall BCryptDeriveKey(ptr wstr ptr ptr long ptr long)
|
||||
@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
|
||||
@ stdcall BCryptDestroyHash(ptr)
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 36451c9..ca2f274 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1572,6 +1572,13 @@ NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE secret, LPCWSTR kdf, BCryptBufferDesc *parameter,
|
||||
+ PUCHAR derived, ULONG derived_size, ULONG *result, ULONG flags)
|
||||
+{
|
||||
+ FIXME( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
|
||||
+ return STATUS_INTERNAL_ERROR;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index 866914c..a5abf23 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -204,6 +204,20 @@ typedef struct _BCRYPT_KEY_DATA_BLOB_HEADER
|
||||
ULONG cbKeyData;
|
||||
} BCRYPT_KEY_DATA_BLOB_HEADER, *PBCRYPT_KEY_DATA_BLOB_HEADER;
|
||||
|
||||
+typedef struct _BCryptBuffer
|
||||
+{
|
||||
+ ULONG cbBuffer;
|
||||
+ ULONG BufferType;
|
||||
+ void *pvBuffer;
|
||||
+} BCryptBuffer, *PBCryptBuffer;
|
||||
+
|
||||
+typedef struct _BCryptBufferDesc
|
||||
+{
|
||||
+ ULONG ulVersion;
|
||||
+ ULONG cBuffers;
|
||||
+ PBCryptBuffer pBuffers;
|
||||
+} BCryptBufferDesc, *PBCryptBufferDesc;
|
||||
+
|
||||
#define BCRYPT_KEY_DATA_BLOB_MAGIC 0x4d42444b
|
||||
#define BCRYPT_KEY_DATA_BLOB_VERSION1 1
|
||||
|
||||
@@ -226,6 +240,7 @@ typedef PVOID BCRYPT_SECRET_HANDLE;
|
||||
NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE, ULONG);
|
||||
NTSTATUS WINAPI BCryptCreateHash(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE, LPCWSTR, BCryptBufferDesc*, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [46564] Add BCryptDestroySecret/BCryptSecretAgreement stubs.
|
@@ -0,0 +1,251 @@
|
||||
From ebbaf56bdb75f853dafdbbffba81233784ecb618 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Sat, 4 May 2019 18:21:05 +0800
|
||||
Subject: [PATCH 1/2] comctl32: Switch to using a structure for extra storage.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
These patches aim to fix the bug 47018.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/static.c | 92 ++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 76 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
|
||||
index 5cc02ced97..d08710c06f 100644
|
||||
--- a/dlls/comctl32/static.c
|
||||
+++ b/dlls/comctl32/static.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "winuser.h"
|
||||
#include "commctrl.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "comctl32.h"
|
||||
@@ -50,10 +51,16 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
|
||||
-/* offsets for GetWindowLong for static private information */
|
||||
-#define HFONT_GWL_OFFSET 0
|
||||
-#define HICON_GWL_OFFSET (sizeof(HFONT))
|
||||
-#define STATIC_EXTRA_BYTES (HICON_GWL_OFFSET + sizeof(HICON))
|
||||
+struct static_extra_info
|
||||
+{
|
||||
+ HFONT hfont;
|
||||
+ union
|
||||
+ {
|
||||
+ HICON hicon;
|
||||
+ HBITMAP hbitmap;
|
||||
+ HENHMETAFILE hemf;
|
||||
+ } image;
|
||||
+};
|
||||
|
||||
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
|
||||
|
||||
@@ -80,6 +87,18 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] =
|
||||
STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */
|
||||
};
|
||||
|
||||
+static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force )
|
||||
+{
|
||||
+ struct static_extra_info *extra = (struct static_extra_info *)GetWindowLongPtrW( hwnd, 0 );
|
||||
+ if (!extra && force)
|
||||
+ {
|
||||
+ extra = heap_alloc_zero( sizeof(*extra) );
|
||||
+ if (extra)
|
||||
+ SetWindowLongPtrW( hwnd, 0, (ULONG_PTR)extra );
|
||||
+ }
|
||||
+ return extra;
|
||||
+}
|
||||
+
|
||||
static BOOL get_icon_size( HICON handle, SIZE *size )
|
||||
{
|
||||
ICONINFO info;
|
||||
@@ -111,6 +130,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
{
|
||||
HICON prevIcon;
|
||||
SIZE size;
|
||||
+ struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_ICON) return 0;
|
||||
if (hicon && !get_icon_size( hicon, &size ))
|
||||
@@ -118,7 +138,12 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
WARN("hicon != 0, but invalid\n");
|
||||
return 0;
|
||||
}
|
||||
- prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ prevIcon = extra->image.hicon;
|
||||
+ extra->image.hicon = hicon;
|
||||
if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
/* Windows currently doesn't implement SS_RIGHTJUST */
|
||||
@@ -146,6 +171,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
{
|
||||
HBITMAP hOldBitmap;
|
||||
+ struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
|
||||
if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP)
|
||||
@@ -153,7 +179,12 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
WARN("hBitmap != 0, but it's not a bitmap\n");
|
||||
return 0;
|
||||
}
|
||||
- hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ hOldBitmap = extra->image.hbitmap;
|
||||
+ extra->image.hbitmap = hBitmap;
|
||||
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
BITMAP bm;
|
||||
@@ -183,13 +214,23 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
*/
|
||||
static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style )
|
||||
{
|
||||
+ HENHMETAFILE old_hemf;
|
||||
+ struct static_extra_info *extra;
|
||||
+
|
||||
if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0;
|
||||
if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE)
|
||||
{
|
||||
WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n");
|
||||
return 0;
|
||||
}
|
||||
- return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ old_hemf = extra->image.hemf;
|
||||
+ extra->image.hemf = hEnhMetaFile;
|
||||
+
|
||||
+ return old_hemf;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -200,6 +241,8 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile,
|
||||
*/
|
||||
static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
|
||||
{
|
||||
+ struct static_extra_info *extra;
|
||||
+
|
||||
switch (style & SS_TYPEMASK)
|
||||
{
|
||||
case SS_ICON:
|
||||
@@ -215,7 +258,22 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
- return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ return extra ? extra->image.hbitmap : 0;
|
||||
+}
|
||||
+
|
||||
+static void STATIC_SetFont( HWND hwnd, HFONT hfont )
|
||||
+{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (extra)
|
||||
+ extra->hfont = hfont;
|
||||
+}
|
||||
+
|
||||
+static HFONT STATIC_GetFont( HWND hwnd )
|
||||
+{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ return extra ? extra->hfont : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -327,6 +385,8 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_NCDESTROY:
|
||||
if (style == SS_ICON)
|
||||
{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ heap_free( extra );
|
||||
/*
|
||||
* FIXME
|
||||
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
|
||||
@@ -423,14 +483,14 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_SETFONT:
|
||||
if (hasTextStyle( full_style ))
|
||||
{
|
||||
- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
|
||||
+ STATIC_SetFont( hwnd, (HFONT)wParam );
|
||||
if (LOWORD(lParam))
|
||||
RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_GETFONT:
|
||||
- return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||
+ return (LRESULT)STATIC_GetFont( hwnd );
|
||||
|
||||
case WM_NCHITTEST:
|
||||
if (full_style & SS_NOTIFY)
|
||||
@@ -508,7 +568,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
dis.itemData = 0;
|
||||
GetClientRect( hwnd, &dis.rcItem );
|
||||
|
||||
- font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||
+ font = STATIC_GetFont( hwnd );
|
||||
if (font) oldFont = SelectObject( hdc, font );
|
||||
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
|
||||
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
|
||||
@@ -572,7 +632,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
format |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
|
||||
}
|
||||
|
||||
- if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
|
||||
+ if ((hFont = STATIC_GetFont( hwnd )))
|
||||
hOldFont = SelectObject( hdc, hFont );
|
||||
|
||||
/* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned
|
||||
@@ -668,7 +728,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
|
||||
GetClientRect( hwnd, &rc );
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
- hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
|
||||
+ hIcon = STATIC_GetImage( hwnd, IMAGE_ICON, style );
|
||||
if (!hIcon || !get_icon_size( hIcon, &size ))
|
||||
{
|
||||
FillRect(hdc, &rc, hbrush);
|
||||
@@ -698,7 +758,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
|
||||
- if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))
|
||||
+ if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style ))
|
||||
&& (GetObjectType(hBitmap) == OBJ_BITMAP)
|
||||
&& (hMemDC = CreateCompatibleDC( hdc )))
|
||||
{
|
||||
@@ -742,7 +802,7 @@ static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style )
|
||||
GetClientRect(hwnd, &rc);
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
FillRect(hdc, &rc, hbrush);
|
||||
- if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
|
||||
+ if ((hEnhMetaFile = STATIC_GetImage( hwnd, IMAGE_ENHMETAFILE, style )))
|
||||
{
|
||||
/* The control's current font is not selected into the
|
||||
device context! */
|
||||
@@ -779,7 +839,7 @@ void STATIC_Register(void)
|
||||
wndClass.style = CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = STATIC_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
- wndClass.cbWndExtra = STATIC_EXTRA_BYTES;
|
||||
+ wndClass.cbWndExtra = sizeof(struct static_extra_info *);
|
||||
wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = NULL;
|
||||
wndClass.lpszClassName = WC_STATICW;
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -0,0 +1,152 @@
|
||||
From 334262255a66b05a852c90ebc722815b8a0eb7e9 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Sat, 4 May 2019 19:46:35 +0800
|
||||
Subject: [PATCH 2/2] comctl32: Paint 32-bpp bitmaps with an alpha channel
|
||||
using GdiAlphaBlend.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/static.c | 83 ++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 79 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
|
||||
index d08710c06f..fe566645d3 100644
|
||||
--- a/dlls/comctl32/static.c
|
||||
+++ b/dlls/comctl32/static.c
|
||||
@@ -60,6 +60,7 @@ struct static_extra_info
|
||||
HBITMAP hbitmap;
|
||||
HENHMETAFILE hemf;
|
||||
} image;
|
||||
+ BOOL image_has_alpha;
|
||||
};
|
||||
|
||||
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
|
||||
@@ -163,6 +164,56 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
return prevIcon;
|
||||
}
|
||||
|
||||
+static HBITMAP create_alpha_bitmap( HBITMAP hbitmap )
|
||||
+{
|
||||
+ HBITMAP alpha = 0;
|
||||
+ BITMAPINFO *info = NULL;
|
||||
+ BITMAP bm;
|
||||
+ HDC src, dst;
|
||||
+ void *bits;
|
||||
+ DWORD i;
|
||||
+ const unsigned char *ptr;
|
||||
+ BOOL has_alpha = FALSE;
|
||||
+
|
||||
+ if (!GetObjectW( hbitmap, sizeof(bm), &bm )) return 0;
|
||||
+ if (bm.bmBitsPixel != 32) return 0;
|
||||
+
|
||||
+ if (!(src = CreateCompatibleDC( 0 ))) return 0;
|
||||
+ if (!(dst = CreateCompatibleDC( src ))) goto done;
|
||||
+ if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done;
|
||||
+ info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
+ info->bmiHeader.biWidth = bm.bmWidth;
|
||||
+ info->bmiHeader.biHeight = -bm.bmHeight;
|
||||
+ info->bmiHeader.biPlanes = 1;
|
||||
+ info->bmiHeader.biBitCount = 32;
|
||||
+ info->bmiHeader.biCompression = BI_RGB;
|
||||
+ info->bmiHeader.biSizeImage = bm.bmWidth * bm.bmHeight * 4;
|
||||
+ info->bmiHeader.biXPelsPerMeter = 0;
|
||||
+ info->bmiHeader.biYPelsPerMeter = 0;
|
||||
+ info->bmiHeader.biClrUsed = 0;
|
||||
+ info->bmiHeader.biClrImportant = 0;
|
||||
+ if (!(alpha = CreateDIBSection( dst, info, DIB_RGB_COLORS, &bits, NULL, 0 ))) goto done;
|
||||
+
|
||||
+ SelectObject( src, hbitmap );
|
||||
+ SelectObject( dst, alpha );
|
||||
+ BitBlt(dst, 0, 0, bm.bmWidth, bm.bmHeight, src, 0, 0, SRCCOPY);
|
||||
+
|
||||
+ for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4)
|
||||
+ if ((has_alpha = (ptr[3] != 0))) break;
|
||||
+
|
||||
+done:
|
||||
+ DeleteDC( src );
|
||||
+ DeleteDC( dst );
|
||||
+ HeapFree( GetProcessHeap(), 0, info );
|
||||
+
|
||||
+ if (!has_alpha)
|
||||
+ {
|
||||
+ DeleteObject( alpha );
|
||||
+ alpha = 0;
|
||||
+ }
|
||||
+ return alpha;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* STATIC_SetBitmap
|
||||
*
|
||||
@@ -170,7 +221,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
*/
|
||||
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
{
|
||||
- HBITMAP hOldBitmap;
|
||||
+ HBITMAP hOldBitmap, alpha;
|
||||
struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
|
||||
@@ -184,7 +235,18 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
if (!extra) return 0;
|
||||
|
||||
hOldBitmap = extra->image.hbitmap;
|
||||
- extra->image.hbitmap = hBitmap;
|
||||
+ alpha = create_alpha_bitmap( hBitmap );
|
||||
+ if (alpha)
|
||||
+ {
|
||||
+ extra->image.hbitmap = alpha;
|
||||
+ extra->image_has_alpha = TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ extra->image.hbitmap = hBitmap;
|
||||
+ extra->image_has_alpha = FALSE;
|
||||
+ }
|
||||
+
|
||||
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
BITMAP bm;
|
||||
@@ -386,7 +448,12 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
if (style == SS_ICON)
|
||||
{
|
||||
struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
- heap_free( extra );
|
||||
+ if (extra)
|
||||
+ {
|
||||
+ if (extra->image_has_alpha)
|
||||
+ DeleteObject( extra->image.hbitmap );
|
||||
+ heap_free( extra );
|
||||
+ }
|
||||
/*
|
||||
* FIXME
|
||||
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
|
||||
@@ -765,6 +832,8 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
BITMAP bm;
|
||||
RECT rcClient;
|
||||
LOGBRUSH brush;
|
||||
+ BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
|
||||
GetObjectW(hBitmap, sizeof(bm), &bm);
|
||||
oldbitmap = SelectObject(hMemDC, hBitmap);
|
||||
@@ -785,7 +854,13 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
rcClient.right = rcClient.left + bm.bmWidth;
|
||||
rcClient.bottom = rcClient.top + bm.bmHeight;
|
||||
}
|
||||
- StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
|
||||
+
|
||||
+ if (extra->image_has_alpha)
|
||||
+ GdiAlphaBlend(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
|
||||
+ rcClient.bottom - rcClient.top, hMemDC,
|
||||
+ 0, 0, bm.bmWidth, bm.bmHeight, blend);
|
||||
+ else
|
||||
+ StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
|
||||
rcClient.bottom - rcClient.top, hMemDC,
|
||||
0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
|
||||
SelectObject(hMemDC, oldbitmap);
|
||||
--
|
||||
2.20.1
|
||||
|
1
patches/comctl32-alpha-bitmaps/definition
Normal file
1
patches/comctl32-alpha-bitmaps/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [47018] Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend
|
@@ -1,4 +1,4 @@
|
||||
From fb8bd7d53bea2e6deb38994741d884eb10bc31ad Mon Sep 17 00:00:00 2001
|
||||
From 27517cacf7df657e32e7ca7068c3e86723cb4a3c Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:29:37 +0100
|
||||
Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
@@ -6,11 +6,11 @@ Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
Changes in v2 (by Christian Costa):
|
||||
* More generic code for D3DXDisassembleShader.
|
||||
---
|
||||
dlls/d3dx9_36/shader.c | 330 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 328 insertions(+), 2 deletions(-)
|
||||
dlls/d3dx9_36/shader.c | 331 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 328 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index f372494..01ed335 100644
|
||||
index c59fc791e..79d47b95c 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -21,15 +21,16 @@ index f372494..01ed335 100644
|
||||
* Copyright 2011 Travis Athougies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -20,6 +21,7 @@
|
||||
@@ -18,7 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
-
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "d3dx9_private.h"
|
||||
#include "d3dcommon.h"
|
||||
@@ -2144,10 +2146,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
#include "d3dcompiler.h"
|
||||
@@ -2138,10 +2139,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -367,5 +368,5 @@ index f372494..01ed335 100644
|
||||
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
1.9.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1c46cc796a20b263f708aebf5428e59408fea200 Mon Sep 17 00:00:00 2001
|
||||
From 4595b49c9c878e8a86fcd22dc82a9f5cfadfc7a8 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 30 Mar 2018 08:22:02 +0000
|
||||
Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
@@ -17,8 +17,8 @@ Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
dlls/d3dx9_34/Makefile.in | 2 +-
|
||||
dlls/d3dx9_35/Makefile.in | 2 +-
|
||||
dlls/d3dx9_36/Makefile.in | 2 +-
|
||||
dlls/d3dx9_36/surface.c | 102 ++++++++++++++++++++++++++++++++++++++----
|
||||
dlls/d3dx9_36/tests/surface.c | 8 ++--
|
||||
dlls/d3dx9_36/surface.c | 102 +++++++++++++++++++++++++++++++---
|
||||
dlls/d3dx9_36/tests/surface.c | 8 +--
|
||||
dlls/d3dx9_37/Makefile.in | 2 +-
|
||||
dlls/d3dx9_38/Makefile.in | 2 +-
|
||||
dlls/d3dx9_39/Makefile.in | 2 +-
|
||||
@@ -29,7 +29,7 @@ Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
22 files changed, 118 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
|
||||
index 02e64d3..0484639 100644
|
||||
index 99db5f355..0c3fb8a90 100644
|
||||
--- a/dlls/d3dx9_24/Makefile.in
|
||||
+++ b/dlls/d3dx9_24/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -41,7 +41,7 @@ index 02e64d3..0484639 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
|
||||
index 57ed1da..3461967 100644
|
||||
index 9e54aba2c..4419b18b8 100644
|
||||
--- a/dlls/d3dx9_25/Makefile.in
|
||||
+++ b/dlls/d3dx9_25/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -53,7 +53,7 @@ index 57ed1da..3461967 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
|
||||
index 04d9ba4..291daf3 100644
|
||||
index 104f7c19b..cfc9711ef 100644
|
||||
--- a/dlls/d3dx9_26/Makefile.in
|
||||
+++ b/dlls/d3dx9_26/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -65,7 +65,7 @@ index 04d9ba4..291daf3 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
|
||||
index faec9b2..5a52b60 100644
|
||||
index db04c8310..d598c9bbf 100644
|
||||
--- a/dlls/d3dx9_27/Makefile.in
|
||||
+++ b/dlls/d3dx9_27/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -77,7 +77,7 @@ index faec9b2..5a52b60 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
|
||||
index b8aad93..8eecbc0 100644
|
||||
index 8a2b9c690..8e9979092 100644
|
||||
--- a/dlls/d3dx9_28/Makefile.in
|
||||
+++ b/dlls/d3dx9_28/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -89,7 +89,7 @@ index b8aad93..8eecbc0 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
|
||||
index 29c76c4..0299369 100644
|
||||
index 6e1f45c02..efe538fde 100644
|
||||
--- a/dlls/d3dx9_29/Makefile.in
|
||||
+++ b/dlls/d3dx9_29/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -101,7 +101,7 @@ index 29c76c4..0299369 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
|
||||
index 810edc9..7bdc074 100644
|
||||
index 092a6b154..4a1ee6304 100644
|
||||
--- a/dlls/d3dx9_30/Makefile.in
|
||||
+++ b/dlls/d3dx9_30/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -113,7 +113,7 @@ index 810edc9..7bdc074 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
|
||||
index fce2b53..0ef9c91 100644
|
||||
index 48c67e6e0..dcbb7a01b 100644
|
||||
--- a/dlls/d3dx9_31/Makefile.in
|
||||
+++ b/dlls/d3dx9_31/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -125,7 +125,7 @@ index fce2b53..0ef9c91 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
|
||||
index ad53b26..25e2a1c 100644
|
||||
index d51d6a0db..fb89ea7c2 100644
|
||||
--- a/dlls/d3dx9_32/Makefile.in
|
||||
+++ b/dlls/d3dx9_32/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -137,7 +137,7 @@ index ad53b26..25e2a1c 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
|
||||
index 318ddce..a6ec6db 100644
|
||||
index 52cdde13a..487255e43 100644
|
||||
--- a/dlls/d3dx9_33/Makefile.in
|
||||
+++ b/dlls/d3dx9_33/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -149,7 +149,7 @@ index 318ddce..a6ec6db 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
|
||||
index 451a371..ff79b58 100644
|
||||
index 37f431228..9b0b500f7 100644
|
||||
--- a/dlls/d3dx9_34/Makefile.in
|
||||
+++ b/dlls/d3dx9_34/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -161,7 +161,7 @@ index 451a371..ff79b58 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
|
||||
index 978d0b0..aa8ea65 100644
|
||||
index 4441b5f6e..ac4291359 100644
|
||||
--- a/dlls/d3dx9_35/Makefile.in
|
||||
+++ b/dlls/d3dx9_35/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -173,7 +173,7 @@ index 978d0b0..aa8ea65 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
|
||||
index 847edec..1427571 100644
|
||||
index 5e76ab7f5..c95dc0707 100644
|
||||
--- a/dlls/d3dx9_36/Makefile.in
|
||||
+++ b/dlls/d3dx9_36/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
@@ -184,12 +184,12 @@ index 847edec..1427571 100644
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
C_SRCS = \
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index d236feb..3c308d3 100644
|
||||
index 57d9818cd..f05bad5ab 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -27,6 +27,8 @@
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ole2.h"
|
||||
#include "wincodec.h"
|
||||
|
||||
@@ -198,12 +198,12 @@ index d236feb..3c308d3 100644
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
|
||||
@@ -1876,6 +1878,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
@@ -1772,6 +1774,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
}
|
||||
}
|
||||
|
||||
+typedef BOOL (*dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
|
||||
+typedef BOOL (__cdecl *dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
|
||||
+
|
||||
+static dxtn_conversion_func get_dxtn_conversion_func(D3DFORMAT format, BOOL encode)
|
||||
+{
|
||||
@@ -223,7 +223,7 @@ index d236feb..3c308d3 100644
|
||||
/************************************************************
|
||||
* D3DXLoadSurfaceFromMemory
|
||||
*
|
||||
@@ -1915,10 +1935,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1811,10 +1831,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
{
|
||||
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
|
||||
IDirect3DSurface9 *surface;
|
||||
@@ -237,7 +237,7 @@ index d236feb..3c308d3 100644
|
||||
|
||||
TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n",
|
||||
dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format,
|
||||
@@ -1999,18 +2021,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1895,18 +1917,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
}
|
||||
else /* Stretching or format conversion. */
|
||||
{
|
||||
@@ -307,7 +307,7 @@ index d236feb..3c308d3 100644
|
||||
}
|
||||
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
|
||||
{
|
||||
@@ -2019,12 +2088,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1915,12 +1984,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
|
||||
/* Always apply a point filter until D3DX_FILTER_LINEAR,
|
||||
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
|
||||
@@ -341,10 +341,10 @@ index d236feb..3c308d3 100644
|
||||
|
||||
/************************************************************
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 2c83dc2..95b64a0 100644
|
||||
index 56b79d80c..8614cec4c 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -1224,7 +1224,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1225,7 +1225,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -353,7 +353,7 @@ index 2c83dc2..95b64a0 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1250,7 +1250,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1251,7 +1251,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -362,7 +362,7 @@ index 2c83dc2..95b64a0 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1263,10 +1263,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1264,10 +1264,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
@@ -376,7 +376,7 @@ index 2c83dc2..95b64a0 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
|
||||
index a05068c..e5b29d3 100644
|
||||
index ea0a04807..a710cef03 100644
|
||||
--- a/dlls/d3dx9_37/Makefile.in
|
||||
+++ b/dlls/d3dx9_37/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -388,7 +388,7 @@ index a05068c..e5b29d3 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
|
||||
index b092e62..0a37204 100644
|
||||
index af62f823d..543a482af 100644
|
||||
--- a/dlls/d3dx9_38/Makefile.in
|
||||
+++ b/dlls/d3dx9_38/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -400,7 +400,7 @@ index b092e62..0a37204 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
|
||||
index 4d17120..d0e2cc9 100644
|
||||
index ab71712d4..cacb0c00d 100644
|
||||
--- a/dlls/d3dx9_39/Makefile.in
|
||||
+++ b/dlls/d3dx9_39/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -412,7 +412,7 @@ index 4d17120..d0e2cc9 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
|
||||
index 59f6f3d..0a0d36b 100644
|
||||
index 76428d2fd..a58a99ef2 100644
|
||||
--- a/dlls/d3dx9_40/Makefile.in
|
||||
+++ b/dlls/d3dx9_40/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -424,7 +424,7 @@ index 59f6f3d..0a0d36b 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
|
||||
index f18443a..f477a20 100644
|
||||
index d3647f895..93fb6b508 100644
|
||||
--- a/dlls/d3dx9_41/Makefile.in
|
||||
+++ b/dlls/d3dx9_41/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -436,7 +436,7 @@ index f18443a..f477a20 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
|
||||
index cb142b7..4d93a84 100644
|
||||
index 88bd746da..197d0d45b 100644
|
||||
--- a/dlls/d3dx9_42/Makefile.in
|
||||
+++ b/dlls/d3dx9_42/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -448,7 +448,7 @@ index cb142b7..4d93a84 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
|
||||
index 3e6111a..5812d03 100644
|
||||
index 2f6b8634a..17895954a 100644
|
||||
--- a/dlls/d3dx9_43/Makefile.in
|
||||
+++ b/dlls/d3dx9_43/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -460,5 +460,5 @@ index 3e6111a..5812d03 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -3,3 +3,7 @@ Fixes: [33768] Fix texture corruption in CSI: Fatal Conspiracy
|
||||
Fixes: [37391] Exception during start of fr-043 caused by missing DXTn support
|
||||
Fixes: [34692] Fix wrong colors in Wolfenstein (2009)
|
||||
Fixes: [24983] Fix crash in Space Rangers2 caused by missing DXTn support
|
||||
# 9fb5745a7997bbfe033779650f1193d85369cef2 broke this, in a way that's not
|
||||
# trivial to fix. Guess we'll wait to see what Alexandre has in mind for the
|
||||
# other D3D DLLs.
|
||||
Disabled: true
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From f466d59e3eca3c1fd120203d01a746761f301207 Mon Sep 17 00:00:00 2001
|
||||
From e920f461eaf4c5d19c0cfc8e9c9a40671269dd93 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 6 Oct 2014 05:06:06 +0200
|
||||
Subject: dbghelp: Always check for debug symbols in BINDIR.
|
||||
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
|
||||
|
||||
---
|
||||
dlls/dbghelp/Makefile.in | 2 +-
|
||||
@@ -9,7 +9,7 @@ Subject: dbghelp: Always check for debug symbols in BINDIR.
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
|
||||
index 3e120e8afe9..6746ca7dbd9 100644
|
||||
index f08464cd422..aa7a767110b 100644
|
||||
--- a/dlls/dbghelp/Makefile.in
|
||||
+++ b/dlls/dbghelp/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -18,13 +18,13 @@ index 3e120e8afe9..6746ca7dbd9 100644
|
||||
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
|
||||
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="\"${bindir}\""
|
||||
DELAYIMPORTS = version
|
||||
EXTRAINCL = $(Z_CFLAGS)
|
||||
EXTRALIBS = $(Z_LIBS) $(CORESERVICES_LIBS) $(COREFOUNDATION_LIBS)
|
||||
|
||||
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
|
||||
index 6428955941c..75c0a4c2453 100644
|
||||
index 96b16fd5c0c..611533ee098 100644
|
||||
--- a/dlls/dbghelp/elf_module.c
|
||||
+++ b/dlls/dbghelp/elf_module.c
|
||||
@@ -1486,9 +1486,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
@@ -1644,9 +1644,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
if (!ret && !strchrW(filename, '/'))
|
||||
{
|
||||
ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
|
||||
@@ -40,5 +40,5 @@ index 6428955941c..75c0a4c2453 100644
|
||||
load_offset, dyn_addr, elf_info);
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 022f6d01b0f3dc9a30aa12b34f85881c0a1dafc6 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 7 Mar 2016 08:40:24 +0100
|
||||
Subject: ddraw/tests: Fix function name in multiple ok() messages. (resend)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Spotted by Michael Müller.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/ddraw/tests/dsurface.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c
|
||||
index 781fa56..c43d207 100644
|
||||
--- a/dlls/ddraw/tests/dsurface.c
|
||||
+++ b/dlls/ddraw/tests/dsurface.c
|
||||
@@ -3238,7 +3238,7 @@ static void zbufferbitdepth_test(void)
|
||||
U3(ddsd.ddpfPixelFormat).dwZBitMask = 0x0000ffff;
|
||||
surface = NULL;
|
||||
hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL);
|
||||
- ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr);
|
||||
+ ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed, hr %#x.\n", hr);
|
||||
reset_ddsd(&ddsd);
|
||||
hr = IDirectDrawSurface_GetSurfaceDesc(surface, &ddsd);
|
||||
ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr);
|
||||
@@ -3313,7 +3313,7 @@ static void test_ddsd(DDSURFACEDESC *ddsd, BOOL expect_pf, BOOL expect_zd, const
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IDirectDrawSurface_Unlock(surface, NULL);
|
||||
- ok(SUCCEEDED(hr), "IDirectDrawSurface_GetSurfaceDesc failed, hr %#x.\n", hr);
|
||||
+ ok(SUCCEEDED(hr), "IDirectDrawSurface_Unlock failed, hr %#x.\n", hr);
|
||||
|
||||
/* DDSD_ZBUFFERBITDEPTH is never set on Nvidia, but follows GetSurfaceDesc rules on AMD */
|
||||
if (!expect_zd)
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -0,0 +1,73 @@
|
||||
From 87860f6a1666321684e9dd5e7553a40e1656a9b4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 24 May 2019 16:16:13 +1000
|
||||
Subject: [PATCH] dinput: Allow mapping of controls based of Genre type.
|
||||
|
||||
---
|
||||
dlls/dinput/device.c | 41 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 40 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index 0c9432698ae..00b97bd24bd 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -893,8 +893,15 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
|
||||
/* Count the actions */
|
||||
for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
- if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance))
|
||||
+ {
|
||||
+ if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance) ||
|
||||
+ (IsEqualGUID(&IID_NULL, &lpdiaf->rgoAction[i].guidInstance) &&
|
||||
+ ((lpdiaf->rgoAction[i].dwSemantic & lpdiaf->dwGenre) == lpdiaf->dwGenre ||
|
||||
+ (lpdiaf->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
|
||||
+ {
|
||||
num_actions++;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Should return DI_NOEFFECT if we dont have any actions and actionformat has not changed */
|
||||
if (num_actions == 0 && lpdiaf->dwCRC == new_crc && !(dwFlags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
|
||||
@@ -934,7 +941,39 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
|
||||
action++;
|
||||
}
|
||||
+ else if ((lpdiaf->rgoAction[i].dwSemantic & lpdiaf->dwGenre) == lpdiaf->dwGenre ||
|
||||
+ (lpdiaf->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
|
||||
+ {
|
||||
+ DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
|
||||
+ DWORD type = DIDFT_GETTYPE(obj_id);
|
||||
+ DWORD inst = DIDFT_GETINSTANCE(obj_id);
|
||||
+ LPDIOBJECTDATAFORMAT obj;
|
||||
+
|
||||
+ if (type == DIDFT_PSHBUTTON) type = DIDFT_BUTTON;
|
||||
+ else if (type == DIDFT_RELAXIS) type = DIDFT_AXIS;
|
||||
+
|
||||
+ obj = dataformat_to_odf_by_type(df, inst, type);
|
||||
+ TRACE("obj %p, inst 0x%08x, type 0x%08x\n", obj, inst, type);
|
||||
+ if(obj)
|
||||
+ {
|
||||
+ memcpy(&obj_df[action], obj, df->dwObjSize);
|
||||
+
|
||||
+ This->action_map[action].uAppData = lpdiaf->rgoAction[i].uAppData;
|
||||
+ This->action_map[action].offset = offset;
|
||||
+ obj_df[action].dwOfs = offset;
|
||||
+ offset += (type & DIDFT_BUTTON) ? 1 : 4;
|
||||
+
|
||||
+ action++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (action == 0)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, obj_df);
|
||||
+ return DI_NOEFFECT;
|
||||
}
|
||||
+ data_format.dwNumObjs = action;
|
||||
|
||||
IDirectInputDevice8_SetDataFormat(iface, &data_format);
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From a4cf8d9241b8dd94937408c9a1d20aacfb9dd2e3 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 28 May 2019 14:37:25 +1000
|
||||
Subject: [PATCH 2/2] dinput: Improved tracing of Semantic value.
|
||||
|
||||
---
|
||||
dlls/dinput/dinput_main.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
|
||||
index cf050cb71ed..79ef9620de9 100644
|
||||
--- a/dlls/dinput/dinput_main.c
|
||||
+++ b/dlls/dinput/dinput_main.c
|
||||
@@ -290,6 +290,20 @@ static void _dump_EnumDevices_dwFlags(DWORD dwFlags)
|
||||
TRACE("\n");
|
||||
}
|
||||
|
||||
+static char *dump_semantic(DWORD semantic)
|
||||
+{
|
||||
+ if((semantic & 0xff000000) == 0xff000000)
|
||||
+ return "Any AXIS";
|
||||
+ else if((semantic & 0x82000000) == 0x82000000)
|
||||
+ return "Mouse";
|
||||
+ else if((semantic & 0x81000000) == 0x81000000)
|
||||
+ return "Keybaord";
|
||||
+ else if((semantic & DIVIRTUAL_FLYING_HELICOPTER) == DIVIRTUAL_FLYING_HELICOPTER)
|
||||
+ return "Helicopter";
|
||||
+
|
||||
+ return "Unknown";
|
||||
+}
|
||||
+
|
||||
static void _dump_diactionformatA(LPDIACTIONFORMATA lpdiActionFormat)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -312,7 +326,7 @@ static void _dump_diactionformatA(LPDIACTIONFORMATA lpdiActionFormat)
|
||||
{
|
||||
TRACE("diaf.rgoAction[%u]:\n", i);
|
||||
TRACE("\tuAppData=0x%lx\n", lpdiActionFormat->rgoAction[i].uAppData);
|
||||
- TRACE("\tdwSemantic=0x%08x\n", lpdiActionFormat->rgoAction[i].dwSemantic);
|
||||
+ TRACE("\tdwSemantic=0x%08x (%s)\n", lpdiActionFormat->rgoAction[i].dwSemantic, dump_semantic(lpdiActionFormat->rgoAction[i].dwSemantic));
|
||||
TRACE("\tdwFlags=0x%x\n", lpdiActionFormat->rgoAction[i].dwFlags);
|
||||
TRACE("\tszActionName=%s\n", debugstr_a(lpdiActionFormat->rgoAction[i].u.lptszActionName));
|
||||
TRACE("\tguidInstance=%s\n", debugstr_guid(&lpdiActionFormat->rgoAction[i].guidInstance));
|
||||
--
|
||||
2.20.1
|
||||
|
2
patches/dinput-SetActionMap-genre/definition
Normal file
2
patches/dinput-SetActionMap-genre/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
|
||||
Depends: dinput-joy-mappings
|
@@ -1,19 +1,19 @@
|
||||
From b5311918d5fbdc15b3321fed444daa0d0c8507de Mon Sep 17 00:00:00 2001
|
||||
From 24829b2ba6d5efd950f178b8282dda826c4d1df0 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 ++++++++++++++++++++++++++-----------------------
|
||||
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
|
||||
index 433348cd04..c150528e3d 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;
|
||||
@@ -312,6 +312,76 @@ BOOL is_xinput_device(const DIDEVCAPS *devcaps, WORD vid, WORD pid)
|
||||
return (devcaps->dwAxes == 6 && devcaps->dwButtons >= 14);
|
||||
}
|
||||
|
||||
+static void remap_init(JoystickGenericImpl *This, int obj, ObjProps *remap_props)
|
||||
@@ -89,7 +89,7 @@ index 0ec1ceb..fd3d44d 100644
|
||||
/******************************************************************************
|
||||
* SetProperty : change input device properties
|
||||
*/
|
||||
@@ -278,7 +348,6 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
|
||||
@@ -319,7 +389,6 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
|
||||
{
|
||||
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
|
||||
DWORD i;
|
||||
@@ -97,7 +97,7 @@ index 0ec1ceb..fd3d44d 100644
|
||||
|
||||
TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
|
||||
|
||||
@@ -295,69 +364,15 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
|
||||
@@ -336,69 +405,15 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
|
||||
case (DWORD_PTR)DIPROP_RANGE: {
|
||||
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
|
||||
if (ph->dwHow == DIPH_DEVICE) {
|
||||
@@ -171,7 +171,7 @@ index 0ec1ceb..fd3d44d 100644
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -366,15 +381,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
|
||||
@@ -407,15 +422,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++)
|
||||
@@ -190,7 +190,7 @@ index 0ec1ceb..fd3d44d 100644
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -383,15 +396,13 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF
|
||||
@@ -424,15 +437,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++)
|
||||
@@ -210,5 +210,5 @@ index 0ec1ceb..fd3d44d 100644
|
||||
break;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,103 +0,0 @@
|
||||
From 4ec91bab963a508a30bc1a77b785a5014d6bf264 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 1 May 2019 12:22:14 +1000
|
||||
Subject: [PATCH 1/7] dinput: Allow Enumeration of joysticks with DirectX 3.
|
||||
|
||||
Star Wars: Rogue 3D requests a DirectX 3.0 version
|
||||
0108:trace:dinput:DirectInputCreateEx (0x400000,0300,{9a4cb684-236d-11d3-8e9d-00c04f6844ae},0x7acfa0,(nil))
|
||||
and then tries to interate over all Joysticks.
|
||||
|
||||
The current tests show that this is the correct behaviour,
|
||||
However,
|
||||
On windows (Steam version of above) uses a shim to allow joystick support.
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dinput/joystick_linux.c | 4 ++--
|
||||
dlls/dinput/joystick_linuxinput.c | 4 ++--
|
||||
dlls/dinput/joystick_osx.c | 4 ++--
|
||||
dlls/dinput/tests/joystick.c | 2 +-
|
||||
4 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
|
||||
index d661a14..22f7d3b 100644
|
||||
--- a/dlls/dinput/joystick_linux.c
|
||||
+++ b/dlls/dinput/joystick_linux.c
|
||||
@@ -377,7 +377,7 @@ static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS
|
||||
}
|
||||
|
||||
if ((dwDevType == 0) ||
|
||||
- ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) ||
|
||||
+ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version >= 0x0300 && version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) {
|
||||
/* check whether we have a joystick */
|
||||
if ((fd = open(joystick_devices[id].device, O_RDONLY)) == -1)
|
||||
@@ -406,7 +406,7 @@ static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS
|
||||
}
|
||||
|
||||
if ((dwDevType == 0) ||
|
||||
- ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) ||
|
||||
+ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version >= 0x0300 && version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) {
|
||||
/* check whether we have a joystick */
|
||||
if ((fd = open(joystick_devices[id].device, O_RDONLY)) == -1)
|
||||
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
|
||||
index 3580505..fb6b305 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -412,7 +412,7 @@ static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS
|
||||
}
|
||||
|
||||
if (!((dwDevType == 0) ||
|
||||
- ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) ||
|
||||
+ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version >= 0x0300 && version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))))
|
||||
return S_FALSE;
|
||||
|
||||
@@ -437,7 +437,7 @@ static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS
|
||||
}
|
||||
|
||||
if (!((dwDevType == 0) ||
|
||||
- ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) ||
|
||||
+ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version >= 0x0300 && version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))))
|
||||
return S_FALSE;
|
||||
|
||||
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
|
||||
index 4259d1a..3b7a7f0 100644
|
||||
--- a/dlls/dinput/joystick_osx.c
|
||||
+++ b/dlls/dinput/joystick_osx.c
|
||||
@@ -955,7 +955,7 @@ static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS
|
||||
device = get_device_ref(id);
|
||||
|
||||
if ((dwDevType == 0) ||
|
||||
- ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) ||
|
||||
+ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version >= 0x0300 && version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))
|
||||
{
|
||||
if (dwFlags & DIEDFL_FORCEFEEDBACK) {
|
||||
@@ -1002,7 +1002,7 @@ static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINS
|
||||
device = get_device_ref(id);
|
||||
|
||||
if ((dwDevType == 0) ||
|
||||
- ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) ||
|
||||
+ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version >= 0x0300 && version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) {
|
||||
|
||||
if (dwFlags & DIEDFL_FORCEFEEDBACK) {
|
||||
diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c
|
||||
index 631ea57..c07e821 100644
|
||||
--- a/dlls/dinput/tests/joystick.c
|
||||
+++ b/dlls/dinput/tests/joystick.c
|
||||
@@ -321,7 +321,7 @@ static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef)
|
||||
DIPROPDWORD dip_gain_set, dip_gain_get;
|
||||
struct effect_enum effect_data;
|
||||
|
||||
- ok(data->version > 0x0300, "Joysticks not supported in version 0x%04x\n", data->version);
|
||||
+ ok(data->version >= 0x0300, "Joysticks not supported in version 0x%04x\n", data->version);
|
||||
|
||||
hr = IDirectInput_CreateDevice(data->pDI, &lpddi->guidInstance, NULL, NULL);
|
||||
ok(hr==E_POINTER,"IDirectInput_CreateDevice() should have returned "
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,3 +0,0 @@
|
||||
Fixes: [36764] dinput: Allow DirectX version 3 to enumerate joysticks.
|
||||
Fixes: [47123] dinput: Use heuristics to guess if a device is a gamepad or a joystick.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user