[Scummvm-git-logs] scummvm master -> a9a59ba37e875bf233642caa047461b73874f7ff

criezy criezy at scummvm.org
Thu Oct 14 20:00:09 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a9a59ba37e SDL: Fix exception on macOS 10.4/10.5


Commit: a9a59ba37e875bf233642caa047461b73874f7ff
    https://github.com/scummvm/scummvm/commit/a9a59ba37e875bf233642caa047461b73874f7ff
Author: Evan Miller (emmiller at gmail.com)
Date: 2021-10-14T21:00:04+01:00

Commit Message:
SDL: Fix exception on macOS 10.4/10.5

The getBytes:...:remainingRange: API was introduced in 10.6.

Changed paths:
    backends/platform/sdl/macosx/macosx_wrapper.mm


diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index baed506488..e017d4e4fc 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.mm
+++ b/backends/platform/sdl/macosx/macosx_wrapper.mm
@@ -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




More information about the Scummvm-git-logs mailing list