From: Brendan Shanks Subject: [PATCH] winemac.drv: Don't fail GPU detection if some IOKit properties are missing. Message-Id: <20200908231030.11876-1-bshanks@codeweavers.com> Date: Tue, 8 Sep 2020 16:10:32 -0700 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: Brendan Shanks --- dlls/winemac.drv/cocoa_display.m | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/winemac.drv/cocoa_display.m b/dlls/winemac.drv/cocoa_display.m index 9d95eee99a9..e769772feaa 100644 --- a/dlls/winemac.drv/cocoa_display.m +++ b/dlls/winemac.drv/cocoa_display.m @@ -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); -- 2.26.2