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
59 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2fc92f8ba6 | ||
|
0111d074e6 | ||
|
b4028037d9 | ||
|
e1c496b21e | ||
|
ee4ca71a7f | ||
|
3b01c6e2c5 | ||
|
98c906f843 | ||
|
a43d3ddd1c | ||
|
78d28293de | ||
|
440e5eee17 | ||
|
93e94fcbc0 | ||
|
fa5989b7aa | ||
|
8f579c4eed | ||
|
278310cf80 | ||
|
544f90dacc | ||
|
9937bf0463 | ||
|
155e98e765 | ||
|
2653c32b45 | ||
|
a2fcffc18e | ||
|
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 8528d4181967d00a7711d32bdaf7ecde5fe7208f 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/dinput/tests/device8.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 1dc3c311f2b..63e6abb54eb 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));
|
||||
@@ -357,12 +357,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;
|
||||
@@ -373,8 +387,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
|
||||
@@ -394,7 +411,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
|
||||
@@ -429,7 +448,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
|
||||
@@ -437,7 +456,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
|
||||
@@ -457,15 +476,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 )
|
||||
@@ -1914,13 +1938,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,
|
||||
@@ -1952,6 +1981,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);
|
||||
@@ -1969,6 +2006,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;
|
||||
@@ -2001,12 +2039,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);
|
||||
}
|
||||
|
||||
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
|
||||
index 17deed193dd..3bfb34eb2ca 100644
|
||||
--- a/dlls/dinput8/tests/device.c
|
||||
+++ b/dlls/dinput8/tests/device.c
|
||||
@@ -38,6 +38,8 @@ struct enum_data {
|
||||
obj_df = malloc( sizeof(DIOBJECTDATAFORMAT) * num_actions );
|
||||
diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c
|
||||
index 817e843e33c..ad9ee1f006b 100644
|
||||
--- a/dlls/dinput/tests/device8.c
|
||||
+++ b/dlls/dinput/tests/device8.c
|
||||
@@ -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.34.1
|
||||
|
@@ -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 f2401390227b40c68bb97983fc028d5060a70e8c 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,146 +7,48 @@ 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 | 8 ++++++++
|
||||
include/config.h.in | 9 +++++++++
|
||||
2 files changed, 17 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 9683798b57b..b4465a98794 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -496,6 +496,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -478,6 +478,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
+ sys/eventfd.h \
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -2158,6 +2159,7 @@ AC_CHECK_FUNCS(\
|
||||
sys/link.h \
|
||||
@@ -1991,6 +1992,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 \
|
||||
@@ -2033,6 +2035,12 @@ case $host_os in
|
||||
;;
|
||||
esac
|
||||
|
||||
+dnl Check for shm_open which may be in -lrt
|
||||
+if test "$ac_cv_header_sys_mman_h" = "yes" -a "x$RT_LIBS" = "x"
|
||||
+then
|
||||
+ ac_save_LIBS=$LIBS
|
||||
+ AC_SEARCH_LIBS(shm_open, rt,
|
||||
+ [AC_DEFINE(HAVE_SHM_OPEN, 1, [Define to 1 if you have the `shm_open' function.])
|
||||
+ test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
|
||||
+fi
|
||||
+ac_save_LIBS=$LIBS
|
||||
+AC_SEARCH_LIBS(shm_open, rt,
|
||||
+ [AC_DEFINE(HAVE_SHM_OPEN, 1, [Define to 1 if you have the `shm_open' function.])
|
||||
+ test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
|
||||
+LIBS=$ac_save_LIBS
|
||||
+
|
||||
dnl **** Check for OpenLDAP ***
|
||||
if test "x$with_ldap" != "xno"
|
||||
then
|
||||
diff --git a/include/config.h.in b/include/config.h.in
|
||||
index e975ca8a55d..a19789dad8c 100644
|
||||
index 197c3b97f09..13f822cb36c 100644
|
||||
--- a/include/config.h.in
|
||||
+++ b/include/config.h.in
|
||||
@@ -474,6 +474,9 @@
|
||||
@@ -362,6 +362,9 @@
|
||||
/* Define to 1 if you have the `posix_fallocate' function. */
|
||||
#undef HAVE_POSIX_FALLOCATE
|
||||
|
||||
@@ -156,7 +58,7 @@ index e975ca8a55d..a19789dad8c 100644
|
||||
/* Define to 1 if you have the `prctl' function. */
|
||||
#undef HAVE_PRCTL
|
||||
|
||||
@@ -546,6 +549,9 @@
|
||||
@@ -434,6 +437,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 +68,7 @@ index e975ca8a55d..a19789dad8c 100644
|
||||
/* Define if sigaddset is supported */
|
||||
#undef HAVE_SIGADDSET
|
||||
|
||||
@@ -695,6 +701,9 @@
|
||||
@@ -574,6 +580,9 @@
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#undef HAVE_SYS_EPOLL_H
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2e40c85732d66a427927d26d0d560c835187fcf2 Mon Sep 17 00:00:00 2001
|
||||
From 27524b275c81c1c9057e4b4ca3d9cec734a3bd8a Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 20:09:59 -0500
|
||||
Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
@@ -6,16 +6,16 @@ Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
|
||||
---
|
||||
server/Makefile.in | 1 +
|
||||
server/esync.c | 320 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
server/esync.c | 318 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
server/esync.h | 22 +++
|
||||
server/main.c | 4 +
|
||||
server/protocol.def | 25 +++-
|
||||
5 files changed, 371 insertions(+), 1 deletion(-)
|
||||
5 files changed, 369 insertions(+), 1 deletion(-)
|
||||
create mode 100644 server/esync.c
|
||||
create mode 100644 server/esync.h
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index b58ce1e3002..5f225fd0591 100644
|
||||
index c81a2112632..da20dff9f56 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -11,6 +11,7 @@ C_SRCS = \
|
||||
@@ -28,10 +28,10 @@ index b58ce1e3002..5f225fd0591 100644
|
||||
file.c \
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
new file mode 100644
|
||||
index 00000000000..a571855c70a
|
||||
index 00000000000..b9dbfa322bc
|
||||
--- /dev/null
|
||||
+++ b/server/esync.c
|
||||
@@ -0,0 +1,320 @@
|
||||
@@ -0,0 +1,318 @@
|
||||
+/*
|
||||
+ * eventfd-based synchronization objects
|
||||
+ *
|
||||
@@ -53,7 +53,7 @@ index 00000000000..a571855c70a
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
+
|
||||
+
|
||||
+#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
@@ -61,9 +61,7 @@ index 00000000000..a571855c70a
|
||||
+#ifdef HAVE_SYS_EVENTFD_H
|
||||
+# include <sys/eventfd.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_MMAN_H
|
||||
+# include <sys/mman.h>
|
||||
+#endif
|
||||
+#include <sys/mman.h>
|
||||
+#ifdef HAVE_SYS_STAT_H
|
||||
+# include <sys/stat.h>
|
||||
+#endif
|
||||
@@ -381,10 +379,10 @@ index 00000000000..7ca4ca89394
|
||||
+extern int do_esync(void);
|
||||
+void esync_init(void);
|
||||
diff --git a/server/main.c b/server/main.c
|
||||
index dae08339874..f68888d0fa8 100644
|
||||
index a134d811d82..3436b0871b4 100644
|
||||
--- a/server/main.c
|
||||
+++ b/server/main.c
|
||||
@@ -37,6 +37,7 @@
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "thread.h"
|
||||
#include "request.h"
|
||||
#include "unicode.h"
|
||||
@@ -392,7 +390,7 @@ index dae08339874..f68888d0fa8 100644
|
||||
|
||||
/* command-line options */
|
||||
int debug_level = 0;
|
||||
@@ -141,6 +142,9 @@ int main( int argc, char *argv[] )
|
||||
@@ -229,6 +230,9 @@ int main( int argc, char *argv[] )
|
||||
sock_init();
|
||||
open_master_socket();
|
||||
|
||||
@@ -403,10 +401,10 @@ index dae08339874..f68888d0fa8 100644
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 10da65be735..22050c65f06 100644
|
||||
index c413cc7d7bb..607d56a666c 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3690,7 +3690,6 @@ struct handle_info
|
||||
@@ -3733,7 +3733,6 @@ struct handle_info
|
||||
obj_handle_t handle; /* process handle */
|
||||
@END
|
||||
|
||||
@@ -414,7 +412,7 @@ index 10da65be735..22050c65f06 100644
|
||||
/* Iterate thread list for process */
|
||||
@REQ(get_next_thread)
|
||||
obj_handle_t process; /* process handle */
|
||||
@@ -3701,3 +3700,27 @@ struct handle_info
|
||||
@@ -3744,3 +3743,27 @@ struct handle_info
|
||||
@REPLY
|
||||
obj_handle_t handle; /* next thread handle */
|
||||
@END
|
||||
@@ -443,5 +441,5 @@ index 10da65be735..22050c65f06 100644
|
||||
+ unsigned int shm_idx;
|
||||
+@END
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,25 +1,25 @@
|
||||
From b569bf796e685232a6858b1daa2950408c422adf Mon Sep 17 00:00:00 2001
|
||||
From c204c9ed2a8504868c3cbf487e7a29c4e7254d3f Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:09:22 -0500
|
||||
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
|
||||
---
|
||||
dlls/ntdll/Makefile.in | 1 +
|
||||
dlls/ntdll/unix/esync.c | 273 +++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/unix/esync.c | 271 +++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/unix/esync.h | 35 +++++
|
||||
dlls/ntdll/unix/loader.c | 2 +
|
||||
dlls/ntdll/unix/server.c | 4 +-
|
||||
dlls/ntdll/unix/sync.c | 4 +
|
||||
server/esync.c | 1 +
|
||||
7 files changed, 318 insertions(+), 2 deletions(-)
|
||||
7 files changed, 316 insertions(+), 2 deletions(-)
|
||||
create mode 100644 dlls/ntdll/unix/esync.c
|
||||
create mode 100644 dlls/ntdll/unix/esync.h
|
||||
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index aac7f8eead7..7ea80f19481 100644
|
||||
index 185bc563e68..d7c757cab32 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -45,6 +45,7 @@ C_SRCS = \
|
||||
@@ -46,6 +46,7 @@ C_SRCS = \
|
||||
unix/cdrom.c \
|
||||
unix/debug.c \
|
||||
unix/env.c \
|
||||
@@ -29,10 +29,10 @@ index aac7f8eead7..7ea80f19481 100644
|
||||
unix/loadorder.c \
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
new file mode 100644
|
||||
index 00000000000..7c409c7a9ca
|
||||
index 00000000000..9e1ef7d8afd
|
||||
--- /dev/null
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -0,0 +1,273 @@
|
||||
@@ -0,0 +1,271 @@
|
||||
+/*
|
||||
+ * eventfd-based synchronization objects
|
||||
+ *
|
||||
@@ -64,9 +64,7 @@ index 00000000000..7c409c7a9ca
|
||||
+#include <fcntl.h>
|
||||
+#include <stdarg.h>
|
||||
+#include <stdlib.h>
|
||||
+#ifdef HAVE_SYS_MMAN_H
|
||||
+# include <sys/mman.h>
|
||||
+#endif
|
||||
+#include <sys/mman.h>
|
||||
+#ifdef HAVE_SYS_STAT_H
|
||||
+# include <sys/stat.h>
|
||||
+#endif
|
||||
@@ -348,10 +346,10 @@ index 00000000000..a50a755149a
|
||||
+
|
||||
+extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index dfc0d4c9a09..310556948aa 100644
|
||||
index 10884a7a673..28cc48e04bf 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -86,6 +86,7 @@
|
||||
@@ -89,6 +89,7 @@
|
||||
#include "winioctl.h"
|
||||
#include "winternl.h"
|
||||
#include "unix_private.h"
|
||||
@@ -359,7 +357,7 @@ index dfc0d4c9a09..310556948aa 100644
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -2190,6 +2191,7 @@ static void start_main_thread(void)
|
||||
@@ -2082,6 +2083,7 @@ static void start_main_thread(void)
|
||||
signal_init_thread( teb );
|
||||
dbg_init();
|
||||
startup_info_size = server_init_process();
|
||||
@@ -368,19 +366,19 @@ index dfc0d4c9a09..310556948aa 100644
|
||||
init_cpu_info();
|
||||
init_files();
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index 53d34e1858a..43b470fc10a 100644
|
||||
index 6a3224d8385..de65f936a59 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -114,7 +114,7 @@ timeout_t server_start_time = 0; /* time of server startup */
|
||||
sigset_t server_block_set; /* signals to block during server calls */
|
||||
@@ -106,7 +106,7 @@ sigset_t server_block_set; /* signals to block during server calls */
|
||||
static int fd_socket = -1; /* socket to exchange file descriptors with the server */
|
||||
static int initial_cwd = -1;
|
||||
static pid_t server_pid;
|
||||
-static pthread_mutex_t fd_cache_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
+pthread_mutex_t fd_cache_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/* atomically exchange a 64-bit value */
|
||||
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
|
||||
@@ -828,7 +828,7 @@ void wine_server_send_fd( int fd )
|
||||
@@ -803,7 +803,7 @@ void wine_server_send_fd( int fd )
|
||||
*
|
||||
* Receive a file descriptor passed from the server.
|
||||
*/
|
||||
@@ -390,10 +388,10 @@ index 53d34e1858a..43b470fc10a 100644
|
||||
struct iovec vec;
|
||||
struct msghdr msghdr;
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 86a836a908f..871fe7fb42e 100644
|
||||
index 442243d8bcf..72cbf92f93c 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -71,6 +71,7 @@
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "wine/server.h"
|
||||
#include "wine/debug.h"
|
||||
#include "unix_private.h"
|
||||
@@ -401,7 +399,7 @@ index 86a836a908f..871fe7fb42e 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
|
||||
@@ -324,6 +325,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
|
||||
@@ -262,6 +263,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
|
||||
if (max <= 0 || initial < 0 || initial > max) return STATUS_INVALID_PARAMETER;
|
||||
if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret;
|
||||
|
||||
@@ -412,10 +410,10 @@ index 86a836a908f..871fe7fb42e 100644
|
||||
{
|
||||
req->access = access;
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index a571855c70a..e41bbbf9349 100644
|
||||
index b9dbfa322bc..99e57eca44c 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "handle.h"
|
||||
#include "request.h"
|
||||
#include "file.h"
|
||||
@@ -424,5 +422,5 @@ index a571855c70a..e41bbbf9349 100644
|
||||
int do_esync(void)
|
||||
{
|
||||
--
|
||||
2.33.0
|
||||
2.34.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e5a3456cde339352e78b10fed8a2fc65ca560041 Mon Sep 17 00:00:00 2001
|
||||
From 4c255f91363e09892de43bf5f3b991ef5ccce3b2 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:16:34 -0500
|
||||
Subject: [PATCH] ntdll: Implement NtReleaseSemaphore().
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement NtReleaseSemaphore().
|
||||
3 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 7c409c7a9ca..8f28a36d93f 100644
|
||||
index 9e1ef7d8afd..c7320d78bd3 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -28,6 +28,7 @@
|
||||
@@ -19,9 +19,9 @@ index 7c409c7a9ca..8f28a36d93f 100644
|
||||
#include <stdarg.h>
|
||||
+#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
@@ -173,6 +174,16 @@ static struct esync *add_to_list( HANDLE handle, enum esync_type type, int fd, v
|
||||
#include <sys/mman.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
@@ -171,6 +172,16 @@ static struct esync *add_to_list( HANDLE handle, enum esync_type type, int fd, v
|
||||
return &esync_list[entry][idx];
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index 7c409c7a9ca..8f28a36d93f 100644
|
||||
static NTSTATUS create_esync( enum esync_type type, HANDLE *handle, ACCESS_MASK access,
|
||||
const OBJECT_ATTRIBUTES *attr, int initval, int max )
|
||||
{
|
||||
@@ -228,6 +239,38 @@ extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
|
||||
@@ -226,6 +237,38 @@ extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
|
||||
return create_esync( ESYNC_SEMAPHORE, handle, access, attr, initial, max );
|
||||
}
|
||||
|
||||
@@ -90,10 +90,10 @@ index a50a755149a..09838e95535 100644
|
||||
|
||||
/* We have to synchronize on the fd cache mutex so that our calls to receive_fd
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 663a170fc61..f4bcda4b473 100644
|
||||
index 72cbf92f93c..db992f3a9ad 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -407,6 +407,9 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, ULONG *previous
|
||||
@@ -348,6 +348,9 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, ULONG *previous
|
||||
{
|
||||
NTSTATUS ret;
|
||||
|
||||
@@ -104,5 +104,5 @@ index 663a170fc61..f4bcda4b473 100644
|
||||
{
|
||||
req->handle = wine_server_obj_handle( handle );
|
||||
--
|
||||
2.28.0
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 908363daafc3b5220967d31e2e878f617d465026 Mon Sep 17 00:00:00 2001
|
||||
From e6666b78dbd54b0017de39c85f06900503780110 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:34:42 -0500
|
||||
Subject: [PATCH] ntdll: Implement NtWaitForMultipleObjects().
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Implement NtWaitForMultipleObjects().
|
||||
3 files changed, 180 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 02b07bf36be..1b71105491c 100644
|
||||
index f111342688e..dac49af3083 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -22,17 +22,25 @@
|
||||
@@ -22,6 +22,8 @@
|
||||
#pragma makedep unix
|
||||
#endif
|
||||
|
||||
@@ -22,24 +22,20 @@ index 02b07bf36be..1b71105491c 100644
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#ifdef HAVE_POLL_H
|
||||
+#include <poll.h>
|
||||
+#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
+#ifdef HAVE_SYS_POLL_H
|
||||
+# include <sys/poll.h>
|
||||
+#endif
|
||||
@@ -34,6 +36,12 @@
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
@@ -289,6 +297,168 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev )
|
||||
+#ifdef HAVE_POLL_H
|
||||
+#include <poll.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_POLL_H
|
||||
+# include <sys/poll.h>
|
||||
+#endif
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -287,6 +295,168 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev )
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -223,10 +219,10 @@ index 14e52416764..87516e7597a 100644
|
||||
/* We have to synchronize on the fd cache mutex so that our calls to receive_fd
|
||||
* don't race with theirs. It looks weird, I know.
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index f4bcda4b473..445c2a4324d 100644
|
||||
index db992f3a9ad..bc643558a28 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -1273,6 +1273,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO
|
||||
@@ -1410,6 +1410,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO
|
||||
|
||||
if (!count || count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1;
|
||||
|
||||
@@ -241,5 +237,5 @@ index f4bcda4b473..445c2a4324d 100644
|
||||
select_op.wait.op = wait_any ? SELECT_WAIT : SELECT_WAIT_ALL;
|
||||
for (i = 0; i < count; i++) select_op.wait.handles[i] = wine_server_obj_handle( handles[i] );
|
||||
--
|
||||
2.28.0
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,27 +1,36 @@
|
||||
From f260254e168fbaad0321273037762e218eb6b7a6 Mon Sep 17 00:00:00 2001
|
||||
From 4a9eff3f22bfe2c6463e3064ec862617d5dd07d7 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 | 27 +++++++++++++++++----------
|
||||
1 file changed, 17 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 97d468b2449..4f993689e0d 100644
|
||||
index 80eb3773ee4..f4c27796189 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
|
||||
@@ -36,12 +36,7 @@
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
-#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
-#endif
|
||||
-#ifdef HAVE_SYS_POLL_H
|
||||
-# include <sys/poll.h>
|
||||
-#endif
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -481,12 +476,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 +39,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 +55,5 @@ index 97d468b2449..4f993689e0d 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
2.33.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user