summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2016-06-22 19:38:39 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2016-07-21 08:48:37 +0200
commit7531275f62c6f4bd68192d7aceb6b07f49b64607 (patch)
treee01488cfc34b7593388648677f0011e2c284a0c9
parentfde784129f4b94b6fa8b2293127c41dc140b7d3a (diff)
downloadmpv-7531275f62c6f4bd68192d7aceb6b07f49b64607.tar.bz2
mpv-7531275f62c6f4bd68192d7aceb6b07f49b64607.tar.xz
cocoa: update screen fps only if necessary
we don't need to update the display refresh rate when going fullscreen or updating the colour profile
-rw-r--r--video/out/cocoa_common.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 21e1246b1c..2b74d50348 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -421,7 +421,6 @@ static void vo_cocoa_update_screen_info(struct vo *vo, struct mp_rect *out_rc)
return;
vo_cocoa_update_screens_pointers(vo);
- vo_cocoa_update_screen_fps(vo);
if (out_rc) {
NSRect r = [s->current_screen frame];
@@ -584,6 +583,7 @@ static void cocoa_screen_reconfiguration_observer(
struct vo *vo = ctx;
MP_WARN(vo, "detected display mode change, updating screen info\n");
vo_cocoa_update_screen_info(vo, NULL);
+ vo_cocoa_update_screen_fps(vo);
}
}
@@ -614,6 +614,7 @@ int vo_cocoa_config_window(struct vo *vo)
run_on_main_thread(vo, ^{
struct mp_rect screenrc;
vo_cocoa_update_screen_info(vo, &screenrc);
+ vo_cocoa_update_screen_fps(vo);
struct vo_win_geometry geo;
vo_calc_window_geometry(vo, &screenrc, &geo);
@@ -953,6 +954,7 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg)
- (void)windowDidChangeScreen:(NSNotification *)notification
{
vo_cocoa_update_screen_info(self.vout, NULL);
+ vo_cocoa_update_screen_fps(self.vout);
}
- (void)didChangeWindowedScreenProfile:(NSScreen *)screen