Browse Source

cocoa: fix building with the macOS 10.7 SDK (thanks Riccardo!)

Fixes bug #4368
Alex Szpakowski 6 years ago
parent
commit
c525ff354d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/video/cocoa/SDL_cocoawindow.m

+ 1 - 1
src/video/cocoa/SDL_cocoawindow.m

@@ -1185,7 +1185,7 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
     /* Force the graphics context to clear to black so we don't get a flash of
     /* Force the graphics context to clear to black so we don't get a flash of
        white until the app is ready to draw. In practice on modern macOS, this
        white until the app is ready to draw. In practice on modern macOS, this
        only gets called for window creation and other extraordinary events. */
        only gets called for window creation and other extraordinary events. */
-    self.layer.backgroundColor = NSColor.blackColor.CGColor;
+    self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
     ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
     ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
     SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
     SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
 }
 }