nixpkgs/pkgs/applications/emulators/wine/darwin-metal-compat.patch
Randy Eckenrode 424e97118f
wine: improve Darwin support
- Add a setup hook to allow Darwin to build PE DLLs using MinGW;
- Add a postConfigure script to fix preloader brekage on Apple Silicon
  Macs running under Rosetta 2;
- Disable linking against X11 libraries (pulled in by ffmpeg); and
- Allow building Wine 7.0 using the 10.12 SDK on x86_64-darwin.
2022-02-17 08:30:42 -05:00

32 lines
1.7 KiB
Diff

diff --git a/dlls/winemac.drv/cocoa_display.m b/dlls/winemac.drv/cocoa_display.m
index f64a6c0f6ad..6da0391e3fa 100644
--- a/dlls/winemac.drv/cocoa_display.m
+++ b/dlls/winemac.drv/cocoa_display.m
@@ -289,7 +289,7 @@ static int macdrv_get_gpus_from_metal(struct macdrv_gpu** new_gpus, int* count)
* the primary GPU because we need to hide the integrated GPU for an automatic graphic switching pair to avoid apps
* using the integrated GPU. This is the behavior of Windows on a Mac. */
primary_device = [MTLCreateSystemDefaultDevice() autorelease];
- if (macdrv_get_gpu_info_from_registry_id(&primary_gpu, primary_device.registryID))
+ if (macdrv_get_gpu_info_from_registry_id(&primary_gpu, (uint64_t)[primary_device registryID]))
goto done;
/* Hide the integrated GPU if the system default device is a dedicated GPU */
@@ -301,7 +301,7 @@ static int macdrv_get_gpus_from_metal(struct macdrv_gpu** new_gpus, int* count)
for (i = 0; i < devices.count; i++)
{
- if (macdrv_get_gpu_info_from_registry_id(&gpus[gpu_count], devices[i].registryID))
+ if (macdrv_get_gpu_info_from_registry_id(&gpus[gpu_count], (uint64_t)[devices[i] registryID]))
goto done;
if (hide_integrated && devices[i].isLowPower)
@@ -354,7 +354,7 @@ static int macdrv_get_gpu_info_from_display_id_using_metal(struct macdrv_gpu* gp
device = [CGDirectDisplayCopyCurrentMetalDevice(display_id) autorelease];
if (device && [device respondsToSelector:@selector(registryID)])
- ret = macdrv_get_gpu_info_from_registry_id(gpu, device.registryID);
+ ret = macdrv_get_gpu_info_from_registry_id(gpu, (uint64_t)[device registryID]);
done:
[pool release];