diff --git a/patches/dinput-joy-mappings/0002-dinput-Allow-empty-Joystick-mappings.patch b/patches/dinput-joy-mappings/0002-dinput-Allow-empty-Joystick-mappings.patch index 7669b10e..398b79af 100644 --- a/patches/dinput-joy-mappings/0002-dinput-Allow-empty-Joystick-mappings.patch +++ b/patches/dinput-joy-mappings/0002-dinput-Allow-empty-Joystick-mappings.patch @@ -1,7 +1,7 @@ -From 2d063452209d8b531a2b13ded0ea9b0eac8925fa Mon Sep 17 00:00:00 2001 +From bce769d9179ffbcbc634e73ad124528e28c5c7a8 Mon Sep 17 00:00:00 2001 From: Jetro Jormalainen Date: Tue, 30 Apr 2019 09:20:54 +1000 -Subject: [PATCH 2/3] dinput: Allow empty Joystick mappings. +Subject: [PATCH] dinput: Allow empty Joystick mappings. --- dlls/dinput/device.c | 82 ++++++++++++++++++++++++++++++------- @@ -12,7 +12,7 @@ Subject: [PATCH 2/3] dinput: Allow empty Joystick mappings. 5 files changed, 125 insertions(+), 15 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c -index d1bf934a82..6107ab2653 100644 +index d1bf934a827..6107ab26538 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -30,6 +30,7 @@ @@ -194,12 +194,12 @@ index d1bf934a82..6107ab2653 100644 This->num_actions = num_actions; diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c -index 8341e0313a..d9f9c59be0 100644 +index 66d6cfdffb9..73215dac0d5 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -847,7 +847,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, else - lstrcpynW(username, lpszUserName, MAX_PATH); + lstrcpynW(username, lpszUserName, size); - load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username); + load_success = load_mapping_settings(&This->base, lpdiaf, username); @@ -216,7 +216,7 @@ index 8341e0313a..d9f9c59be0 100644 HeapFree(GetProcessHeap(), 0, lpszUserNameW); diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c -index b5e665933e..0747f5d8c8 100644 +index b5e665933ec..0747f5d8c8b 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -690,6 +690,8 @@ static HRESULT WINAPI SysKeyboardAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, @@ -229,7 +229,7 @@ index b5e665933e..0747f5d8c8 100644 HeapFree(GetProcessHeap(), 0, lpszUserNameW); diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c -index 52a766b2a1..796f1fa297 100644 +index 52a766b2a1a..796f1fa2977 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -862,6 +862,8 @@ static HRESULT WINAPI SysMouseAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, @@ -242,7 +242,7 @@ index 52a766b2a1..796f1fa297 100644 HeapFree(GetProcessHeap(), 0, lpszUserNameW); diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c -index f3e7b54235..bec2a6b863 100644 +index f3e7b542355..bec2a6b863c 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput8/tests/device.c @@ -38,6 +38,8 @@ struct enum_data { diff --git a/patches/dinput-joy-mappings/0003-dinput-Support-username-in-Config-dialog.patch b/patches/dinput-joy-mappings/0003-dinput-Support-username-in-Config-dialog.patch index c308e844..0386c969 100644 --- a/patches/dinput-joy-mappings/0003-dinput-Support-username-in-Config-dialog.patch +++ b/patches/dinput-joy-mappings/0003-dinput-Support-username-in-Config-dialog.patch @@ -1,14 +1,14 @@ -From 5fb416432e892bed7c216f57f7caf6e6503ca96c Mon Sep 17 00:00:00 2001 +From ed590782f6149f56c0e4c6747cea5a297543047b Mon Sep 17 00:00:00 2001 From: Jetro Jormalainen Date: Tue, 30 Apr 2019 09:21:24 +1000 -Subject: [PATCH 3/3] dinput: Support username in Config dialog. +Subject: [PATCH] dinput: Support username in Config dialog. --- dlls/dinput/config.c | 187 ++++++++++++++++++++++++----------- dlls/dinput/device.c | 2 +- dlls/dinput/device_private.h | 1 + - dlls/dinput/dinput_main.c | 27 +++++ - 4 files changed, 160 insertions(+), 57 deletions(-) + dlls/dinput/dinput_main.c | 28 ++++++ + 4 files changed, 161 insertions(+), 57 deletions(-) diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c index bf44898589..c7a33d2da0 100644 @@ -391,10 +391,18 @@ index ea794d7396..114e3971ed 100644 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 0855cb41cd..6eb7c64c0e 100644 +index 0855cb41cd..7af377026c 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c -@@ -1253,9 +1253,34 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices( +@@ -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" +@@ -1253,9 +1254,34 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices( /* Copy parameters */ diCDParamsW.dwSize = sizeof(DICONFIGUREDEVICESPARAMSW); @@ -429,7 +437,7 @@ index 0855cb41cd..6eb7c64c0e 100644 diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiCDParams->lprgFormats->dwNumActions); _copy_diactionformatAtoW(&diafW, lpdiCDParams->lprgFormats); -@@ -1283,6 +1308,8 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices( +@@ -1283,6 +1309,8 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices( HeapFree(GetProcessHeap(), 0, diafW.rgoAction);