Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Mac: Fix over-saturated colors on P3 displays (e.g. the 2016 MBPs).
  • Loading branch information
slime73 committed Dec 24, 2016
1 parent 3e92845 commit d719374
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -1276,6 +1276,13 @@ - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
[nswindow setContentView:contentView];
[contentView release];

/* The app's content is likely authored expecting sRGB output. If we don't
* specify the window's color space, it will default to the device color
* space, which will be P3 on capable displays. The mismatch causes the
* content authored in sRGB to appear extremely saturated on the P3 display.
*/
[nswindow setColorSpace:[NSColorSpace sRGBColorSpace]];

/* Allow files and folders to be dragged onto the window by users */
[nswindow registerForDraggedTypes:[NSArray arrayWithObject:(NSString *)kUTTypeFileURL]];

Expand Down

0 comments on commit d719374

Please sign in to comment.