diff options
author | der richter <der.richter@gmx.de> | 2020-01-08 20:58:54 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2020-01-09 19:13:42 +0100 |
commit | e6c9e33a3163de5293acc4aed805435fd5e359b8 (patch) | |
tree | bad354f4b43f70f9ad177aa5876680b768f8f038 /video/out/cocoa-cb | |
parent | 7bb3f53cf5720cb1ed8c88ff91eb82cde5eb6b95 (diff) | |
download | mpv-e6c9e33a3163de5293acc4aed805435fd5e359b8.tar.bz2 mpv-e6c9e33a3163de5293acc4aed805435fd5e359b8.tar.xz |
cocoa-cb: add runtime dpi change and use proper fallback for initial dpi
at the time of the initial dpi query the window is not instantiated yet.
we use a proper fallback in that case, eg the target configured screen
or the main screen if none is set.
also change some weird oversight and a small optimisation.
Diffstat (limited to 'video/out/cocoa-cb')
-rw-r--r-- | video/out/cocoa-cb/window.swift | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index 25f144a38e..9e2c6e3122 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -476,7 +476,7 @@ class Window: NSWindow, NSWindowDelegate { func windowDidChangeBackingProperties(_ notification: Notification) { cocoaCB.layer?.contentsScale = backingScaleFactor - cocoaCB.flagEvents(VO_EVENT_WIN_STATE) + cocoaCB.flagEvents(VO_EVENT_DPI) } func windowWillStartLiveResize(_ notification: Notification) { |