cocoa: SDL_GetClipboardData() needs to conform the mimetype.

Fixes #16077.
This commit is contained in:
Ryan C. Gordon
2026-08-03 11:52:13 -04:00
parent 591b584b27
commit f17fc121aa
+2 -1
View File
@@ -238,7 +238,8 @@ void *Cocoa_GetClipboardData(SDL_VideoDevice *_this, const char *mime_type, size
for (NSPasteboardItem *item in [pasteboard pasteboardItems]) {
NSData *itemData;
CFStringRef utiType = GetUTIType(mime_type);
itemData = [item dataForType: (__bridge NSString *)utiType];
NSString *availableType = [pasteboard availableTypeFromArray:@[(__bridge NSString *) utiType]];
itemData = [item dataForType: availableType];
CFRelease(utiType);
if (itemData != nil) {
NSUInteger length = [itemData length];