Codechange: [OSX] Use more exact enum names where introduced with the 10.12 SDK.
The enum values still have the exact same numerical values, but the 10.12 SDK introduced more explicit names (e.g. like NSEventTypeApplicationDefined instead of NSApplicationDefined) for several enum constants. Use them when available.
This commit is contained in:
@@ -191,13 +191,13 @@ const char *GetCurrentLocale(const char *)
|
||||
bool GetClipboardContents(char *buffer, const char *last)
|
||||
{
|
||||
NSPasteboard *pb = [ NSPasteboard generalPasteboard ];
|
||||
NSArray *types = [ NSArray arrayWithObject:NSStringPboardType ];
|
||||
NSArray *types = [ NSArray arrayWithObject:NSPasteboardTypeString ];
|
||||
NSString *bestType = [ pb availableTypeFromArray:types ];
|
||||
|
||||
/* Clipboard has no text data available. */
|
||||
if (bestType == nil) return false;
|
||||
|
||||
NSString *string = [ pb stringForType:NSStringPboardType ];
|
||||
NSString *string = [ pb stringForType:NSPasteboardTypeString ];
|
||||
if (string == nil || [ string length ] == 0) return false;
|
||||
|
||||
strecpy(buffer, [ string UTF8String ], last);
|
||||
|
@@ -26,6 +26,10 @@
|
||||
#define HAVE_OSX_1011_SDK
|
||||
#endif
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_12
|
||||
#define HAVE_OSX_1012_SDK
|
||||
#endif
|
||||
|
||||
/* It would seem that to ensure backward compatibility we have to ensure that we have defined MAC_OS_X_VERSION_10_x everywhere */
|
||||
#ifndef MAC_OS_X_VERSION_10_3
|
||||
#define MAC_OS_X_VERSION_10_3 1030
|
||||
|
Reference in New Issue
Block a user