summaryrefslogtreecommitdiffstats
path: root/osdep/macosx_touchbar.h
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2021-01-20 15:42:57 +0100
committerder richter <der.richter@gmx.de>2021-02-13 15:51:32 +0100
commit7f8d069087ab31cfe502e6daad4e04a37399a125 (patch)
treed28ef924a485bccecf5a96df1d8461a7c400c2d9 /osdep/macosx_touchbar.h
parentaa00ad06aae264796a84327f1716534b4f37c622 (diff)
downloadmpv-7f8d069087ab31cfe502e6daad4e04a37399a125.tar.bz2
mpv-7f8d069087ab31cfe502e6daad4e04a37399a125.tar.xz
mac: only update touch bar items when necessary
the slider on the touch bar was always updated when any of the related properties changed their value. this is partially dependent on the refresh rate of the video, in the case of time-pos. too many updates to touch bar impact the render performance. to prevent this we only update the slider when necessary, when the touch bar or the touch bar item is visible. the touch bar items only need a granularity of seconds without any decimals, but the time-pos property provides a granularity with decimals. we floor those values and only update the touch bar items when we have at least a 1 second difference. we also check for the visibility of the touch bar and its items. Fixes #8477
Diffstat (limited to 'osdep/macosx_touchbar.h')
-rw-r--r--osdep/macosx_touchbar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/osdep/macosx_touchbar.h b/osdep/macosx_touchbar.h
index 0aa5a052bb..a03b68c0e6 100644
--- a/osdep/macosx_touchbar.h
+++ b/osdep/macosx_touchbar.h
@@ -41,5 +41,6 @@ struct mpv_event;
@property(nonatomic, retain) NSDictionary *touchbarItems;
@property(nonatomic, assign) double duration;
@property(nonatomic, assign) double position;
+@property(nonatomic, assign) int pause;
@end