mirror of https://github.com/mpv-player/mpv
cocoa-cb: force redraw when screen or size changes
in certain circumstances the video was not redrawn even when the size or the backing scale factor changed. this could lead to a lower resolution output than intended. now it redraws the video when screen properties or the window size changes.
This commit is contained in:
parent
d9e13f42b8
commit
1caa653f2d
|
@ -301,6 +301,7 @@ class Window: NSWindow, NSWindowDelegate {
|
|||
let cRect = frameRect(forContentRect: rect)
|
||||
unfsContentFrame = rect
|
||||
setFrame(cRect, display: true)
|
||||
cocoaCB.layer?.update(force: true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,6 +465,7 @@ class Window: NSWindow, NSWindowDelegate {
|
|||
}
|
||||
if currentScreen != screen {
|
||||
cocoaCB.updateDisplaylink()
|
||||
cocoaCB.layer?.update(force: true)
|
||||
}
|
||||
currentScreen = screen
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue