Updated mailing-list-patches patchset

This commit is contained in:
Alistair Leslie-Hughes 2019-07-26 10:02:37 +10:00
parent aad0b50e62
commit 4413770af1
4 changed files with 382 additions and 3 deletions

View File

@ -0,0 +1,196 @@
From 1314e270775e87af88a0e8a08f66877321fe1a4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristj=C3=A1n=20Gerhardsson?= <kristjang@ccpgames.com>
Date: Thu, 18 Jul 2019 18:04:24 +0000
Subject: [PATCH 1/3] Add a list of mac relevant graphics cards.
Signed-off-by: Kristjan Gerhardsson <kristjang at ccpgames.com>
---
dlls/wined3d/adapter_gl.c | 2 +-
dlls/wined3d/directx.c | 15 ++++++++++++++-
dlls/wined3d/wined3d_private.h | 15 ++++++++++++++-
3 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 142e975cbe8..f74a8a79b6f 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -1642,7 +1642,7 @@ cards_intel[] =
/* Haswell */
{"Iris Pro 5200", CARD_INTEL_IP5200_1},
{"Iris 5100", CARD_INTEL_I5100_1},
- {"HD Graphics 5000", CARD_INTEL_HD5000}, /* MacOS */
+ {"HD Graphics 5000", CARD_INTEL_HD5000_1}, /* MacOS */
{"Haswell Mobile", CARD_INTEL_HWM},
{"Iris OpenGL Engine", CARD_INTEL_HWM}, /* MacOS */
/* Ivybridge */
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index a8ba9b4f412..ae24de6906f 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -278,6 +278,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT610, "NVIDIA GeForce GT 610", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630, "NVIDIA GeForce GT 630", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630M, "NVIDIA GeForce GT 630M", DRIVER_NVIDIA_GEFORCE8, 1024},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640, "NVIDIA GeForce GT 640", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640M, "NVIDIA GeForce GT 640M", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT650M, "NVIDIA GeForce GT 650M", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650, "NVIDIA GeForce GTX 650", DRIVER_NVIDIA_GEFORCE8, 1024},
@@ -288,6 +289,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670, "NVIDIA GeForce GTX 670", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670MX, "NVIDIA GeForce GTX 670MX", DRIVER_NVIDIA_GEFORCE8, 3072},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX675MX, "NVIDIA GeForce GTX 675MX", DRIVER_NVIDIA_GEFORCE8, 4096},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX675MX_MAC, "NVIDIA GeForce GTX 675MX", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX690, "NVIDIA GeForce GTX 690", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT720, "NVIDIA GeForce GT 720", DRIVER_NVIDIA_GEFORCE8, 2048},
@@ -295,6 +297,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT730M, "NVIDIA GeForce GT 730M", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT740M, "NVIDIA GeForce GT 740M", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT750M, "NVIDIA GeForce GT 750M", DRIVER_NVIDIA_GEFORCE8, 1024},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT755M, "NVIDIA GeForce GT 755M", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX750, "NVIDIA GeForce GTX 750", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX750TI, "NVIDIA GeForce GTX 750 Ti", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX760, "NVIDIA GeForce GTX 760", DRIVER_NVIDIA_GEFORCE8, 2048},
@@ -302,7 +305,9 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX765M, "NVIDIA GeForce GTX 765M", DRIVER_NVIDIA_GEFORCE8, 2048},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770M, "NVIDIA GeForce GTX 770M", DRIVER_NVIDIA_GEFORCE8, 3072},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_GEFORCE8, 2048},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX775M, "NVIDIA GeForce GTX 775M", DRIVER_NVIDIA_GEFORCE8, 3072},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780, "NVIDIA GeForce GTX 780", DRIVER_NVIDIA_GEFORCE8, 3072},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780M, "NVIDIA GeForce GTX 780M", DRIVER_NVIDIA_GEFORCE8, 4096},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780TI, "NVIDIA GeForce GTX 780 Ti", DRIVER_NVIDIA_GEFORCE8, 3072},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITAN, "NVIDIA GeForce GTX TITAN", DRIVER_NVIDIA_GEFORCE8, 6144},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANB, "NVIDIA GeForce GTX TITAN Black", DRIVER_NVIDIA_GEFORCE8, 6144},
@@ -365,6 +370,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD6400, "AMD Radeon HD 6400 Series", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD6410D, "AMD Radeon HD 6410D", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD6480G, "AMD Radeon HD 6480G", DRIVER_AMD_R600, 512 },
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6490M, "AMD Radeon HD 6490M", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD6550D, "AMD Radeon HD 6550D", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD6600, "AMD Radeon HD 6600 Series", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD6600M, "AMD Radeon HD 6600M Series", DRIVER_AMD_R600, 512 },
@@ -374,6 +380,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD7660D, "AMD Radeon HD 7660D", DRIVER_AMD_R600, 2048},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD7700, "AMD Radeon HD 7700 Series", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD7800, "AMD Radeon HD 7800 Series", DRIVER_AMD_R600, 2048},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_HD7870, "AMD Radeon HD 7870 Series", DRIVER_AMD_R600, 2048},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD7900, "AMD Radeon HD 7900 Series", DRIVER_AMD_R600, 2048},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD8600M, "AMD Radeon HD 8600M Series", DRIVER_AMD_R600, 1024},
{HW_VENDOR_AMD, CARD_AMD_RADEON_HD8670, "AMD Radeon HD 8670", DRIVER_AMD_R600, 2048},
@@ -382,7 +389,11 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_AMD, CARD_AMD_RADEON_R7, "AMD Radeon(TM) R7 Graphics", DRIVER_AMD_R600, 2048},
{HW_VENDOR_AMD, CARD_AMD_RADEON_R9_285, "AMD Radeon R9 285", DRIVER_AMD_RX, 2048},
{HW_VENDOR_AMD, CARD_AMD_RADEON_R9_290, "AMD Radeon R9 290", DRIVER_AMD_RX, 4096},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_R9_290X, "AMD Radeon R9 290X", DRIVER_AMD_RX, 4096},
{HW_VENDOR_AMD, CARD_AMD_RADEON_R9_FURY, "AMD Radeon (TM) R9 Fury Series", DRIVER_AMD_RX, 4096},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_R9_M370X, "AMD Radeon R9 M370X", DRIVER_AMD_RX, 2048},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_R9_M380, "AMD Radeon R9 M380", DRIVER_AMD_RX, 2048},
+ {HW_VENDOR_AMD, CARD_AMD_RADEON_R9_M395X, "AMD Radeon R9 M395X", DRIVER_AMD_RX, 4096},
{HW_VENDOR_AMD, CARD_AMD_RADEON_RX_460, "Radeon(TM) RX 460 Graphics", DRIVER_AMD_RX, 4096},
{HW_VENDOR_AMD, CARD_AMD_RADEON_RX_480, "Radeon (TM) RX 480 Graphics", DRIVER_AMD_RX, 4096},
{HW_VENDOR_AMD, CARD_AMD_RADEON_RX_VEGA, "Radeon RX Vega", DRIVER_AMD_RX, 8192},
@@ -430,7 +441,8 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_INTEL, CARD_INTEL_IVBS, "Intel(R) HD Graphics Family", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_HWD, "Intel(R) HD Graphics 4600", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_HWM, "Intel(R) HD Graphics 4600", DRIVER_INTEL_HD4000, 1536},
- {HW_VENDOR_INTEL, CARD_INTEL_HD5000, "Intel(R) HD Graphics 5000", DRIVER_INTEL_HD4000, 1536},
+ {HW_VENDOR_INTEL, CARD_INTEL_HD5000_1, "Intel(R) HD Graphics 5000", DRIVER_INTEL_HD4000, 1536},
+ {HW_VENDOR_INTEL, CARD_INTEL_HD5000_2, "Intel(R) HD Graphics 5000", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_I5100_1, "Intel(R) Iris(TM) Graphics 5100", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_I5100_2, "Intel(R) Iris(TM) Graphics 5100", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_I5100_3, "Intel(R) Iris(TM) Graphics 5100", DRIVER_INTEL_HD4000, 1536},
@@ -440,6 +452,7 @@ static const struct wined3d_gpu_description gpu_description_table[] =
{HW_VENDOR_INTEL, CARD_INTEL_IP5200_3, "Intel(R) Iris(TM) Pro Graphics 5200", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_IP5200_4, "Intel(R) Iris(TM) Pro Graphics 5200", DRIVER_INTEL_HD4000, 1536},
{HW_VENDOR_INTEL, CARD_INTEL_IP5200_5, "Intel(R) Iris(TM) Pro Graphics 5200", DRIVER_INTEL_HD4000, 1536},
+ {HW_VENDOR_INTEL, CARD_INTEL_IP5200_6, "Intel(R) Iris(TM) Pro Graphics 5200", DRIVER_INTEL_HD4000, 2048},
{HW_VENDOR_INTEL, CARD_INTEL_HD5300, "Intel(R) HD Graphics 5300", DRIVER_INTEL_HD4000, 2048},
{HW_VENDOR_INTEL, CARD_INTEL_HD5500, "Intel(R) HD Graphics 5500", DRIVER_INTEL_HD4000, 2048},
{HW_VENDOR_INTEL, CARD_INTEL_HD5600, "Intel(R) HD Graphics 5600", DRIVER_INTEL_HD4000, 2048},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 0acdbf20179..5ea0aa00ede 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2359,6 +2359,7 @@ enum wined3d_pci_device
CARD_AMD_RADEON_HD5900 = 0x689c,
CARD_AMD_RADEON_HD6300 = 0x9803,
CARD_AMD_RADEON_HD6400 = 0x6770,
+ CARD_AMD_RADEON_HD6490M = 0x6760,
CARD_AMD_RADEON_HD6410D = 0x9644,
CARD_AMD_RADEON_HD6480G = 0x9648,
CARD_AMD_RADEON_HD6550D = 0x9640,
@@ -2370,6 +2371,7 @@ enum wined3d_pci_device
CARD_AMD_RADEON_HD7660D = 0x9901,
CARD_AMD_RADEON_HD7700 = 0x683d,
CARD_AMD_RADEON_HD7800 = 0x6819,
+ CARD_AMD_RADEON_HD7870 = 0x6818,
CARD_AMD_RADEON_HD7900 = 0x679a,
CARD_AMD_RADEON_HD8600M = 0x6660,
CARD_AMD_RADEON_HD8670 = 0x6610,
@@ -2378,7 +2380,11 @@ enum wined3d_pci_device
CARD_AMD_RADEON_R7 = 0x130f,
CARD_AMD_RADEON_R9_285 = 0x6939,
CARD_AMD_RADEON_R9_290 = 0x67b1,
+ CARD_AMD_RADEON_R9_290X = 0x67b0,
CARD_AMD_RADEON_R9_FURY = 0x7300,
+ CARD_AMD_RADEON_R9_M370X = 0x6821,
+ CARD_AMD_RADEON_R9_M380 = 0x6647,
+ CARD_AMD_RADEON_R9_M395X = 0x6920,
CARD_AMD_RADEON_RX_460 = 0x67ef,
CARD_AMD_RADEON_RX_480 = 0x67df,
CARD_AMD_RADEON_RX_VEGA = 0x687f,
@@ -2455,6 +2461,7 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_GT610 = 0x104a,
CARD_NVIDIA_GEFORCE_GT630 = 0x0f00,
CARD_NVIDIA_GEFORCE_GT630M = 0x0de9,
+ CARD_NVIDIA_GEFORCE_GT640 = 0x0fc1,
CARD_NVIDIA_GEFORCE_GT640M = 0x0fd2,
CARD_NVIDIA_GEFORCE_GT650M = 0x0fd1,
CARD_NVIDIA_GEFORCE_GTX650 = 0x0fc6,
@@ -2465,6 +2472,7 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_GTX670 = 0x1189,
CARD_NVIDIA_GEFORCE_GTX670MX = 0x11a1,
CARD_NVIDIA_GEFORCE_GTX675MX = 0x11a7,
+ CARD_NVIDIA_GEFORCE_GTX675MX_MAC = 0x11a2,
CARD_NVIDIA_GEFORCE_GTX680 = 0x1180,
CARD_NVIDIA_GEFORCE_GTX690 = 0x1188,
CARD_NVIDIA_GEFORCE_GT720 = 0x128b,
@@ -2472,6 +2480,7 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_GT730M = 0x0fe1,
CARD_NVIDIA_GEFORCE_GT740M = 0x1292,
CARD_NVIDIA_GEFORCE_GT750M = 0x0fe9,
+ CARD_NVIDIA_GEFORCE_GT755M = 0x0fcd,
CARD_NVIDIA_GEFORCE_GTX750 = 0x1381,
CARD_NVIDIA_GEFORCE_GTX750TI = 0x1380,
CARD_NVIDIA_GEFORCE_GTX760 = 0x1187,
@@ -2479,7 +2488,9 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_GTX765M = 0x11e2,
CARD_NVIDIA_GEFORCE_GTX770M = 0x11e0,
CARD_NVIDIA_GEFORCE_GTX770 = 0x1184,
+ CARD_NVIDIA_GEFORCE_GTX775M = 0x119d,
CARD_NVIDIA_GEFORCE_GTX780 = 0x1004,
+ CARD_NVIDIA_GEFORCE_GTX780M = 0x119e,
CARD_NVIDIA_GEFORCE_GTX780TI = 0x100a,
CARD_NVIDIA_GEFORCE_GTXTITAN = 0x1005,
CARD_NVIDIA_GEFORCE_GTXTITANB = 0x100c,
@@ -2555,7 +2566,8 @@ enum wined3d_pci_device
CARD_INTEL_IVBS = 0x015a,
CARD_INTEL_HWD = 0x0412,
CARD_INTEL_HWM = 0x0416,
- CARD_INTEL_HD5000 = 0x0a26,
+ CARD_INTEL_HD5000_1 = 0x0a26,
+ CARD_INTEL_HD5000_2 = 0x0422,
CARD_INTEL_I5100_1 = 0x0a22,
CARD_INTEL_I5100_2 = 0x0a2a,
CARD_INTEL_I5100_3 = 0x0a2b,
@@ -2565,6 +2577,7 @@ enum wined3d_pci_device
CARD_INTEL_IP5200_3 = 0x0d2a,
CARD_INTEL_IP5200_4 = 0x0d2b,
CARD_INTEL_IP5200_5 = 0x0d2e,
+ CARD_INTEL_IP5200_6 = 0x0c22,
CARD_INTEL_HD5300 = 0x161e,
CARD_INTEL_HD5500 = 0x1616,
CARD_INTEL_HD5600 = 0x1612,
--
2.17.1

View File

@ -0,0 +1,74 @@
From 81132a69914175ad0d9d275327ebb2dfce248bb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 25 Jul 2019 16:23:51 +0200
Subject: [PATCH 2/3] ntoskrnl: Update the interface if it is already in the
device_interfaces tree
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As we are going to reuse the same device id when re-plugging a
previously plugged SDL controller, the device interfaces are still
present in the tree and IoRegisterDeviceInterface was not updating the
device pointer.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
---
dlls/ntoskrnl.exe/pnp.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c
index c618885d427..32274533c36 100644
--- a/dlls/ntoskrnl.exe/pnp.c
+++ b/dlls/ntoskrnl.exe/pnp.c
@@ -688,7 +688,9 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla
WCHAR device_instance_id[MAX_DEVICE_ID_LEN];
SP_DEVICE_INTERFACE_DETAIL_DATA_W *data;
NTSTATUS status = STATUS_SUCCESS;
+ UNICODE_STRING device_path;
struct device_interface *iface;
+ struct wine_rb_entry *entry;
DWORD required;
HDEVINFO set;
@@ -726,19 +728,32 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla
data->DevicePath[1] = '?';
TRACE("Returning path %s.\n", debugstr_w(data->DevicePath));
+ RtlCreateUnicodeString( &device_path, data->DevicePath);
+
+ entry = wine_rb_get( &device_interfaces, &device_path );
+ if (entry)
+ {
+ iface = WINE_RB_ENTRY_VALUE( entry, struct device_interface, entry );
+ if (iface->enabled)
+ ERR("Device interface %s is still enabled.\n", debugstr_us(&iface->symbolic_link));
+ }
+ else
+ {
+ iface = heap_alloc_zero( sizeof(struct device_interface) );
+ RtlCreateUnicodeString(&iface->symbolic_link, data->DevicePath);
+ if (wine_rb_put( &device_interfaces, &iface->symbolic_link, &iface->entry ))
+ ERR("Failed to insert interface %s into tree.\n", debugstr_us(&iface->symbolic_link));
+ }
- iface = heap_alloc_zero( sizeof(struct device_interface) );
iface->device = device;
iface->interface_class = *class_guid;
- RtlCreateUnicodeString(&iface->symbolic_link, data->DevicePath);
if (symbolic_link)
RtlCreateUnicodeString( symbolic_link, data->DevicePath);
- if (wine_rb_put( &device_interfaces, &iface->symbolic_link, &iface->entry ))
- ERR("Failed to insert interface %s into tree.\n", debugstr_us(&iface->symbolic_link));
-
HeapFree( GetProcessHeap(), 0, data );
+ RtlFreeUnicodeString( &device_path );
+
return status;
}
--
2.17.1

View File

@ -0,0 +1,102 @@
From f074fb7a491d062a31fdb67d84ebfb454495a1d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 25 Jul 2019 16:23:52 +0200
Subject: [PATCH 3/3] winebus: Use the SDL joystick index as device id instead
of instance id
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Some games are using the HID device id as the gamepad index for xinput
API. When hotplugging devices, SDL increases its instances id and it
doesn't match anymore with xinput gamepad numbers.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
---
dlls/winebus.sys/bus_sdl.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c
index 781deda7670..3bd27ca5bf0 100644
--- a/dlls/winebus.sys/bus_sdl.c
+++ b/dlls/winebus.sys/bus_sdl.c
@@ -744,17 +744,21 @@ static const platform_vtbl sdl_vtbl =
set_feature_report,
};
+static int compare_joystick_id(DEVICE_OBJECT *device, void* context)
+{
+ return impl_from_DEVICE_OBJECT(device)->id - PtrToUlong(context);
+}
+
static BOOL set_report_from_event(SDL_Event *event)
{
DEVICE_OBJECT *device;
struct platform_private *private;
/* All the events coming in will have 'which' as a 3rd field */
- SDL_JoystickID index = ((SDL_JoyButtonEvent*)event)->which;
-
- device = bus_find_hid_device(&sdl_vtbl, ULongToPtr(index));
+ SDL_JoystickID id = ((SDL_JoyButtonEvent*)event)->which;
+ device = bus_enumerate_hid_devices(&sdl_vtbl, compare_joystick_id, ULongToPtr(id));
if (!device)
{
- ERR("Failed to find device at index %i\n",index);
+ ERR("Failed to find device at index %i\n",id);
return FALSE;
}
private = impl_from_DEVICE_OBJECT(device);
@@ -814,11 +818,11 @@ static BOOL set_mapped_report_from_event(SDL_Event *event)
DEVICE_OBJECT *device;
struct platform_private *private;
/* All the events coming in will have 'which' as a 3rd field */
- int index = ((SDL_ControllerButtonEvent*)event)->which;
- device = bus_find_hid_device(&sdl_vtbl, ULongToPtr(index));
+ SDL_JoystickID id = ((SDL_ControllerButtonEvent*)event)->which;
+ device = bus_enumerate_hid_devices(&sdl_vtbl, compare_joystick_id, ULongToPtr(id));
if (!device)
{
- ERR("Failed to find device at index %i\n",index);
+ ERR("Failed to find device at index %i\n",id);
return FALSE;
}
private = impl_from_DEVICE_OBJECT(device);
@@ -878,7 +882,7 @@ static BOOL set_mapped_report_from_event(SDL_Event *event)
return FALSE;
}
-static void try_remove_device(SDL_JoystickID index)
+static void try_remove_device(SDL_JoystickID id)
{
DEVICE_OBJECT *device = NULL;
struct platform_private *private;
@@ -886,7 +890,7 @@ static void try_remove_device(SDL_JoystickID index)
SDL_GameController *sdl_controller;
SDL_Haptic *sdl_haptic;
- device = bus_find_hid_device(&sdl_vtbl, ULongToPtr(index));
+ device = bus_enumerate_hid_devices(&sdl_vtbl, compare_joystick_id, ULongToPtr(id));
if (!device) return;
private = impl_from_DEVICE_OBJECT(device);
@@ -905,7 +909,7 @@ static void try_remove_device(SDL_JoystickID index)
pSDL_HapticClose(sdl_haptic);
}
-static void try_add_device(SDL_JoystickID index)
+static void try_add_device(unsigned int index)
{
DWORD vid = 0, pid = 0, version = 0;
DEVICE_OBJECT *device = NULL;
@@ -967,7 +971,7 @@ static void try_add_device(SDL_JoystickID index)
input = 0;
device = bus_create_hid_device(sdl_busidW, vid, pid,
- input, version, id, serial, is_xbox_gamepad, &GUID_DEVCLASS_SDL,
+ input, version, index, serial, is_xbox_gamepad, &GUID_DEVCLASS_SDL,
&sdl_vtbl, sizeof(struct platform_private));
if (device)
--
2.17.1

View File

@ -2062,9 +2062,10 @@ fi
# | dlls/ntoskrnl.exe/pnp.c, dlls/qedit/Makefile.in, dlls/setupapi/devinst.c, dlls/setupapi/tests/devinst.c,
# | dlls/shell32/Makefile.in, dlls/shell32/shell32.spec, dlls/shell32/shlfileop.c, dlls/strmbase/strmbase_private.h,
# | dlls/user32/rawinput.c, dlls/user32/tests/input.c, dlls/winebus.sys/bus.h, dlls/winebus.sys/bus_iohid.c,
# | dlls/winebus.sys/bus_sdl.c, dlls/winebus.sys/bus_udev.c, dlls/winebus.sys/main.c, dlls/winex11.drv/display.c,
# | dlls/winex11.drv/mouse.c, include/Makefile.in, include/d3drm.h, include/d3drmobj.h, include/msvcrt/limits.h,
# | include/strongname.h, loader/Makefile.in, loader/wine.inf.in, loader/winebus.inf.in, programs/services/services.c,
# | dlls/winebus.sys/bus_sdl.c, dlls/winebus.sys/bus_udev.c, dlls/winebus.sys/main.c, dlls/wined3d/adapter_gl.c,
# | dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h, dlls/winex11.drv/display.c, dlls/winex11.drv/mouse.c,
# | include/Makefile.in, include/d3drm.h, include/d3drmobj.h, include/msvcrt/limits.h, include/strongname.h,
# | loader/Makefile.in, loader/wine.inf.in, loader/winebus.inf.in, programs/services/services.c,
# | programs/wineboot/Makefile.in, programs/wineboot/wineboot.c, tools/make_specfiles
# |
if test "$enable_mailing_list_patches" -eq 1; then
@ -2103,6 +2104,9 @@ if test "$enable_mailing_list_patches" -eq 1; then
patch_apply mailing-list-patches/0033-services-Fix-the-arguments-to-is_root_pnp_service.patch
patch_apply mailing-list-patches/0034-msvcrt-Do-not-use-casting-in-min-max-macros.patch
patch_apply mailing-list-patches/0035-winex11.drv-Ignore-XGrabPointer-induced-warp-events-.patch
patch_apply mailing-list-patches/0036-Add-a-list-of-mac-relevant-graphics-cards.patch
patch_apply mailing-list-patches/0037-ntoskrnl-Update-the-interface-if-it-is-already-in-th.patch
patch_apply mailing-list-patches/0038-winebus-Use-the-SDL-joystick-index-as-device-id-inst.patch
(
printf '%s\n' '+ { "Zebediah Figura", "winebus.inf: Add new INF file and copy it to the INF directory.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "winebus.sys: Implement AddDevice().", 1 },';
@ -2139,6 +2143,9 @@ if test "$enable_mailing_list_patches" -eq 1; then
printf '%s\n' '+ { "Zebediah Figura", "services: Fix the arguments to is_root_pnp_service().", 1 },';
printf '%s\n' '+ { "Peter Dons Tychsen", "msvcrt: Do not use casting in min/max macros.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "winex11.drv: Ignore XGrabPointer-induced warp events as well.", 1 },';
printf '%s\n' '+ { "Kristján Gerhardsson", "Add a list of mac relevant graphics cards.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "ntoskrnl: Update the interface if it is already in the device_interfaces tree.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "winebus: Use the SDL joystick index as device id instead of instance id.", 1 },';
) >> "$patchlist"
fi