mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 09:57:17 +00:00
winemac.drv: Fix crash when building against Metal-capable SDK but running on older OS X.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50790 Signed-off-by: Brendan Shanks <bshanks@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6f68543692
commit
d52c4eb00c
|
@ -348,10 +348,15 @@ static int macdrv_get_gpu_info_from_display_id_using_metal(struct macdrv_gpu* gp
|
|||
int ret = -1;
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
/* Test if Metal is available */
|
||||
if (&CGDirectDisplayCopyCurrentMetalDevice == NULL)
|
||||
goto done;
|
||||
|
||||
device = [CGDirectDisplayCopyCurrentMetalDevice(display_id) autorelease];
|
||||
if (device && [device respondsToSelector:@selector(registryID)])
|
||||
ret = macdrv_get_gpu_info_from_registry_id(gpu, device.registryID);
|
||||
|
||||
done:
|
||||
[pool release];
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue