summaryrefslogtreecommitdiffstats
path: root/player/lua/stats.lua
diff options
context:
space:
mode:
authorJulian <MyFakeAcc.4@googlemail.com>2016-05-18 14:48:44 +0900
committerwm4 <wm4@nowhere>2017-10-09 20:40:31 +0200
commita87af63365954ea1cee9919e9167a6d2a6f7538f (patch)
tree3aa40afc425850c992b1bf280333b157f1707f11 /player/lua/stats.lua
parent2f5ee99509e9537b5272c86799bc15cc5b24e313 (diff)
downloadmpv-a87af63365954ea1cee9919e9167a6d2a6f7538f.tar.bz2
mpv-a87af63365954ea1cee9919e9167a6d2a6f7538f.tar.xz
stats: rename some functions
More useful names
Diffstat (limited to 'player/lua/stats.lua')
-rw-r--r--player/lua/stats.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index b9fd6daa93..a0dbf8a454 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -55,7 +55,7 @@ local o = {
options.read_options(o)
-function main(duration)
+function print_stats(duration)
local stats = {
header = "",
file = "",
@@ -286,23 +286,23 @@ function b(t)
end
-local timer = mp.add_periodic_timer(o.redraw_delay - 0.1, function() main(o.redraw_delay) end)
+local timer = mp.add_periodic_timer(o.redraw_delay - 0.1, function() print_stats(o.redraw_delay) end)
timer:kill()
-function periodic_main()
+function toggle_stats()
if timer:is_enabled() then
timer:kill()
mp.osd_message("", 0)
else
timer:resume()
- main(o.redraw_delay)
+ print_stats(o.redraw_delay)
end
end
-mp.add_key_binding(o.key_oneshot, "display_stats", main, {repeatable=true})
+mp.add_key_binding(o.key_oneshot, "display_stats", print_stats, {repeatable=true})
if pcall(function() timer:is_enabled() end) then
- mp.add_key_binding(o.key_toggle, "display_stats_toggle", periodic_main, {repeatable=false})
+ mp.add_key_binding(o.key_toggle, "display_stats_toggle", toggle_stats, {repeatable=false})
else
print("To use continious display of stats please upgrade mpv")
end