caopengllayer: request HDR mode
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 16 Apr 2016 11:35:04 +0000 (14:35 +0300)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 16 Apr 2016 12:15:03 +0000 (15:15 +0300)
modules/video_output/caopengllayer.m

index 787bd45..2335df0 100644 (file)
@@ -219,6 +219,11 @@ static int Open (vlc_object_t *p_this)
             msg_Dbg(vd, "OS does not support custom color spaces, output may be undefined");
         }
 
+        /* request our screen's HDR mode (introduced in OS X 10.11) */
+        if ([sys->cgLayer respondsToSelector:@selector(setWantsExtendedDynamicRangeContent:)]) {
+            [sys->cgLayer setWantsExtendedDynamicRangeContent:YES];
+        }
+
         /* setup initial state */
         CGSize outputSize;
         if ([container respondsToSelector:@selector(currentOutputSize)])