Skip to content
Snippets Groups Projects
Commit 0ead40dc authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard
Browse files

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=49774


Signed-off-by: default avatarBrendan Shanks <bshanks@codeweavers.com>
Signed-off-by: default avatarKen Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 7eddd79e
No related branches found
Tags wine-970329
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment