mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to create HardwareId registry key for display devices.
This commit is contained in:
parent
ec7eae9400
commit
6b626b3f42
@ -6204,9 +6204,11 @@ fi
|
||||
if test "$enable_setupapi_Display_Device" -eq 1; then
|
||||
patch_apply setupapi-Display_Device/0001-setupapi-Create-registry-keys-for-display-devices-an.patch
|
||||
patch_apply setupapi-Display_Device/0002-setupapi-Handle-the-case-that-a-full-driver-path-is-.patch
|
||||
patch_apply setupapi-Display_Device/0003-setupapi-Also-create-HardwareId-registry-key-for-dis.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "setupapi: Create registry keys for display devices and display drivers.", 1 },';
|
||||
echo '+ { "Michael Müller", "setupapi: Handle the case that a full driver path is passed to SetupDiGetClassDevs.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "setupapi: Also create HardwareId registry key for display devices.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
From 879401065780700c0236e51d9e52d629d8a9bb8f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 2 Oct 2016 18:07:18 +0200
|
||||
Subject: setupapi: Also create HardwareId registry key for display devices.
|
||||
|
||||
---
|
||||
dlls/setupapi/devinst.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
|
||||
index 4b67833..67aa98d 100644
|
||||
--- a/dlls/setupapi/devinst.c
|
||||
+++ b/dlls/setupapi/devinst.c
|
||||
@@ -153,7 +153,7 @@ static void create_display_keys(HKEY enumKey, int index, DISPLAY_DEVICEW *disp)
|
||||
{
|
||||
static const WCHAR fmtW[] = {'1','3','&','1','2','3','4','5','&','%','d',0};
|
||||
HKEY devKey, intKey;
|
||||
- WCHAR buffer[50];
|
||||
+ WCHAR *str, buffer[50];
|
||||
LONG l;
|
||||
|
||||
l = RegCreateKeyExW(enumKey, disp->DeviceID, 0, NULL, 0, KEY_ALL_ACCESS,
|
||||
@@ -167,6 +167,12 @@ static void create_display_keys(HKEY enumKey, int index, DISPLAY_DEVICEW *disp)
|
||||
{
|
||||
RegSetValueExW(intKey, ClassGUID, 0, REG_SZ, (BYTE *)displayGUIDW, sizeof(displayGUIDW));
|
||||
RegSetValueExW(intKey, Driver, 0, REG_SZ, (BYTE *)ddriverGUIDW, sizeof(ddriverGUIDW));
|
||||
+ if ((str = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (strlenW(disp->DeviceID) + 2) * sizeof(WCHAR))))
|
||||
+ {
|
||||
+ strcpyW(str, disp->DeviceID); /* we need two \0 for REG_MULTI_SZ */
|
||||
+ RegSetValueExW(intKey, HardwareId, 0, REG_MULTI_SZ, (BYTE *)str, (strlenW(str) + 2) * sizeof(WCHAR));
|
||||
+ HeapFree(GetProcessHeap(), 0, str);
|
||||
+ }
|
||||
RegCloseKey(intKey);
|
||||
}
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
Loading…
Reference in New Issue
Block a user