diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-02-25 00:04:30 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-03-31 22:07:33 +0200 |
commit | b0ee9334e33a8603dd07f991ee5cd5f2345030ed (patch) | |
tree | a3c5e4d92b028be15d084e664343aee81f458bb9 /video/out/cocoa | |
parent | 956b01ec4eaecef0d48409e7aa5c1d133132fb82 (diff) | |
download | mpv-b0ee9334e33a8603dd07f991ee5cd5f2345030ed.tar.bz2 mpv-b0ee9334e33a8603dd07f991ee5cd5f2345030ed.tar.xz |
vo_opengl, cocoa: allow to autoselect a color profile
This commit adds support for automatic selection of color profiles based on
the display where mpv is initialized, and automatically changes the color
profile when display is changed or the profile itself is changed from
System Preferences.
@UliZappe was responsible with the testing and implementation of a lot of this
commit, including the original implementation of `cocoa_get_icc_profile_path`
(See #594).
Fixes #594
Diffstat (limited to 'video/out/cocoa')
-rw-r--r-- | video/out/cocoa/mpvadapter.h | 1 | ||||
-rw-r--r-- | video/out/cocoa/window.m | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/video/out/cocoa/mpvadapter.h b/video/out/cocoa/mpvadapter.h index 9833993988..af536d2f56 100644 --- a/video/out/cocoa/mpvadapter.h +++ b/video/out/cocoa/mpvadapter.h @@ -26,6 +26,7 @@ - (void)putCommand:(char*)cmd; - (void)performAsyncResize:(NSSize)size; - (void)handleFilesArray:(NSArray *)files; +- (void)didChangeWindowedScreenProfile:(NSScreen *)screen; - (BOOL)isInFullScreenMode; - (NSScreen *)fsScreen; diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m index e760fd184d..009315d7ac 100644 --- a/video/out/cocoa/window.m +++ b/video/out/cocoa/window.m @@ -54,10 +54,16 @@ [self.adapter setNeedsResize]; } -- (void)windowDidChangeBackingProperties:(NSNotification *)notification { +- (void)windowDidChangeBackingProperties:(NSNotification *)notification +{ [self.adapter setNeedsResize]; } +- (void)windowDidChangeScreenProfile:(NSNotification *)notification +{ + [self.adapter didChangeWindowedScreenProfile:[self screen]]; +} + - (BOOL)isInFullScreenMode { return (([self styleMask] & NSFullScreenWindowMask) == |