Skip to content

Commit bb0dd81

Browse files
committed
fix: fixing failing mettle macos ci
1 parent 1fa8458 commit bb0dd81

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

mettle/src/stdapi/ui/osx_desktop.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@
99
uint32_t quality = 0;
1010
tlv_packet_get_u32(ctx->req, TLV_TYPE_DESKTOP_SCREENSHOT_QUALITY, &quality);
1111
@autoreleasepool {
12-
CGImageRef image = CGDisplayCreateImage(kCGDirectMainDisplay);
12+
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000
13+
if ( WX_IS_MACOS_AVAILABLE(14, 4) ) // errors on lower versions of macOS 14
14+
{
15+
// TODO add ScreenKit implementation
16+
}
17+
else
18+
#endif // macOS 10.14+
19+
{
20+
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 150000
21+
CGImageRef image = CGDisplayCreateImage(kCGDirectMainDisplay);
22+
#endif
23+
}
1324
CFMutableDataRef newImageData = CFDataCreateMutable(NULL, 0);
1425
CGImageDestinationRef destination = CGImageDestinationCreateWithData(newImageData, kUTTypeJPEG, 1, NULL);
1526
float compression = quality / 100;

0 commit comments

Comments
 (0)