From 7531275f62c6f4bd68192d7aceb6b07f49b64607 Mon Sep 17 00:00:00 2001 From: Akemi Date: Wed, 22 Jun 2016 19:38:39 +0200 Subject: 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 --- video/out/cocoa_common.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3