Ticket #57540: patch-src-video-cocoa-SDL_cocoawindow-allow-10.7-SDK.diff

File patch-src-video-cocoa-SDL_cocoawindow-allow-10.7-SDK.diff, 957 bytes (added by kencu (Ken), 6 years ago)
  • src/video/cocoa/SDL_cocoawindow.m

    diff --git src/video/cocoa/SDL_cocoawindow.m src/video/cocoa/SDL_cocoawindow.m
    index a8e95cc..b9d9790 100644
    SetWindowStyle(SDL_Window * window, NSUInteger style) 
    11721172
    11731173-(void) updateLayer
    11741174{
     1175/* this is only called on 10.8+, so restricting the build to the 10.8+ SDK is OK */
     1176#if MAC_OS_X_VERSION_MAX_ALLOWED > 1070
    11751177    /* Force the graphics context to clear to black so we don't get a flash of
    11761178       white until the app is ready to draw. In practice on modern macOS, this
    11771179       only gets called for window creation and other extraordinary events. */
    11781180    self.layer.backgroundColor = NSColor.blackColor.CGColor;
    11791181    ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
    11801182    SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
     1183#endif /* MAC_OS_X_VERSION_MAX_ALLOWED > 1070 */
    11811184}
    11821185
    11831186- (void)rightMouseDown:(NSEvent *)theEvent