user32: EnumDisplayDevicesW, populate DeviceID member
Justin Chevrier
jchevrier at gmail.com
Sun Jan 24 01:00:26 CST 2010
At least one app (Dead Space) expects DeviceID to be populated with a
value after calling EnumDisplayDevicesA. Populate with a reasonable
value.
Fixes: http://bugs.winehq.org/show_bug.cgi?id=15795
---
dlls/user32/misc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index ca807f0..d5a23d1 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -277,6 +277,8 @@ DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
static const WCHAR primary_device_name[] =
{'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
static const WCHAR primary_device_string[] = {'X','1','1','
','W','i','n','d','o','w','i','n','g',' ',
'S','y','s','t','e','m',0};
+static const WCHAR primary_device_deviceid[] =
{'P','C','I','\\','V','E','N','_','0','0','0','0','&',
+
'D','E','V','_','0','0','0','0',0};
/***********************************************************************
* EnumDisplayDevicesA (USER32.@)
@@ -331,7 +333,7 @@ BOOL WINAPI EnumDisplayDevicesW( LPCWSTR lpDevice,
DWORD i, LPDISPLAY_DEVICEW lp
DISPLAY_DEVICE_VGA_COMPATIBLE;
if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceID) +
sizeof(lpDisplayDevice->DeviceID))
- lpDisplayDevice->DeviceID[0] = 0;
+ memcpy(lpDisplayDevice->DeviceID, primary_device_deviceid,
sizeof(primary_device_deviceid));
if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceKey) +
sizeof(lpDisplayDevice->DeviceKey))
lpDisplayDevice->DeviceKey[0] = 0;
--
More information about the wine-patches
mailing list