Bug 594976. GfxInfo: Case-insensitive comparison for DeviceKey of DISPLAY_DEVICE. r=bschouten,a=blocking

This should fix a bunch of devices not being properly detected by GfxInfo but detected by
GfxBot.
This commit is contained in:
Tetsuro Kato 2010-09-27 15:02:03 -04:00
parent 2647da5173
commit a040e6dc17

View File

@ -176,7 +176,8 @@ GfxInfo::Init()
/* DeviceKey is "reserved" according to MSDN so we'll be careful with it */
/* check that DeviceKey begins with DEVICE_KEY_PREFIX */
if (wcsncmp(displayDevice.DeviceKey, DEVICE_KEY_PREFIX, NS_ARRAY_LENGTH(DEVICE_KEY_PREFIX)-1) != 0)
/* some systems have a DeviceKey starting with \REGISTRY\Machine\ so we need to compare case insenstively */
if (_wcsnicmp(displayDevice.DeviceKey, DEVICE_KEY_PREFIX, NS_ARRAY_LENGTH(DEVICE_KEY_PREFIX)-1) != 0)
return;
// make sure the string is NULL terminated