-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-03-27 um 21:52 schrieb Sergey Isakov:
{ + if (!lpDisplayDevice) { + return FALSE; + }
This is probably correct, but it needs a test. Currently this function crashes if this parameter is NULL. I can imagine that EnumDisplayDevices(NULL, 1, NULL, 0) returns TRUE if display 1 exists and FALSE otherwise.
- if (i) { FIXME("(%s,%d,%p,0x%08x),
stub!\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags); - - if (i) return FALSE; + }
This is an unrelated change and matters more for what the patch description says it does. Though if I understand this right we want this check to be "if (i || lpDevice)" because the application can also pass in a device name.
- if (lpDevice) { + strcpyW(lpDisplayDevice->DeviceName,
lpDevice); + } else { memcpy(lpDisplayDevice->DeviceName, primary_device_name, sizeof(primary_device_name)); + }
This is yet another unrelated change. It looks OK, but I don't think it really matters. Copying the input display name will at best paper over the fact that our implementation of this function does not support multiple display devices.