Arkadiusz Hiler : ntoskrnl.exe: Use correct name format when sending WM_DEVICECHANGE.
Alexandre Julliard
julliard at winehq.org
Tue Mar 23 16:54:32 CDT 2021
Module: wine
Branch: master
Commit: f69c8f018188af49d5a3916f7bb7e3ab984fd3ec
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f69c8f018188af49d5a3916f7bb7e3ab984fd3ec
Author: Arkadiusz Hiler <ahiler at codeweavers.com>
Date: Tue Mar 23 20:10:10 2021 +0200
ntoskrnl.exe: Use correct name format when sending WM_DEVICECHANGE.
This fixes controller hotplug with FarCry Primal.
Signed-off-by: Arkadiusz Hiler <ahiler at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntoskrnl.exe/pnp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c
index 4a1fbf001a4..6652be73c47 100644
--- a/dlls/ntoskrnl.exe/pnp.c
+++ b/dlls/ntoskrnl.exe/pnp.c
@@ -776,6 +776,7 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
broadcast->dbcc_reserved = 0;
broadcast->dbcc_classguid = iface->interface_class;
lstrcpynW( broadcast->dbcc_name, name->Buffer, namelen + 1 );
+ if (namelen > 1) broadcast->dbcc_name[1] = '\\';
send_devicechange( enable ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, broadcast, len );
heap_free( broadcast );
}
More information about the wine-cvs
mailing list