mirror of https://github.com/mpv-player/mpv
6da224b1dd
this optimises two things and fix a minor bug. 1. we always updated the display refresh rate on any mode change whether it was the current screen or not. now we only update the refresh rate when the mode changed happened on the current screen. 2. the windowDidChangeScreen event doesn't exclusively trigger on screen changes so we updated the display refresh rate in cases where it wasn't needed at all. since we manually keep track of the current screen, we can easily test if the screen really changed. 3. weirdly on initWithContentRect accessing the screen of the window always returned the main screen instead of the screen the window is created on. since we already use the window init method with the screen as argument, overwrite that method instead and use the screen argument. |
||
---|---|---|
.. | ||
events_view.h | ||
events_view.m | ||
mpvadapter.h | ||
video_view.h | ||
video_view.m | ||
window.h | ||
window.m |