Ticket #57540: libsdl2-blackcolor.diff

File libsdl2-blackcolor.diff, 695 bytes (added by rmottola (Riccardo), 6 years ago)

allocate Black constant CGColor directly

  • src/video/cocoa/SDL_cocoawindow.m

    old new  
    11751175    /* Force the graphics context to clear to black so we don't get a flash of
    11761176       white until the app is ready to draw. In practice on modern macOS, this
    11771177       only gets called for window creation and other extraordinary events. */
    1178     self.layer.backgroundColor = NSColor.blackColor.CGColor;
     1178    self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
    11791179    ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
    11801180    SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
    11811181}