Brendan Shanks : winemac.drv: Don't fail GPU detection if some IOKit properties are missing.
Alexandre Julliard
julliard at winehq.org
Tue Mar 23 15:07:41 CDT 2021
Module: wine
Branch: oldstable
Commit: 433dd4b4f109c53444e92d9796392499cc87b2ca
URL: https://source.winehq.org/git/wine.git/?a=commit;h=433dd4b4f109c53444e92d9796392499cc87b2ca
Author: Brendan Shanks <bshanks at codeweavers.com>
Date: Tue Sep 8 16:10:32 2020 -0700
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: Brendan Shanks <bshanks at codeweavers.com>
Signed-off-by: Ken Thomases <ken at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 0ead40dc9b87ebbd74ad6ebda0182365ab2efde3)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
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);
More information about the wine-cvs
mailing list