Commit 0ead40dc authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

winemac.drv: Don't fail GPU detection if some IOKit properties are missing.

Fixes GPU detection when running in VMware Fusion, where the GPU entry lacks a "model" property. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49774Signed-off-by: 's avatarBrendan Shanks <bshanks@codeweavers.com> Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7eddd79e
......@@ -215,18 +215,15 @@ static int macdrv_get_gpu_info_from_entry(struct macdrv_gpu* gpu, io_registry_en
if (IORegistryEntryGetRegistryEntryID(gpu_entry, &gpu->id) != kIOReturnSuccess)
goto done;
if (get_entry_property_uint32(gpu_entry, CFSTR("vendor-id"), &gpu->vendor_id))
goto done;
if (get_entry_property_uint32(gpu_entry, CFSTR("device-id"), &gpu->device_id))
goto done;
if (get_entry_property_uint32(gpu_entry, CFSTR("subsystem-id"), &gpu->subsys_id))
goto done;
if (get_entry_property_uint32(gpu_entry, CFSTR("revision-id"), &gpu->revision_id))
goto done;
if (get_entry_property_string(gpu_entry, CFSTR("model"), gpu->name, sizeof(gpu->name)))
goto done;
ret = 0;
get_entry_property_uint32(gpu_entry, CFSTR("vendor-id"), &gpu->vendor_id);
get_entry_property_uint32(gpu_entry, CFSTR("device-id"), &gpu->device_id);
get_entry_property_uint32(gpu_entry, CFSTR("subsystem-id"), &gpu->subsys_id);
get_entry_property_uint32(gpu_entry, CFSTR("revision-id"), &gpu->revision_id);
get_entry_property_string(gpu_entry, CFSTR("model"), gpu->name, sizeof(gpu->name));
done:
if (gpu_entry != entry)
IOObjectRelease(gpu_entry);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment