Update IsNvidiaGraphicsCardPresent.cpp

This commit is contained in:
vxunderground 2021-11-12 23:48:34 -06:00 committed by GitHub
parent d5d70ca4e9
commit bd23b8d769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,13 +3,13 @@ BOOL IsNvidiaGraphicsCardPresent(VOID)
DISPLAY_DEVICEW DisplayDevice; RtlZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICEW));
DisplayDevice.cb = sizeof(DISPLAY_DEVICEW);
DWORD dwDeviceId = ERROR_SUCCESS;
DWORD dwDeviceId = ERROR_SUCCESS;
while (EnumDisplayDevicesW(NULL, dwDeviceId, &DisplayDevice, 0))
{
if (StringFindSubstringW(DisplayDevice.DeviceString, (PWCHAR)L"NVIDIA") != NULL)
return TRUE;
}
while (EnumDisplayDevicesW(NULL, dwDeviceId, &DisplayDevice, 0))
{
if (StringFindSubstringW(DisplayDevice.DeviceString, (PWCHAR)L"NVIDIA") != NULL)
return TRUE;
}
return FALSE;
}
return FALSE;
}