SDL: Fix exception on macOS 10.4/10.5

The getBytes:...:remainingRange: API was introduced in 10.6.
This commit is contained in:
Evan Miller 2021-10-11 18:16:40 -04:00 committed by Thierry Crozat
parent ea386eda87
commit a9a59ba37e

View File

@ -60,7 +60,7 @@ Common::U32String getTextFromClipboardMacOSX() {
NSPasteboard *pb = [NSPasteboard generalPasteboard];
NSString *str = [pb stringForType:NSPasteboardTypeString];
if (str == nil)
if (![str respondsToSelector:@selector(getBytes:maxLength:usedLength:encoding:options:range:remainingRange:)])
return Common::U32String();
// If translations are supported, use the current TranslationManager charset and otherwise