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
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
82e4617d86 | ||
|
24753f8756 | ||
|
0ed3e9c774 | ||
|
61c3c024a2 | ||
|
7f17af3a42 | ||
|
4c51f4f5f6 | ||
|
3b7c98ebf1 | ||
|
2056903cdf | ||
|
65ca056d29 | ||
|
edb3417124 | ||
|
7655d14b6a | ||
|
61120ad0dd | ||
|
915b0a246f | ||
|
68918863dc | ||
|
a703038b94 | ||
|
643f96ec62 | ||
|
d3d93cfa0d | ||
|
7e42d0ac1a | ||
|
0ee2ac8499 | ||
|
a9aa06c58e | ||
|
97b65c93c2 | ||
|
310f4c498b | ||
|
ad41ee0c01 | ||
|
45230b51db | ||
|
b090c12d6d | ||
|
55c5bac511 | ||
|
c165d96d23 | ||
|
63c3baa9e5 | ||
|
980a476c49 | ||
|
120e2d362f | ||
|
df26057ddf | ||
|
fa3a80f5af | ||
|
00ab8180c0 | ||
|
fe634350d2 | ||
|
b10ac7d8ac | ||
|
56fd61a713 | ||
|
c9c7130f3c | ||
|
5f113860f5 | ||
|
9a5667dba1 | ||
|
1295604add |
@@ -1,4 +1,4 @@
|
||||
From 7784b62bd2b64aabd6bfef9ef39ac4f3e8c55c77 Mon Sep 17 00:00:00 2001
|
||||
From eb21fcc668da85977bc86b6105f3830cb26c93e6 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 8 Jun 2021 08:56:40 +1000
|
||||
Subject: [PATCH] bcrypt: Stop compile error when HAVE_GNUTLS_CIPHER_INIT not
|
||||
@@ -20,21 +20,21 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
|
||||
index 37a80bdc062..64825f5b99b 100644
|
||||
index d7b4499c692..11596d5f7ac 100644
|
||||
--- a/dlls/bcrypt/gnutls.c
|
||||
+++ b/dlls/bcrypt/gnutls.c
|
||||
@@ -25,9 +25,10 @@
|
||||
@@ -24,9 +24,10 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
#ifdef HAVE_GNUTLS_CIPHER_INIT
|
||||
|
||||
-#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <gnutls/gnutls.h>
|
||||
#include <gnutls/crypto.h>
|
||||
#include <sys/types.h>
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 916189d1cdf149f16867870121171e20f129da9f Mon Sep 17 00:00:00 2001
|
||||
From 36b4dbb687232d783cc3203da1dee4a797606ba7 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 3339596944a..1d435f88755 100644
|
||||
index 255d5afef79..00add6728cc 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -20,7 +20,7 @@ index 3339596944a..1d435f88755 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3373,6 +3374,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
@@ -3536,6 +3537,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index 3339596944a..1d435f88755 100644
|
||||
|
||||
/******************************************************************
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -3783,6 +3785,9 @@ static void init_wow64( CONTEXT *context )
|
||||
@@ -3955,6 +3957,9 @@ static void release_address_space(void)
|
||||
*/
|
||||
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
|
||||
{
|
||||
@@ -36,9 +36,9 @@ index 3339596944a..1d435f88755 100644
|
||||
+ UNICODE_STRING staging_event_string;
|
||||
+ HANDLE staging_event;
|
||||
static int attach_done;
|
||||
int i;
|
||||
NTSTATUS status;
|
||||
@@ -3869,6 +3874,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
ULONG_PTR cookie;
|
||||
@@ -4041,6 +4046,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
|
||||
#endif
|
||||
|
||||
@@ -56,5 +56,5 @@ index 3339596944a..1d435f88755 100644
|
||||
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
|
||||
RtlReleasePebLock();
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,25 +1,25 @@
|
||||
From cfcc687562d4fa68b507cbf2c29722ef523d26aa Mon Sep 17 00:00:00 2001
|
||||
From 8aa6fb73e3142d86ba354c204313b8a74a5fa43d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:53:46 +0200
|
||||
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
|
||||
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b52495f741f..d5a8cad20da 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -116,7 +116,7 @@ install-manpages:: manpages
|
||||
# Rules for generated source files
|
||||
|
||||
dlls/ntdll/unix/version.c: dummy
|
||||
- @version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
|
||||
+ @version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f86a5decb07..3d7f9cc96e6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3910,7 +3910,7 @@ dnl Rules for generated source files
|
||||
|
||||
WINE_APPEND_RULE(
|
||||
[dlls/ntdll/unix/version.c: dummy
|
||||
- @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1)
|
||||
+ @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1 (Staging)\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1)
|
||||
programs/winetest/build.rc: dummy
|
||||
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
|
||||
@build=\"STRINGTABLE { 1 \\\"\`GIT_DIR=${wine_srcdir}.git git rev-parse HEAD 2>/dev/null\`\\\" }\" && (echo \$\$build | cmp -s - \$[@]) || echo \$\$build >\$[@] || (rm -f \$[@] && exit 1)
|
||||
programs/winetest/build.nfo:
|
||||
--
|
||||
2.20.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,125 +0,0 @@
|
||||
From ffea83bdf88a4b7d35c2f9a7e1a773d3110b5771 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Apr 2016 01:02:34 +0200
|
||||
Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
|
||||
---
|
||||
dlls/uiautomationcore/Makefile.in | 1 +
|
||||
dlls/uiautomationcore/uia_main.c | 53 +++++++++++++++++++++++++++----
|
||||
2 files changed, 48 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
index 71ea7b99c94..3e6c2d7688a 100644
|
||||
--- a/dlls/uiautomationcore/Makefile.in
|
||||
+++ b/dlls/uiautomationcore/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
MODULE = uiautomationcore.dll
|
||||
IMPORTLIB = uiautomationcore
|
||||
+IMPORTS = uuid
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index 2dada95af80..a32ef552f15 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
+ * Copyright 2016 Michael Müller
|
||||
* Copyright 2017 Jacek Caban for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -16,18 +17,58 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
+#define COBJMACROS
|
||||
#include "uiautomation.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(uiautomation);
|
||||
|
||||
+static HRESULT WINAPI dummy_QueryInterface(IUnknown *iface, REFIID iid, void **ppv)
|
||||
+{
|
||||
+ TRACE("(%p, %s, %p)\n", iface, debugstr_guid(iid), ppv);
|
||||
+
|
||||
+ if (!ppv) return E_INVALIDARG;
|
||||
+
|
||||
+ if (!IsEqualIID(&IID_IUnknown, iid))
|
||||
+ {
|
||||
+ FIXME("Unknown interface: %s\n", debugstr_guid(iid));
|
||||
+ *ppv = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ *ppv = iface;
|
||||
+ IUnknown_AddRef((IUnknown *)*ppv);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI dummy_AddRef(IUnknown *iface)
|
||||
+{
|
||||
+ FIXME("(%p): stub\n", iface);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI dummy_Release(IUnknown *iface)
|
||||
+{
|
||||
+ FIXME("(%p): stub\n", iface);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static const IUnknownVtbl dummy_Vtbl =
|
||||
+{
|
||||
+ dummy_QueryInterface,
|
||||
+ dummy_AddRef,
|
||||
+ dummy_Release,
|
||||
+};
|
||||
+
|
||||
+static IUnknown dummy = { &dummy_Vtbl };
|
||||
+
|
||||
/***********************************************************************
|
||||
* UiaClientsAreListening (uiautomationcore.@)
|
||||
*/
|
||||
BOOL WINAPI UiaClientsAreListening(void)
|
||||
{
|
||||
- FIXME("()\n");
|
||||
+ FIXME("(): stub\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -36,8 +77,8 @@ BOOL WINAPI UiaClientsAreListening(void)
|
||||
*/
|
||||
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
|
||||
{
|
||||
- FIXME("(%p) stub!\n", value);
|
||||
- *value = NULL;
|
||||
+ FIXME("(%p): stub!\n", value);
|
||||
+ *value = &dummy;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -46,8 +87,8 @@ HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
|
||||
*/
|
||||
HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value)
|
||||
{
|
||||
- FIXME("(%p) stub!\n", value);
|
||||
- *value = NULL;
|
||||
+ FIXME("(%p): stub!\n", value);
|
||||
+ *value = &dummy;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -66,7 +107,7 @@ int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
|
||||
LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam,
|
||||
LPARAM lParam, IRawElementProviderSimple *elprov)
|
||||
{
|
||||
- FIXME("(%p, %lx, %lx, %p) stub!\n", hwnd, wParam, lParam, elprov);
|
||||
+ FIXME("(%p, %lx, %lx, %p): stub!\n", hwnd, wParam, lParam, elprov);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
@@ -1,3 +0,0 @@
|
||||
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
|
||||
Depends: dinput-joy-mappings
|
||||
Disabled: True
|
@@ -1,45 +1,33 @@
|
||||
From 2ff7da682aa87e09966fa0fb7c8846cd82bd1eea Mon Sep 17 00:00:00 2001
|
||||
From ef0da9342b0ced44da1ed8532941d53f48ead602 Mon Sep 17 00:00:00 2001
|
||||
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
|
||||
Date: Tue, 30 Apr 2019 09:20:54 +1000
|
||||
Subject: [PATCH] dinput: Allow empty Joystick mappings.
|
||||
|
||||
---
|
||||
dlls/dinput/device.c | 82 ++++++++++++++++++++++++++++++-------
|
||||
dlls/dinput/joystick.c | 2 +-
|
||||
dlls/dinput8/tests/device.c | 50 ++++++++++++++++++++++
|
||||
3 files changed, 119 insertions(+), 15 deletions(-)
|
||||
dlls/dinput/device.c | 77 ++++++++++++++++++++++++++++++-------
|
||||
dlls/dinput8/tests/device.c | 50 ++++++++++++++++++++++++
|
||||
2 files changed, 113 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index e99d14b4cff..540034de1e9 100644
|
||||
index b423337c9ce..c9466655ce4 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <string.h>
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
+#include "wine/heap.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
@@ -655,12 +656,29 @@ static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
|
||||
return type | (0x0000ff00 & (obj_instance << 8));
|
||||
@@ -356,12 +356,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
|
||||
return type | (0x0000ff00 & (instance << 8));
|
||||
}
|
||||
|
||||
+static void del_mapping_key(const WCHAR *device, const WCHAR *username, const WCHAR *guid) {
|
||||
+ static const WCHAR subkey[] = {
|
||||
+ 'S','o','f','t','w','a','r','e','\\',
|
||||
+ 'W','i','n','e','\\',
|
||||
+ 'D','i','r','e','c','t','I','n','p','u','t','\\',
|
||||
+ 'M','a','p','p','i','n','g','s','\\','%','s','\\','%','s','\\','%','s','\0'};
|
||||
+ static const WCHAR subkey[] = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
|
||||
+ DWORD len = wcslen(subkey) + wcslen(username) + wcslen(device) + wcslen(guid);
|
||||
+ WCHAR *keyname;
|
||||
+
|
||||
+ keyname = heap_alloc(sizeof(WCHAR) * (lstrlenW(subkey) + strlenW(username) + strlenW(device) + strlenW(guid)));
|
||||
+ sprintfW(keyname, subkey, username, device, guid);
|
||||
+ keyname = malloc(len * sizeof(WCHAR));
|
||||
+ swprintf(keyname, len, subkey, username, device, guid);
|
||||
+
|
||||
+ /* Remove old key mappings so there will be no overlapping mappings */
|
||||
+ RegDeleteKeyW(HKEY_CURRENT_USER, keyname);
|
||||
+
|
||||
+ heap_free(keyname);
|
||||
+ free(keyname);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
@@ -50,10 +38,10 @@ index e99d14b4cff..540034de1e9 100644
|
||||
-static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WCHAR *guid)
|
||||
+static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WCHAR *guid, BOOL create)
|
||||
{
|
||||
static const WCHAR subkey[] = {
|
||||
'S','o','f','t','w','a','r','e','\\',
|
||||
@@ -675,8 +693,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
|
||||
sprintfW(keyname, subkey, username, device, guid);
|
||||
static const WCHAR *subkey = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
|
||||
HKEY hkey;
|
||||
@@ -372,8 +386,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
|
||||
swprintf( keyname, len, subkey, username, device, guid );
|
||||
|
||||
/* The key used is HKCU\Software\Wine\DirectInput\Mappings\[username]\[device]\[mapping_guid] */
|
||||
- if (RegCreateKeyW(HKEY_CURRENT_USER, keyname, &hkey))
|
||||
@@ -64,9 +52,9 @@ index e99d14b4cff..540034de1e9 100644
|
||||
+ } else if (RegOpenKeyW(HKEY_CURRENT_USER, keyname, &hkey))
|
||||
+ hkey = 0;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, keyname);
|
||||
free( keyname );
|
||||
|
||||
@@ -696,7 +717,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
|
||||
@@ -393,7 +410,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
|
||||
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
|
||||
return DI_SETTINGSNOTSAVED;
|
||||
|
||||
@@ -77,7 +65,7 @@ index e99d14b4cff..540034de1e9 100644
|
||||
|
||||
if (!hkey)
|
||||
{
|
||||
@@ -731,7 +754,7 @@ BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdia
|
||||
@@ -428,7 +447,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
HKEY hkey;
|
||||
WCHAR *guid_str;
|
||||
DIDEVICEINSTANCEW didev;
|
||||
@@ -86,7 +74,7 @@ index e99d14b4cff..540034de1e9 100644
|
||||
|
||||
didev.dwSize = sizeof(didev);
|
||||
IDirectInputDevice8_GetDeviceInfo(&This->IDirectInputDevice8W_iface, &didev);
|
||||
@@ -739,7 +762,7 @@ BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdia
|
||||
@@ -436,7 +455,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
|
||||
return FALSE;
|
||||
|
||||
@@ -95,20 +83,19 @@ index e99d14b4cff..540034de1e9 100644
|
||||
|
||||
if (!hkey)
|
||||
{
|
||||
@@ -760,15 +783,21 @@ BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdia
|
||||
@@ -456,15 +475,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
|
||||
{
|
||||
lpdiaf->rgoAction[i].dwObjID = id;
|
||||
lpdiaf->rgoAction[i].guidInstance = didev.guidInstance;
|
||||
- lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
|
||||
- mapped += 1;
|
||||
+ lpdiaf->rgoAction[i].dwHow = DIAH_USERCONFIG;
|
||||
}
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ memset(&lpdiaf->rgoAction[i].guidInstance, 0, sizeof(GUID));
|
||||
+ lpdiaf->rgoAction[i].dwHow = DIAH_UNMAPPED;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
RegCloseKey(hkey);
|
||||
@@ -119,96 +106,83 @@ index e99d14b4cff..540034de1e9 100644
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
static BOOL set_app_data(IDirectInputDeviceImpl *dev, int offset, UINT_PTR app_data)
|
||||
@@ -831,13 +860,18 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
|
||||
load_success = load_mapping_settings(This, lpdiaf, username);
|
||||
static BOOL set_app_data( struct dinput_device *dev, int offset, UINT_PTR app_data )
|
||||
@@ -1607,13 +1631,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
|
||||
load_success = load_mapping_settings( impl, format, username_buf );
|
||||
}
|
||||
|
||||
- if (load_success) return DI_OK;
|
||||
+ if (load_success) {
|
||||
+ /* Update dwCRC to track if action format has changed */
|
||||
+ for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
+ for (i=0; i < format->dwNumActions; i++)
|
||||
+ {
|
||||
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwObjID << i * 2) | (lpdiaf->rgoAction[i].dwObjID >> (sizeof(lpdiaf->dwCRC) * 8 - i * 2));
|
||||
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwSemantic << (i * 2 + 5)) | (lpdiaf->rgoAction[i].dwSemantic >> (sizeof(lpdiaf->dwCRC) * 8 - (i * 2 + 5)));
|
||||
+ format->dwCRC ^= (format->rgoAction[i].dwObjID << i * 2) | (format->rgoAction[i].dwObjID >> (sizeof(format->dwCRC) * 8 - i * 2));
|
||||
+ format->dwCRC ^= (format->rgoAction[i].dwSemantic << (i * 2 + 5)) | (format->rgoAction[i].dwSemantic >> (sizeof(format->dwCRC) * 8 - (i * 2 + 5)));
|
||||
+ }
|
||||
+ return DI_OK;
|
||||
+ }
|
||||
|
||||
for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
for (i = 0; i < format->dwNumActions; i++)
|
||||
{
|
||||
- /* Don't touch a user configured action */
|
||||
- if (lpdiaf->rgoAction[i].dwHow == DIAH_USERCONFIG) continue;
|
||||
- if (format->rgoAction[i].dwHow == DIAH_USERCONFIG) continue;
|
||||
-
|
||||
if ((lpdiaf->rgoAction[i].dwSemantic & devMask) == devMask)
|
||||
genre = format->rgoAction[i].dwSemantic & DIGENRE_ANY;
|
||||
if (devMask == genre || (devMask == DIGENRE_ANY && genre != DIMOUSE_MASK && genre != DIKEYBOARD_MASK))
|
||||
{
|
||||
DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
|
||||
@@ -868,6 +902,14 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
|
||||
@@ -1645,6 +1674,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Update dwCRC to track if action format has changed */
|
||||
+ lpdiaf->dwCRC = 0;
|
||||
+ for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
+ format->dwCRC = 0;
|
||||
+ for (i=0; i < format->dwNumActions; i++)
|
||||
+ {
|
||||
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwObjID << i * 2) | (lpdiaf->rgoAction[i].dwObjID >> (sizeof(lpdiaf->dwCRC) * 8 - i * 2));
|
||||
+ lpdiaf->dwCRC ^= (lpdiaf->rgoAction[i].dwSemantic << (i * 2 + 5)) | (lpdiaf->rgoAction[i].dwSemantic >> (sizeof(lpdiaf->dwCRC) * 8 - (i * 2 + 5)));
|
||||
+ format->dwCRC ^= (format->rgoAction[i].dwObjID << i * 2) | (format->rgoAction[i].dwObjID >> (sizeof(format->dwCRC) * 8 - i * 2));
|
||||
+ format->dwCRC ^= (format->rgoAction[i].dwSemantic << (i * 2 + 5)) | (format->rgoAction[i].dwSemantic >> (sizeof(format->dwCRC) * 8 - (i * 2 + 5)));
|
||||
+ }
|
||||
+
|
||||
if (!has_actions) return DI_NOEFFECT;
|
||||
|
||||
return IDirectInputDevice8WImpl_BuildActionMap(iface, lpdiaf, lpszUserName, dwFlags);
|
||||
@@ -883,6 +925,7 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
if (flags & (DIDBAM_DEFAULT|DIDBAM_PRESERVE|DIDBAM_INITIALIZE|DIDBAM_HWDEFAULTS))
|
||||
FIXME("Unimplemented flags %#x\n", flags);
|
||||
@@ -1662,6 +1699,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
DIPROPSTRING dps;
|
||||
WCHAR username[MAX_PATH];
|
||||
DWORD username_size = MAX_PATH;
|
||||
WCHAR username_buf[MAX_PATH];
|
||||
DWORD username_len = MAX_PATH;
|
||||
+ DWORD new_crc = 0;
|
||||
int i, action = 0, num_actions = 0;
|
||||
unsigned int offset = 0;
|
||||
ActionMap *action_map;
|
||||
@@ -894,12 +937,23 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
const DIDATAFORMAT *df;
|
||||
@@ -1694,12 +1732,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
data_format.dwFlags = DIDF_RELAXIS;
|
||||
data_format.dwDataSize = lpdiaf->dwDataSize;
|
||||
data_format.dwDataSize = format->dwDataSize;
|
||||
|
||||
+ /* Calculate checksum for actionformat */
|
||||
+ for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
+ for (i=0; i < format->dwNumActions; i++)
|
||||
+ {
|
||||
+ new_crc ^= (lpdiaf->rgoAction[i].dwObjID << i * 2) | (lpdiaf->rgoAction[i].dwObjID >> (sizeof(lpdiaf->dwCRC) * 8 - i * 2));
|
||||
+ new_crc ^= (lpdiaf->rgoAction[i].dwSemantic << (i * 2 + 5)) | (lpdiaf->rgoAction[i].dwSemantic >> (sizeof(lpdiaf->dwCRC) * 8 - (i * 2 + 5)));
|
||||
+ new_crc ^= (format->rgoAction[i].dwObjID << i * 2) | (format->rgoAction[i].dwObjID >> (sizeof(format->dwCRC) * 8 - i * 2));
|
||||
+ new_crc ^= (format->rgoAction[i].dwSemantic << (i * 2 + 5)) | (format->rgoAction[i].dwSemantic >> (sizeof(format->dwCRC) * 8 - (i * 2 + 5)));
|
||||
+ }
|
||||
+
|
||||
/* Count the actions */
|
||||
for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance))
|
||||
for (i = 0; i < format->dwNumActions; i++)
|
||||
if (IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance ))
|
||||
num_actions++;
|
||||
|
||||
- if (num_actions == 0) return DI_NOEFFECT;
|
||||
+ /* 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;
|
||||
+ if (num_actions == 0 && format->dwCRC == new_crc && !(flags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
|
||||
+
|
||||
+ /* update dwCRC to track if action format has changed */
|
||||
+ lpdiaf->dwCRC = new_crc;
|
||||
+ format->dwCRC = new_crc;
|
||||
|
||||
/* Construct the dataformat and actionmap */
|
||||
obj_df = HeapAlloc(GetProcessHeap(), 0, sizeof(DIOBJECTDATAFORMAT)*num_actions);
|
||||
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
|
||||
index 0cddfbc634b..93211ea13a6 100644
|
||||
--- a/dlls/dinput/joystick.c
|
||||
+++ b/dlls/dinput/joystick.c
|
||||
@@ -749,7 +749,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
|
||||
else
|
||||
lstrcpynW(username, lpszUserName, size);
|
||||
|
||||
- load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username);
|
||||
+ load_success = load_mapping_settings(&This->base, lpdiaf, username);
|
||||
heap_free(username);
|
||||
}
|
||||
|
||||
obj_df = malloc( sizeof(DIOBJECTDATAFORMAT) * num_actions );
|
||||
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
|
||||
index 17deed193dd..3bfb34eb2ca 100644
|
||||
index 5ae9e225dc9..d3e86c68176 100644
|
||||
--- a/dlls/dinput8/tests/device.c
|
||||
+++ b/dlls/dinput8/tests/device.c
|
||||
@@ -38,6 +38,8 @@ struct enum_data {
|
||||
@@ -48,6 +48,8 @@ struct enum_data {
|
||||
/* Dummy GUID */
|
||||
static const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } };
|
||||
|
||||
@@ -217,7 +191,7 @@ index 17deed193dd..3bfb34eb2ca 100644
|
||||
enum {
|
||||
DITEST_AXIS,
|
||||
DITEST_BUTTON,
|
||||
@@ -429,6 +431,17 @@ static void test_action_mapping(void)
|
||||
@@ -472,6 +474,17 @@ static void test_action_mapping(void)
|
||||
hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
|
||||
ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%08x\n", hr);
|
||||
|
||||
@@ -235,7 +209,7 @@ index 17deed193dd..3bfb34eb2ca 100644
|
||||
af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
|
||||
af.dwNumActions = ARRAY_SIZE(actionMapping);
|
||||
|
||||
@@ -620,6 +633,43 @@ static void test_save_settings(void)
|
||||
@@ -663,6 +676,43 @@ static void test_save_settings(void)
|
||||
"Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[1], af.rgoAction[1].dwObjID);
|
||||
ok (IsEqualGUID(&GUID_SysKeyboard, &af.rgoAction[1].guidInstance), "Action should be mapped to keyboard\n");
|
||||
|
||||
@@ -280,5 +254,5 @@ index 17deed193dd..3bfb34eb2ca 100644
|
||||
IDirectInput_Release(pDI);
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
@@ -1,77 +1,19 @@
|
||||
From c9ecf258a9186bb31a18f8a4728e20bb25b4e9cf Mon Sep 17 00:00:00 2001
|
||||
From 65e22e69bd660ff20cac0a83e3c1feb966a49646 Mon Sep 17 00:00:00 2001
|
||||
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
|
||||
Date: Tue, 30 Apr 2019 09:21:24 +1000
|
||||
Subject: [PATCH] dinput: Support username in Config dialog.
|
||||
|
||||
---
|
||||
dlls/dinput/ansi.c | 26 +++++
|
||||
dlls/dinput/config.c | 187 ++++++++++++++++++++++++-----------
|
||||
dlls/dinput/config.c | 184 ++++++++++++++++++++++++-----------
|
||||
dlls/dinput/device.c | 2 +-
|
||||
dlls/dinput/device_private.h | 1 +
|
||||
dlls/dinput/dinput_main.c | 1 +
|
||||
5 files changed, 160 insertions(+), 57 deletions(-)
|
||||
dlls/dinput/dinput_private.h | 1 +
|
||||
3 files changed, 130 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/ansi.c b/dlls/dinput/ansi.c
|
||||
index 431b812aeb2..270fe6f1498 100644
|
||||
--- a/dlls/dinput/ansi.c
|
||||
+++ b/dlls/dinput/ansi.c
|
||||
@@ -840,11 +840,37 @@ static HRESULT WINAPI dinput8_a_ConfigureDevices( IDirectInput8A *iface_a, LPDIC
|
||||
{
|
||||
hr = diactionformat_atow( format_a, &format_w, TRUE );
|
||||
params_w.lprgFormats = &format_w;
|
||||
+ params_w.dwcUsers = params_a->dwcUsers;
|
||||
+
|
||||
+ if (params_a->lptszUserNames) {
|
||||
+ char *start = params_a->lptszUserNames;
|
||||
+ WCHAR *to = NULL;
|
||||
+ int total_len = 0;
|
||||
+ for (i = 0; i < params_a->dwcUsers; i++)
|
||||
+ {
|
||||
+ char *end = start + 1;
|
||||
+ int len;
|
||||
+ while (*(end++));
|
||||
+ len = MultiByteToWideChar(CP_ACP, 0, start, end - start, NULL, 0);
|
||||
+ total_len += len + 2; /* length of string and two null char */
|
||||
+ if (to)
|
||||
+ to = HeapReAlloc(GetProcessHeap(), 0, to, sizeof(WCHAR) * total_len);
|
||||
+ else
|
||||
+ to = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * total_len);
|
||||
+
|
||||
+ MultiByteToWideChar(CP_ACP, 0, start, end - start, to + (total_len - len - 2), len);
|
||||
+ to[total_len] = 0;
|
||||
+ to[total_len - 1] = 0;
|
||||
+ }
|
||||
+ params_w.lptszUserNames = to;
|
||||
+ }
|
||||
|
||||
if (SUCCEEDED(hr)) hr = IDirectInput8_ConfigureDevices( iface_w, callback, ¶ms_w, flags, ref );
|
||||
|
||||
if (!format_w.hInstString) for (i = 0; i < format_w.dwNumActions; ++i) HeapFree( GetProcessHeap(), 0, (void *)format_w.rgoAction[i].lptszActionName );
|
||||
HeapFree( GetProcessHeap(), 0, format_w.rgoAction );
|
||||
+ HeapFree( GetProcessHeap(), 0, params_w.lptszUserNames);
|
||||
+
|
||||
}
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, params_w.lptszUserNames );
|
||||
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
|
||||
index bf448985893..c7a33d2da02 100644
|
||||
index 8cc73c80242..bb0b2c03c47 100644
|
||||
--- a/dlls/dinput/config.c
|
||||
+++ b/dlls/dinput/config.c
|
||||
@@ -18,17 +18,23 @@
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
+
|
||||
#include "wine/unicode.h"
|
||||
#include "objbase.h"
|
||||
#include "dinput_private.h"
|
||||
#include "device_private.h"
|
||||
#include "resource.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
+
|
||||
typedef struct {
|
||||
int nobjects;
|
||||
@@ -29,6 +29,9 @@ typedef struct {
|
||||
IDirectInputDevice8W *lpdid;
|
||||
DIDEVICEINSTANCEW ddi;
|
||||
DIDEVICEOBJECTINSTANCEW ddo[256];
|
||||
@@ -81,7 +23,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
} DeviceData;
|
||||
|
||||
typedef struct {
|
||||
@@ -38,10 +44,11 @@ typedef struct {
|
||||
@@ -38,10 +41,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
IDirectInput8W *lpDI;
|
||||
@@ -94,7 +36,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
} ConfigureDevicesData;
|
||||
|
||||
/*
|
||||
@@ -57,27 +64,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
|
||||
@@ -57,27 +61,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -117,7 +59,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
- DeviceData *device = &data->devices[data->ndevices];
|
||||
+ /* alloc array for devices if this is our first device */
|
||||
+ if (!data->devices_data.ndevices)
|
||||
+ data->devices_data.devices = HeapAlloc(GetProcessHeap(), 0, sizeof(DeviceData) * (dwRemaining + 1));
|
||||
+ data->devices_data.devices = malloc(sizeof(DeviceData) * (dwRemaining + 1));
|
||||
+ device = &data->devices_data.devices[data->devices_data.ndevices];
|
||||
device->lpdid = lpdid;
|
||||
device->ddi = *lpddi;
|
||||
@@ -128,14 +70,14 @@ index bf448985893..c7a33d2da02 100644
|
||||
IDirectInputDevice_EnumObjects(lpdid, collect_objects, (LPVOID) device, DIDFT_ALL);
|
||||
|
||||
- data->ndevices++;
|
||||
+ device->user_afs = heap_alloc(sizeof(*device->user_afs) * data->nusernames);
|
||||
+ device->user_afs = malloc(sizeof(*device->user_afs) * data->nusernames);
|
||||
+ memset(device->user_afs, 0, sizeof(*device->user_afs) * data->nusernames);
|
||||
+ for (i = 0; i < data->nusernames; i++)
|
||||
+ {
|
||||
+ DIACTIONFORMATW *user_af = &device->user_afs[i];
|
||||
+ user_af->dwNumActions = data->original_lpdiaf->dwNumActions;
|
||||
+ user_af->guidActionMap = data->original_lpdiaf->guidActionMap;
|
||||
+ user_af->rgoAction = heap_alloc(sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
|
||||
+ user_af->rgoAction = malloc(sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
|
||||
+ memset(user_af->rgoAction, 0, sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
|
||||
+ for (j = 0; j < user_af->dwNumActions; j++)
|
||||
+ {
|
||||
@@ -149,7 +91,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -170,10 +192,18 @@ static DeviceData* get_cur_device(HWND dialog)
|
||||
@@ -169,10 +188,18 @@ static DeviceData* get_cur_device(HWND dialog)
|
||||
return &data->devices_data.devices[sel];
|
||||
}
|
||||
|
||||
@@ -170,7 +112,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
}
|
||||
|
||||
static int dialog_display_only(HWND dialog)
|
||||
@@ -182,40 +212,36 @@ static int dialog_display_only(HWND dialog)
|
||||
@@ -181,40 +208,36 @@ static int dialog_display_only(HWND dialog)
|
||||
return data->display_only;
|
||||
}
|
||||
|
||||
@@ -184,7 +126,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
- IDirectInput8_EnumDevicesBySemantics(lpDI, NULL, lpdiaf, count_devices, (LPVOID) data, 0);
|
||||
-
|
||||
- /* Allocate devices */
|
||||
- data->devices = HeapAlloc(GetProcessHeap(), 0, sizeof(DeviceData) * data->ndevices);
|
||||
- data->devices = malloc( sizeof(DeviceData) * data->ndevices );
|
||||
-
|
||||
/* Collect and insert */
|
||||
- data->ndevices = 0;
|
||||
@@ -212,19 +154,19 @@ index bf448985893..c7a33d2da02 100644
|
||||
+ {
|
||||
IDirectInputDevice8_Release(devices_data->devices[i].lpdid);
|
||||
+ for (j=0; j < data->nusernames; j++)
|
||||
+ heap_free(devices_data->devices[i].user_afs[j].rgoAction);
|
||||
+ heap_free(devices_data->devices[i].user_afs);
|
||||
+ free(devices_data->devices[i].user_afs[j].rgoAction);
|
||||
+ free(devices_data->devices[i].user_afs);
|
||||
+ }
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, devices_data->devices);
|
||||
free( devices_data->devices );
|
||||
-
|
||||
- /* Free the backup LPDIACTIONFORMATW */
|
||||
- HeapFree(GetProcessHeap(), 0, data->original_lpdiaf->rgoAction);
|
||||
- HeapFree(GetProcessHeap(), 0, data->original_lpdiaf);
|
||||
- free( data->original_lpdiaf->rgoAction );
|
||||
- free( data->original_lpdiaf );
|
||||
}
|
||||
|
||||
static void fill_device_object_list(HWND dialog)
|
||||
@@ -231,6 +257,7 @@ static void fill_device_object_list(HWND dialog)
|
||||
@@ -230,6 +253,7 @@ static void fill_device_object_list(HWND dialog)
|
||||
/* Add each object */
|
||||
for (i=0; i < device->nobjects; i++)
|
||||
{
|
||||
@@ -232,7 +174,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
int action = -1;
|
||||
|
||||
item.mask = LVIF_TEXT | LVIF_PARAM;
|
||||
@@ -241,12 +268,20 @@ static void fill_device_object_list(HWND dialog)
|
||||
@@ -240,12 +264,20 @@ static void fill_device_object_list(HWND dialog)
|
||||
|
||||
/* Add the item */
|
||||
SendDlgItemMessageW(dialog, IDC_DEVICEOBJECTSLIST, LVM_INSERTITEMW, 0, (LPARAM) &item);
|
||||
@@ -255,7 +197,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
{
|
||||
action = j;
|
||||
break;
|
||||
@@ -260,7 +295,7 @@ static void fill_device_object_list(HWND dialog)
|
||||
@@ -259,7 +291,7 @@ static void fill_device_object_list(HWND dialog)
|
||||
static void show_suitable_actions(HWND dialog)
|
||||
{
|
||||
DeviceData *device = get_cur_device(dialog);
|
||||
@@ -264,7 +206,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
int i, added = 0;
|
||||
int obj = lv_get_cur_item(dialog);
|
||||
|
||||
@@ -329,24 +364,35 @@ static void assign_action(HWND dialog)
|
||||
@@ -328,24 +360,35 @@ static void assign_action(HWND dialog)
|
||||
lv_set_action(dialog, obj, action, lpdiaf);
|
||||
}
|
||||
|
||||
@@ -312,7 +254,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
@@ -358,21 +404,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
|
||||
@@ -357,21 +400,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
|
||||
ConfigureDevicesData *data = (ConfigureDevicesData*) lParam;
|
||||
|
||||
/* Initialize action format and enumerate devices */
|
||||
@@ -325,9 +267,9 @@ index bf448985893..c7a33d2da02 100644
|
||||
init_listview_columns(dialog);
|
||||
|
||||
- /* Create a backup action format for CANCEL and RESET operations */
|
||||
- data->original_lpdiaf = HeapAlloc(GetProcessHeap(), 0, sizeof(*data->original_lpdiaf));
|
||||
- data->original_lpdiaf = malloc( sizeof(*data->original_lpdiaf) );
|
||||
- data->original_lpdiaf->dwNumActions = data->lpdiaf->dwNumActions;
|
||||
- data->original_lpdiaf->rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*data->lpdiaf->dwNumActions);
|
||||
- data->original_lpdiaf->rgoAction = malloc( sizeof(DIACTIONW) * data->lpdiaf->dwNumActions );
|
||||
- copy_actions(data->original_lpdiaf, data->lpdiaf);
|
||||
-
|
||||
/* Select the first device and show its actions */
|
||||
@@ -336,7 +278,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
fill_device_object_list(dialog);
|
||||
|
||||
ShowCursor(TRUE);
|
||||
@@ -414,6 +455,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
|
||||
@@ -413,6 +451,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
|
||||
break;
|
||||
|
||||
case IDC_CONTROLLERCOMBO:
|
||||
@@ -344,7 +286,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
@@ -424,12 +466,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
|
||||
@@ -423,12 +462,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
|
||||
break;
|
||||
|
||||
case IDOK:
|
||||
@@ -358,7 +300,7 @@ index bf448985893..c7a33d2da02 100644
|
||||
EndDialog(dialog, 0);
|
||||
destroy_data(dialog);
|
||||
break;
|
||||
@@ -452,15 +494,48 @@ HRESULT _configure_devices(IDirectInput8W *iface,
|
||||
@@ -451,15 +490,48 @@ HRESULT _configure_devices(IDirectInput8W *iface,
|
||||
LPVOID pvRefData
|
||||
)
|
||||
{
|
||||
@@ -375,16 +317,16 @@ index bf448985893..c7a33d2da02 100644
|
||||
+ {
|
||||
+ /* Get default user name */
|
||||
+ GetUserNameW(NULL, &size);
|
||||
+ username = heap_alloc(size * sizeof(WCHAR) );
|
||||
+ username = malloc(size * sizeof(WCHAR) );
|
||||
+ GetUserNameW(username, &size);
|
||||
+ data.nusernames = 1;
|
||||
+ data.usernames = heap_alloc(sizeof(WCHAR *));
|
||||
+ data.usernames = malloc(sizeof(WCHAR *));
|
||||
+ data.usernames[0] = username;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ WCHAR *p = lpdiCDParams->lptszUserNames;
|
||||
+ data.usernames = heap_alloc(sizeof(WCHAR *) * data.nusernames);
|
||||
+ data.usernames = malloc(sizeof(WCHAR *) * data.nusernames);
|
||||
+ for (i = 0; i < data.nusernames; i++)
|
||||
+ {
|
||||
+ if (*p)
|
||||
@@ -403,16 +345,16 @@ index bf448985893..c7a33d2da02 100644
|
||||
DialogBoxParamW(DINPUT_instance, (const WCHAR *)MAKEINTRESOURCE(IDD_CONFIGUREDEVICES),
|
||||
lpdiCDParams->hwnd, ConfigureDevicesDlgProc, (LPARAM)&data);
|
||||
|
||||
+ heap_free(username);
|
||||
+ heap_free(data.usernames);
|
||||
+ free(username);
|
||||
+ free(data.usernames);
|
||||
+
|
||||
return DI_OK;
|
||||
}
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index 05a1dbbb2a1..daaaebdc0d0 100644
|
||||
index c9466655ce4..e826cc89c1e 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -704,7 +704,7 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
|
||||
@@ -397,7 +397,7 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
|
||||
return hkey;
|
||||
}
|
||||
|
||||
@@ -421,30 +363,18 @@ index 05a1dbbb2a1..daaaebdc0d0 100644
|
||||
{
|
||||
WCHAR *guid_str = NULL;
|
||||
DIDEVICEINSTANCEW didev;
|
||||
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
|
||||
index 8d3425483c2..a6f22b28bf3 100644
|
||||
--- a/dlls/dinput/device_private.h
|
||||
+++ b/dlls/dinput/device_private.h
|
||||
@@ -132,6 +132,7 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
|
||||
|
||||
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h
|
||||
index a9777dc8dbb..b90c0bc5200 100644
|
||||
--- a/dlls/dinput/dinput_private.h
|
||||
+++ b/dlls/dinput/dinput_private.h
|
||||
@@ -76,6 +76,7 @@ extern void check_dinput_hooks( IDirectInputDevice8W *iface, BOOL acquired ) DEC
|
||||
extern void check_dinput_events(void) DECLSPEC_HIDDEN;
|
||||
|
||||
extern HRESULT _configure_devices(IDirectInput8W *iface, LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) DECLSPEC_HIDDEN;
|
||||
+extern HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUsername) DECLSPEC_HIDDEN;
|
||||
extern BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMATW lpdiaf, const WCHAR *username) DECLSPEC_HIDDEN;
|
||||
|
||||
extern HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
|
||||
index 85de9f79b81..2f40bfbca96 100644
|
||||
--- a/dlls/dinput/dinput_main.c
|
||||
+++ b/dlls/dinput/dinput_main.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/asm.h"
|
||||
#include "windef.h"
|
||||
extern WCHAR* get_mapping_path(const WCHAR *device, const WCHAR *username) DECLSPEC_HIDDEN;
|
||||
extern DWORD get_device_type(DWORD version, BOOL is_joystick) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 629a5f7eea3b17f56606d3b588a5fd96ded99fef Mon Sep 17 00:00:00 2001
|
||||
From 571d437192d553b7a8aac6908f10728cd4d1a257 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 4 Oct 2019 16:24:06 +1000
|
||||
Subject: [PATCH] dinput: Dont allow Fixed actions to be changed.
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] dinput: Dont allow Fixed actions to be changed.
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
|
||||
index cd2c4b921e7..bfb535c9b2a 100644
|
||||
index bb0b2c03c47..4b6cba26843 100644
|
||||
--- a/dlls/dinput/config.c
|
||||
+++ b/dlls/dinput/config.c
|
||||
@@ -91,6 +91,7 @@ static BOOL CALLBACK collect_devices(LPCDIDEVICEINSTANCEW lpddi, IDirectInputDev
|
||||
@@ -19,7 +19,7 @@ index cd2c4b921e7..bfb535c9b2a 100644
|
||||
user_af->rgoAction[j].u.lptszActionName = data->original_lpdiaf->rgoAction[j].u.lptszActionName;
|
||||
}
|
||||
IDirectInputDevice8_BuildActionMap(lpdid, user_af, data->usernames[i], 0);
|
||||
@@ -334,6 +335,8 @@ static void assign_action(HWND dialog)
|
||||
@@ -333,6 +334,8 @@ static void assign_action(HWND dialog)
|
||||
|
||||
if (old_action == action) return;
|
||||
if (obj < 0) return;
|
||||
@@ -29,5 +29,5 @@ index cd2c4b921e7..bfb535c9b2a 100644
|
||||
|
||||
/* Clear old action */
|
||||
--
|
||||
2.23.0
|
||||
2.33.0
|
||||
|
@@ -1,42 +1,41 @@
|
||||
From 75add3c0c65775eb3fa825aafbe46373c0bd08f1 Mon Sep 17 00:00:00 2001
|
||||
From 98a9b8337d40c1f6df21227dff3d993f270aef46 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 24 May 2019 16:16:13 +1000
|
||||
Subject: [PATCH] dinput: Allow mapping of controls based of Genre
|
||||
type.
|
||||
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 c7e585c50f4..84a41996700 100644
|
||||
index e826cc89c1e..a4815f24958 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -893,8 +893,15 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
@@ -1741,8 +1741,15 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
|
||||
/* Count the actions */
|
||||
for (i=0; i < lpdiaf->dwNumActions; i++)
|
||||
- if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance))
|
||||
for (i = 0; i < format->dwNumActions; i++)
|
||||
- if (IsEqualGUID( &impl->guid, &format->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 */) ))
|
||||
+ if (IsEqualGUID(&impl->guid, &format->rgoAction[i].guidInstance) ||
|
||||
+ (IsEqualGUID(&IID_NULL, &format->rgoAction[i].guidInstance) &&
|
||||
+ ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
|
||||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
|
||||
+ {
|
||||
num_actions++;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Should return DI_NOEFFECT if we dont have any actions and actionformat has not changed */
|
||||
if (num_actions == 0 && lpdiaf->dwCRC == new_crc && !(dwFlags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
|
||||
@@ -934,7 +941,39 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
if (num_actions == 0 && format->dwCRC == new_crc && !(flags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
|
||||
@@ -1779,7 +1786,39 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
|
||||
|
||||
action++;
|
||||
}
|
||||
+ else if ((lpdiaf->rgoAction[i].dwSemantic & lpdiaf->dwGenre) == lpdiaf->dwGenre ||
|
||||
+ (lpdiaf->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
|
||||
+ else if ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
|
||||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
|
||||
+ {
|
||||
+ DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
|
||||
+ DWORD obj_id = semantic_to_obj_id(impl, format->rgoAction[i].dwSemantic);
|
||||
+ DWORD type = DIDFT_GETTYPE(obj_id);
|
||||
+ DWORD inst = DIDFT_GETINSTANCE(obj_id);
|
||||
+ LPDIOBJECTDATAFORMAT obj;
|
||||
@@ -50,8 +49,8 @@ index c7e585c50f4..84a41996700 100644
|
||||
+ {
|
||||
+ memcpy(&obj_df[action], obj, df->dwObjSize);
|
||||
+
|
||||
+ This->action_map[action].uAppData = lpdiaf->rgoAction[i].uAppData;
|
||||
+ This->action_map[action].offset = offset;
|
||||
+ impl->action_map[action].uAppData = format->rgoAction[i].uAppData;
|
||||
+ impl->action_map[action].offset = offset;
|
||||
+ obj_df[action].dwOfs = offset;
|
||||
+ offset += (type & DIDFT_BUTTON) ? 1 : 4;
|
||||
+
|
||||
@@ -62,13 +61,13 @@ index c7e585c50f4..84a41996700 100644
|
||||
+
|
||||
+ if (action == 0)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, obj_df);
|
||||
+ free( obj_df );
|
||||
+ return DI_NOEFFECT;
|
||||
}
|
||||
+ data_format.dwNumObjs = action;
|
||||
|
||||
IDirectInputDevice8_SetDataFormat(iface, &data_format);
|
||||
IDirectInputDevice8_SetDataFormat( iface, &data_format );
|
||||
|
||||
--
|
||||
2.24.1
|
||||
2.33.0
|
||||
|
@@ -1,2 +1,3 @@
|
||||
Fixes: [34108] dinput: Improve support for user Joystick configuration.
|
||||
Disabled: True
|
||||
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
|
||||
Fixes: [35815] dinput: Allow remapping of joystick buttons.
|
||||
|
@@ -1,137 +0,0 @@
|
||||
From 58773ad5cf6a79a6ec4fc2856aeb5fdf3f877368 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Church <achurch@achurch.org>
|
||||
Date: Mon, 25 Feb 2019 11:21:03 +1100
|
||||
Subject: [PATCH] dinput: Allow remapping of joystick buttons
|
||||
|
||||
Changed
|
||||
- Change the array to store the origial button.
|
||||
- Remove lookup loops.
|
||||
- Changed max Buttons to 128 to match DIJOYSTATE2 structure.
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
|
||||
---
|
||||
dlls/dinput/joystick.c | 29 +++++++++++++++++++++++++++++
|
||||
dlls/dinput/joystick_linux.c | 7 +++++--
|
||||
dlls/dinput/joystick_linuxinput.c | 2 ++
|
||||
dlls/dinput/joystick_osx.c | 2 ++
|
||||
dlls/dinput/joystick_private.h | 4 ++++
|
||||
5 files changed, 42 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
|
||||
index c85fda5cddb..21c81b0b683 100644
|
||||
--- a/dlls/dinput/joystick.c
|
||||
+++ b/dlls/dinput/joystick.c
|
||||
@@ -921,6 +921,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
int tokens = 0;
|
||||
int axis = 0;
|
||||
int pov = 0;
|
||||
+ int button;
|
||||
|
||||
get_app_key(&hkey, &appkey);
|
||||
|
||||
@@ -932,6 +933,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
|
||||
}
|
||||
|
||||
+ for (button = 0; button < MAX_MAP_BUTTONS; button++)
|
||||
+ This->button_map[button] = button;
|
||||
+
|
||||
+ if (!get_config_key(hkey, appkey, "ButtonMap", buffer, sizeof(buffer)))
|
||||
+ {
|
||||
+ static const char *delim = ",";
|
||||
+ int button = 0;
|
||||
+ char *token;
|
||||
+
|
||||
+ TRACE("ButtonMap = \"%s\"\n", buffer);
|
||||
+ for (token = strtok(buffer, delim);
|
||||
+ token != NULL && button < MAX_MAP_BUTTONS;
|
||||
+ token = strtok(NULL, delim), button++)
|
||||
+ {
|
||||
+ char *s;
|
||||
+ int value = strtol(token, &s, 10);
|
||||
+ if (value < 0 || *s != '\0')
|
||||
+ {
|
||||
+ ERR("invalid button number: \"%s\"", token);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TRACE("mapping physical button %d to DInput button %d", value, button);
|
||||
+ This->button_map[value] = button;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
This->axis_map = HeapAlloc(GetProcessHeap(), 0, This->device_axis_count * sizeof(int));
|
||||
if (!This->axis_map) return DIERR_OUTOFMEMORY;
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
|
||||
index 5b54e352c20..7a7a59bcb58 100644
|
||||
--- a/dlls/dinput/joystick_linux.c
|
||||
+++ b/dlls/dinput/joystick_linux.c
|
||||
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
jse.type,jse.number,jse.value);
|
||||
if (jse.type & JS_EVENT_BUTTON)
|
||||
{
|
||||
+ int button;
|
||||
if (jse.number >= This->generic.devcaps.dwButtons) return;
|
||||
|
||||
- inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON;
|
||||
- This->generic.js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00;
|
||||
+ button = This->generic.button_map[jse.number];
|
||||
+
|
||||
+ inst_id = DIDFT_MAKEINSTANCE(button) | DIDFT_PSHBUTTON;
|
||||
+ This->generic.js.rgbButtons[button] = value = jse.value ? 0x80 : 0x00;
|
||||
}
|
||||
else if (jse.type & JS_EVENT_AXIS)
|
||||
{
|
||||
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
|
||||
index e3876a97b7f..aa56aa28d08 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -820,6 +820,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
if (btn & 0x80)
|
||||
{
|
||||
btn &= 0x7F;
|
||||
+ btn = This->generic.button_map[btn];
|
||||
+
|
||||
inst_id = DIDFT_MAKEINSTANCE(btn) | DIDFT_PSHBUTTON;
|
||||
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
|
||||
}
|
||||
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
|
||||
index 9ee45e8a445..f88ee566781 100644
|
||||
--- a/dlls/dinput/joystick_osx.c
|
||||
+++ b/dlls/dinput/joystick_osx.c
|
||||
@@ -891,6 +891,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
|
||||
TRACE("val %d oldVal %d newVal %d\n", val, oldVal, newVal);
|
||||
if (oldVal != newVal)
|
||||
{
|
||||
+ button_idx = device->generic.button_map[button_idx];
|
||||
+
|
||||
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
|
||||
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
|
||||
if (device->generic.base.hEvent)
|
||||
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
|
||||
index 32265edef03..fb0edfa7878 100644
|
||||
--- a/dlls/dinput/joystick_private.h
|
||||
+++ b/dlls/dinput/joystick_private.h
|
||||
@@ -33,6 +33,9 @@
|
||||
#define MAX_PROPS 164
|
||||
struct JoystickGenericImpl;
|
||||
|
||||
+/* Number of buttons for which to allow remapping */
|
||||
+#define MAX_MAP_BUTTONS 128
|
||||
+
|
||||
typedef void joy_polldev_handler( IDirectInputDevice8W *iface );
|
||||
|
||||
typedef struct JoystickGenericImpl
|
||||
@@ -47,6 +50,7 @@ typedef struct JoystickGenericImpl
|
||||
char *name;
|
||||
int device_axis_count; /* Total number of axes in the device */
|
||||
int *axis_map; /* User axes remapping */
|
||||
+ int button_map[MAX_MAP_BUTTONS]; /* User button remapping */
|
||||
LONG deadzone; /* Default dead-zone */
|
||||
|
||||
joy_polldev_handler *joy_polldev;
|
||||
--
|
||||
2.33.0
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [35815] dinput: Allow remapping of joystick buttons.
|
||||
Disabled: True
|
@@ -1,4 +1,4 @@
|
||||
From cb01601870a6299e0da0a956269ef24ed79d5035 Mon Sep 17 00:00:00 2001
|
||||
From 0c01c25728780e3419f37ef612b14cc7e29f65f5 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Mon, 21 May 2018 18:13:00 -0700
|
||||
Subject: [PATCH] dwrite: Use font fallback when mapping characters
|
||||
@@ -11,10 +11,10 @@ Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
3 files changed, 74 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
|
||||
index 6b74a23540a..5827e87fdf5 100644
|
||||
index 7112ca71932..43f8c659bfd 100644
|
||||
--- a/dlls/dwrite/analyzer.c
|
||||
+++ b/dlls/dwrite/analyzer.c
|
||||
@@ -2062,6 +2062,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
@@ -2088,6 +2088,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
IDWriteFont **mapped_font)
|
||||
{
|
||||
const struct fallback_mapping *mapping;
|
||||
@@ -22,7 +22,7 @@ index 6b74a23540a..5827e87fdf5 100644
|
||||
HRESULT hr;
|
||||
UINT32 i;
|
||||
|
||||
@@ -2073,9 +2074,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
@@ -2099,9 +2100,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ index 6b74a23540a..5827e87fdf5 100644
|
||||
weight, style, stretch, mapped_font);
|
||||
if (hr == S_OK) {
|
||||
TRACE("Created fallback font using family %s.\n", debugstr_w(mapping->families[i]));
|
||||
@@ -2132,32 +2139,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
|
||||
@@ -2158,32 +2165,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
|
||||
|
||||
if (basefamily && *basefamily) {
|
||||
hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
|
||||
@@ -121,13 +121,13 @@ index 6b74a23540a..5827e87fdf5 100644
|
||||
+ }
|
||||
+
|
||||
done:
|
||||
heap_free(buff);
|
||||
free(buff);
|
||||
return hr;
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 99048b97a3c..64d8eef6f59 100644
|
||||
index f28c71082c0..9a884824b76 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -958,6 +958,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
@@ -964,6 +964,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
goto fatal;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ index 99048b97a3c..64d8eef6f59 100644
|
||||
IDWriteFont_Release(font);
|
||||
if (FAILED(hr)) {
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index cea581a0bef..ecefbe9c87a 100644
|
||||
index a1bff0d26d6..929d6ec1cc2 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3368,35 +3368,23 @@ todo_wine
|
||||
@@ -268,7 +268,7 @@ index cea581a0bef..ecefbe9c87a 100644
|
||||
|
||||
exists = FALSE;
|
||||
hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
|
||||
@@ -6564,34 +6540,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
@@ -6669,34 +6645,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
@@ -304,5 +304,5 @@ index cea581a0bef..ecefbe9c87a 100644
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d6b29a6153e786ff7a79bdbb7c33977e19c6e267 Mon Sep 17 00:00:00 2001
|
||||
From 2cee55344dd3bef2ed548d2dff275612021e8641 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 10:44:49 -0500
|
||||
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
|
||||
@@ -7,109 +7,15 @@ We use ppoll() instead of poll() for the better time granularity.
|
||||
|
||||
Although perhaps we shouldn't since the server doesn't do this.
|
||||
---
|
||||
configure | 68 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
configure.ac | 12 ++++++++
|
||||
include/config.h.in | 9 ++++++
|
||||
3 files changed, 89 insertions(+)
|
||||
configure.ac | 12 ++++++++++++
|
||||
include/config.h.in | 9 +++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ec425d91f63..200b42b7fe7 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7525,6 +7525,7 @@ for ac_header in \
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
+ sys/eventfd.h \
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -17912,6 +17913,7 @@ for ac_func in \
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
posix_fallocate \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
proc_pidinfo \
|
||||
setproctitle \
|
||||
@@ -18255,6 +18257,72 @@ fi
|
||||
;;
|
||||
esac
|
||||
|
||||
+if test "$ac_cv_header_sys_mman_h" = "yes" -a "x$RT_LIBS" = "x"
|
||||
+then
|
||||
+ ac_save_LIBS=$LIBS
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
|
||||
+$as_echo_n "checking for library containing shm_open... " >&6; }
|
||||
+if ${ac_cv_search_shm_open+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_func_search_save_LIBS=$LIBS
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char shm_open ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return shm_open ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+for ac_lib in '' rt; do
|
||||
+ if test -z "$ac_lib"; then
|
||||
+ ac_res="none required"
|
||||
+ else
|
||||
+ ac_res=-l$ac_lib
|
||||
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
+ fi
|
||||
+ if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_search_shm_open=$ac_res
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext
|
||||
+ if ${ac_cv_search_shm_open+:} false; then :
|
||||
+ break
|
||||
+fi
|
||||
+done
|
||||
+if ${ac_cv_search_shm_open+:} false; then :
|
||||
+
|
||||
+else
|
||||
+ ac_cv_search_shm_open=no
|
||||
+fi
|
||||
+rm conftest.$ac_ext
|
||||
+LIBS=$ac_func_search_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
|
||||
+$as_echo "$ac_cv_search_shm_open" >&6; }
|
||||
+ac_res=$ac_cv_search_shm_open
|
||||
+if test "$ac_res" != no; then :
|
||||
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
+
|
||||
+$as_echo "#define HAVE_SHM_OPEN 1" >>confdefs.h
|
||||
+
|
||||
+ test "$ac_res" = "none required" || RT_LIBS="$ac_res"
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+LIBS=$ac_save_LIBS
|
||||
+
|
||||
if test "x$with_ldap" != "xno"
|
||||
then
|
||||
if ${LDAP_CFLAGS:+false} :; then :
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 718ab1ca50e..d5f82ad2af4 100644
|
||||
index 4d3c2fab566..2b26e892b08 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -496,6 +496,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -481,6 +481,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
@@ -117,15 +23,15 @@ index 718ab1ca50e..d5f82ad2af4 100644
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -2158,6 +2159,7 @@ AC_CHECK_FUNCS(\
|
||||
@@ -1959,6 +1960,7 @@ AC_CHECK_FUNCS(\
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
posix_fallocate \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
proc_pidinfo \
|
||||
renameat \
|
||||
@@ -2199,6 +2201,16 @@ case $host_os in
|
||||
sched_yield \
|
||||
@@ -2001,6 +2003,16 @@ case $host_os in
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -143,10 +49,10 @@ index 718ab1ca50e..d5f82ad2af4 100644
|
||||
if test "x$with_ldap" != "xno"
|
||||
then
|
||||
diff --git a/include/config.h.in b/include/config.h.in
|
||||
index e975ca8a55d..a19789dad8c 100644
|
||||
index 0fe50e8ce7c..48dae80850d 100644
|
||||
--- a/include/config.h.in
|
||||
+++ b/include/config.h.in
|
||||
@@ -474,6 +474,9 @@
|
||||
@@ -398,6 +398,9 @@
|
||||
/* Define to 1 if you have the `posix_fallocate' function. */
|
||||
#undef HAVE_POSIX_FALLOCATE
|
||||
|
||||
@@ -156,7 +62,7 @@ index e975ca8a55d..a19789dad8c 100644
|
||||
/* Define to 1 if you have the `prctl' function. */
|
||||
#undef HAVE_PRCTL
|
||||
|
||||
@@ -546,6 +549,9 @@
|
||||
@@ -473,6 +476,9 @@
|
||||
/* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */
|
||||
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
|
||||
|
||||
@@ -166,7 +72,7 @@ index e975ca8a55d..a19789dad8c 100644
|
||||
/* Define if sigaddset is supported */
|
||||
#undef HAVE_SIGADDSET
|
||||
|
||||
@@ -695,6 +701,9 @@
|
||||
@@ -625,6 +631,9 @@
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#undef HAVE_SYS_EPOLL_H
|
||||
|
||||
|
@@ -53,7 +53,7 @@ index 00000000000..a571855c70a
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
+
|
||||
+
|
||||
+#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
|
@@ -1,27 +1,34 @@
|
||||
From f260254e168fbaad0321273037762e218eb6b7a6 Mon Sep 17 00:00:00 2001
|
||||
From 153efcdc01d57fc29c6d1e80eda52f43666b34a6 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 14:57:42 -0500
|
||||
Subject: [PATCH] ntdll: Implement waiting on manual-reset events.
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/esync.c | 22 +++++++++++++++++-----
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
dlls/ntdll/unix/esync.c | 26 ++++++++++++++++++--------
|
||||
1 file changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 97d468b2449..4f993689e0d 100644
|
||||
index 97d468b2449..d58cb6c1ee2 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -483,12 +483,24 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -38,9 +38,7 @@
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
-#ifdef HAVE_SYS_POLL_H
|
||||
-# include <sys/poll.h>
|
||||
-#endif
|
||||
+#include <poll.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
@@ -483,12 +481,24 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
- if ((size = read( fds[i].fd, &value, sizeof(value) )) == sizeof(value))
|
||||
+ if (obj->type == ESYNC_MANUAL_EVENT)
|
||||
{
|
||||
- /* We found our object. */
|
||||
- TRACE("Woken up by handle %p [%d].\n", handles[i], i);
|
||||
- update_grabbed_object( obj );
|
||||
- return i;
|
||||
+ {
|
||||
+ /* Don't grab the object, just check if it's signaled. */
|
||||
+ if (fds[i].revents & POLLIN)
|
||||
+ {
|
||||
@@ -30,7 +37,11 @@ index 97d468b2449..4f993689e0d 100644
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
{
|
||||
- /* We found our object. */
|
||||
- TRACE("Woken up by handle %p [%d].\n", handles[i], i);
|
||||
- update_grabbed_object( obj );
|
||||
- return i;
|
||||
+ if ((size = read( fds[i].fd, &value, sizeof(value) )) == sizeof(value))
|
||||
+ {
|
||||
+ /* We found our object. */
|
||||
@@ -42,5 +53,5 @@ index 97d468b2449..4f993689e0d 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e5140396b7787d48d39f0b47876022c64fc1c2c7 Mon Sep 17 00:00:00 2001
|
||||
From 96bd1ab47a39d621c5f63264fb4bc415164d371c Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Fri, 10 Apr 2020 18:47:18 +0200
|
||||
Subject: [PATCH] kernelbase: Implement sortkey generation on official tables
|
||||
@@ -10,10 +10,10 @@ Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
|
||||
2 files changed, 413 insertions(+), 123 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
|
||||
index c65c2cce3f2..a5d88288f27 100644
|
||||
index 94c9ce3ad1b..8447e67486c 100644
|
||||
--- a/dlls/kernel32/tests/locale.c
|
||||
+++ b/dlls/kernel32/tests/locale.c
|
||||
@@ -2697,6 +2697,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
|
||||
@@ -2560,6 +2560,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
|
||||
lstrlenW(symbols_stripped) + 1, ret);
|
||||
ok(!lstrcmpW(buf, symbols_stripped), "%s string comparison mismatch\n", func_name);
|
||||
|
||||
@@ -27,7 +27,7 @@ index c65c2cce3f2..a5d88288f27 100644
|
||||
/* test srclen = 0 */
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = func_ptr(0, upper_case, 0, buf, ARRAY_SIZE(buf));
|
||||
@@ -3126,6 +3133,135 @@ static void test_sorting(void)
|
||||
@@ -2989,6 +2996,135 @@ static void test_sorting(void)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,14 +163,16 @@ index c65c2cce3f2..a5d88288f27 100644
|
||||
static void test_FoldStringA(void)
|
||||
{
|
||||
int ret, i, j;
|
||||
@@ -7191,4 +7327,5 @@ START_TEST(locale)
|
||||
@@ -7201,6 +7337,7 @@ START_TEST(locale)
|
||||
test_NLSVersion();
|
||||
test_geo_name();
|
||||
test_sorting();
|
||||
+ test_unicode_sorting();
|
||||
}
|
||||
test_EnumCalendarInfoA();
|
||||
test_EnumCalendarInfoW();
|
||||
test_EnumCalendarInfoExA();
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index 89b35775053..5da87e065f1 100644
|
||||
index 667d1a4dc65..095e0a68558 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -2164,127 +2164,6 @@ static int wcstombs_codepage( UINT codepage, DWORD flags, const WCHAR *src, int
|
||||
@@ -582,7 +584,7 @@ index 89b35775053..5da87e065f1 100644
|
||||
|
||||
static const struct geoinfo *get_geoinfo_ptr( GEOID geoid )
|
||||
{
|
||||
@@ -5303,8 +5456,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
|
||||
@@ -5302,8 +5455,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
|
||||
TRACE( "(%s,0x%08x,%s,%d,%p,%d)\n",
|
||||
debugstr_w(locale), flags, debugstr_wn(src, srclen), srclen, dst, dstlen );
|
||||
|
||||
@@ -594,5 +596,5 @@ index 89b35775053..5da87e065f1 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0572bef41d224ebb69c6c3fd647bddf844a3a29d Mon Sep 17 00:00:00 2001
|
||||
From fb1dbda120ff9777832d125ad31fee292fdd2123 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 9 Jul 2019 14:13:28 +1000
|
||||
Subject: [PATCH] user32: Do not enumerate the registry in
|
||||
@@ -7,70 +7,28 @@ Subject: [PATCH] user32: Do not enumerate the registry in
|
||||
This function returns the current list of *installed* Keyboard layouts
|
||||
not the complete list from the registry.
|
||||
---
|
||||
dlls/user32/input.c | 32 +++-----------------------------
|
||||
dlls/user32/input.c | 1 -
|
||||
dlls/user32/tests/input.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 38 insertions(+), 29 deletions(-)
|
||||
dlls/win32u/input.c | 33 +--------------------------------
|
||||
3 files changed, 36 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 97be83369d9..42145c13105 100644
|
||||
index 08a00c0e647..ae496e5d703 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -1336,9 +1336,7 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
|
||||
*/
|
||||
UINT WINAPI GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
- WCHAR klid[KL_NAMELENGTH], value[5];
|
||||
- DWORD value_size, count, tmp, i = 0;
|
||||
- HKEY hkey;
|
||||
+ DWORD count;
|
||||
HKL layout;
|
||||
|
||||
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
|
||||
@@ -1346,37 +1344,13 @@ UINT WINAPI GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
if ((count = USER_Driver->pGetKeyboardLayoutList( size, layouts )) != ~0) return count;
|
||||
|
||||
layout = get_locale_kbd_layout();
|
||||
- count = 0;
|
||||
|
||||
- count++;
|
||||
if (size && layouts)
|
||||
{
|
||||
- layouts[count - 1] = layout;
|
||||
- if (count == size) return count;
|
||||
+ layouts[0] = layout;
|
||||
}
|
||||
|
||||
- if (!RegOpenKeyW( HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Control\\Keyboard Layouts", &hkey ))
|
||||
- {
|
||||
- while (!RegEnumKeyW( hkey, i++, klid, ARRAY_SIZE(klid) ))
|
||||
- {
|
||||
- tmp = wcstoul( klid, NULL, 16 );
|
||||
- value_size = sizeof(value);
|
||||
- if (!RegGetValueW( hkey, klid, L"Layout Id", RRF_RT_REG_SZ, NULL, (void *)&value, &value_size ))
|
||||
- tmp = MAKELONG( LOWORD( tmp ), 0xf000 | (wcstoul( value, NULL, 16 ) & 0xfff) );
|
||||
-
|
||||
- if (layout == UlongToHandle( tmp )) continue;
|
||||
-
|
||||
- count++;
|
||||
- if (size && layouts)
|
||||
- {
|
||||
- layouts[count - 1] = UlongToHandle( tmp );
|
||||
- if (count == size) break;
|
||||
- }
|
||||
- }
|
||||
- RegCloseKey( hkey );
|
||||
- }
|
||||
-
|
||||
- return count;
|
||||
+ return 1;
|
||||
@@ -809,7 +809,6 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
-
|
||||
/***********************************************************************
|
||||
* RegisterHotKey (USER32.@)
|
||||
*/
|
||||
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
|
||||
index c4c361575cd..070c22a4349 100644
|
||||
index 79f3dfc3dc0..b3c1bd560ae 100644
|
||||
--- a/dlls/user32/tests/input.c
|
||||
+++ b/dlls/user32/tests/input.c
|
||||
@@ -4363,6 +4363,40 @@ static void test_SendInput(void)
|
||||
@@ -4481,6 +4481,40 @@ static void test_SendInput(void)
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
|
||||
@@ -111,7 +69,7 @@ index c4c361575cd..070c22a4349 100644
|
||||
START_TEST(input)
|
||||
{
|
||||
char **argv;
|
||||
@@ -4405,6 +4439,7 @@ START_TEST(input)
|
||||
@@ -4523,6 +4557,7 @@ START_TEST(input)
|
||||
test_GetRawInputBuffer();
|
||||
test_RegisterRawInputDevices();
|
||||
test_rawinput(argv[0]);
|
||||
@@ -119,6 +77,57 @@ index c4c361575cd..070c22a4349 100644
|
||||
|
||||
if(pGetMouseMovePointsEx)
|
||||
test_GetMouseMovePointsEx(argv[0]);
|
||||
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
|
||||
index 90a77639d1a..1fe2fb88911 100644
|
||||
--- a/dlls/win32u/input.c
|
||||
+++ b/dlls/win32u/input.c
|
||||
@@ -621,11 +621,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
*/
|
||||
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
- char buffer[4096];
|
||||
- KEY_NODE_INFORMATION *key_info = (KEY_NODE_INFORMATION *)buffer;
|
||||
- KEY_VALUE_PARTIAL_INFORMATION *value_info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
|
||||
- DWORD count, tmp, i = 0;
|
||||
- HKEY hkey, subkey;
|
||||
+ DWORD count;
|
||||
HKL layout;
|
||||
|
||||
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
|
||||
@@ -639,33 +635,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
if (size && layouts)
|
||||
{
|
||||
layouts[count - 1] = layout;
|
||||
- if (count == size) return count;
|
||||
- }
|
||||
-
|
||||
- if ((hkey = reg_open_key( NULL, keyboard_layouts_keyW, sizeof(keyboard_layouts_keyW) )))
|
||||
- {
|
||||
- while (!NtEnumerateKey( hkey, i++, KeyNodeInformation, key_info,
|
||||
- sizeof(buffer) - sizeof(WCHAR), &tmp ))
|
||||
- {
|
||||
- if (!(subkey = reg_open_key( hkey, key_info->Name, key_info->NameLength ))) continue;
|
||||
- key_info->Name[key_info->NameLength / sizeof(WCHAR)] = 0;
|
||||
- tmp = wcstoul( key_info->Name, NULL, 16 );
|
||||
- if (query_reg_ascii_value( subkey, "Layout Id", value_info, sizeof(buffer) ) &&
|
||||
- value_info->Type == REG_SZ)
|
||||
- tmp = MAKELONG( LOWORD( tmp ),
|
||||
- 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff) );
|
||||
- NtClose( subkey );
|
||||
-
|
||||
- if (layout == UlongToHandle( tmp )) continue;
|
||||
-
|
||||
- count++;
|
||||
- if (size && layouts)
|
||||
- {
|
||||
- layouts[count - 1] = UlongToHandle( tmp );
|
||||
- if (count == size) break;
|
||||
- }
|
||||
- }
|
||||
- NtClose( hkey );
|
||||
}
|
||||
|
||||
return count;
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0a08aa6899527ecb02171b95e777d0549489fe3f Mon Sep 17 00:00:00 2001
|
||||
From e6e95fe8edfaa85796f533f3f7a485bc721fe930 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 30 Mar 2015 04:01:51 +0200
|
||||
Subject: [PATCH] mountmgr.sys: Write usable device paths into
|
||||
@@ -15,10 +15,10 @@ Based on a patch by Bernhard Übelacker.
|
||||
3 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
|
||||
index c8e7d6bf088..426187a4512 100644
|
||||
index fc32b57cf70..4d837315311 100644
|
||||
--- a/dlls/mountmgr.sys/device.c
|
||||
+++ b/dlls/mountmgr.sys/device.c
|
||||
@@ -1205,8 +1205,8 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive,
|
||||
@@ -1083,8 +1083,8 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive,
|
||||
id = disk_device->unix_mount;
|
||||
id_len = strlen( disk_device->unix_mount ) + 1;
|
||||
}
|
||||
@@ -30,12 +30,12 @@ index c8e7d6bf088..426187a4512 100644
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
|
||||
index 50be9eb740f..6667d214560 100644
|
||||
index 2e3ff80c36a..6898bb98c62 100644
|
||||
--- a/dlls/mountmgr.sys/mountmgr.c
|
||||
+++ b/dlls/mountmgr.sys/mountmgr.c
|
||||
@@ -55,14 +55,21 @@ struct mount_point
|
||||
static struct list mount_points_list = LIST_INIT(mount_points_list);
|
||||
static HKEY mount_key;
|
||||
@@ -52,14 +52,21 @@ static HKEY mount_key;
|
||||
|
||||
unixlib_handle_t mountmgr_handle = 0;
|
||||
|
||||
-void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len )
|
||||
+void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len, int drive )
|
||||
@@ -58,10 +58,10 @@ index 50be9eb740f..6667d214560 100644
|
||||
else mount->id_len = 0;
|
||||
}
|
||||
diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h
|
||||
index 85c58062275..3454b1a8c73 100644
|
||||
index 0297f6f11fe..b347a9cef6a 100644
|
||||
--- a/dlls/mountmgr.sys/mountmgr.h
|
||||
+++ b/dlls/mountmgr.sys/mountmgr.h
|
||||
@@ -106,7 +106,8 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD
|
||||
@@ -110,6 +110,7 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD
|
||||
extern struct mount_point *add_volume_mount_point( DEVICE_OBJECT *device, UNICODE_STRING *device_name,
|
||||
const GUID *guid ) DECLSPEC_HIDDEN;
|
||||
extern void delete_mount_point( struct mount_point *mount ) DECLSPEC_HIDDEN;
|
||||
@@ -69,8 +69,7 @@ index 85c58062275..3454b1a8c73 100644
|
||||
+
|
||||
+extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len, int drive ) DECLSPEC_HIDDEN;
|
||||
|
||||
extern ULONG get_dhcp_request_param( const NET_LUID *adapter, struct mountmgr_dhcp_request_param *param, char *buf,
|
||||
ULONG offset, ULONG size ) DECLSPEC_HIDDEN;
|
||||
#endif /* __WINE_MOUNTMGR_H */
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,3 +1,2 @@
|
||||
Fixes: [48175] AION (64 bit) - crashes in crysystem.dll.CryFree() due to high memory pointers allocated
|
||||
Fixes: [46568] 64-bit msxml6.dll from Microsoft Core XML Services 6.0 redist package fails to load (Wine doesn't respect 44-bit user-mode VA limitation from Windows < 8.1)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user