diff --git a/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m b/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m index 8750786b53..509510388a 100644 --- a/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m +++ b/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m @@ -48,6 +48,13 @@ #include #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()];