[macos] Address deprecation warnings when using a higher deployment target

This commit is contained in:
Garry Watkins 2020-03-05 10:55:14 -08:00 committed by Jeremy Huddleston Sequoia
parent 06eca31d47
commit 1f1770dacd

View File

@ -48,6 +48,13 @@
#include <sizecalc.h>
#import "ThreadUtilities.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED < 101400
// Use deprecated enums when using older SDKs that don't support the newer values
#define NSAlphaFirstBitmapFormat NSBitmapFormatAlphaFirst
#define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat
#define NSWindowStyleMaskBorderless NSBorderlessWindowMask
#endif
NSString* findScaledImageName(NSString *fileName,
NSUInteger dotIndex,
NSString *strToAppend);
@ -297,7 +304,7 @@ SplashRedrawWindow(Splash * splash) {
hasAlpha: YES
isPlanar: NO
colorSpaceName: NSDeviceRGBColorSpace
bitmapFormat: NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat
bitmapFormat: NSBitmapFormatAlphaFirst | NSBitmapFormatAlphaNonpremultiplied
bytesPerRow: splash->width * 4
bitsPerPixel: 32];
@ -435,7 +442,7 @@ SplashScreenThread(void *param) {
splash->window = (void*) [[NSWindow alloc]
initWithContentRect: NSMakeRect(splash->x, splash->y, splash->width, splash->height)
styleMask: NSBorderlessWindowMask
styleMask: NSWindowStyleMaskBorderless
backing: NSBackingStoreBuffered
defer: NO
screen: SplashNSScreen()];