From f8bafd4734f266c71aef450b355513948ecb2382 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 7 Jun 2016 17:47:12 +0900 Subject: stats: use redraw_delay for timer period Previously the delay was slightly shortened but a user explicitly setting a specific delay most likely expects the stats to refresh in exactly the frequency he desired. --- player/lua/stats.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/player/lua/stats.lua b/player/lua/stats.lua index d09125f378..dcda6eb06f 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -288,7 +288,7 @@ function b(t) end -local timer = mp.add_periodic_timer(o.redraw_delay - 0.1, function() print_stats(o.redraw_delay) end) +local timer = mp.add_periodic_timer(o.redraw_delay, function() print_stats(o.redraw_delay + 1) end) timer:kill() function toggle_stats() @@ -297,7 +297,7 @@ function toggle_stats() mp.osd_message("", 0) else timer:resume() - print_stats(o.redraw_delay) + print_stats(o.redraw_delay + 1) end end -- cgit v1.2.3