summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian <MyFakeAcc.4@googlemail.com>2017-01-21 14:31:46 +0100
committerwm4 <wm4@nowhere>2017-10-09 20:40:32 +0200
commitbd0d0befc01ca87700918822c306c3321318918d (patch)
tree71b685a339efbe7b2305654f380b83cac59bbe70
parent8bc6c91f4a2952909e1f9d8e79a170d09978369f (diff)
downloadmpv-bd0d0befc01ca87700918822c306c3321318918d.tar.bz2
mpv-bd0d0befc01ca87700918822c306c3321318918d.tar.xz
stats: put vsync ratio and jitter on the same line
Free some vertical space. Hope this doesn't hurt visibility.
-rw-r--r--player/lua/stats.lua25
1 files changed, 10 insertions, 15 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 5d2e1d6a42..887411bffe 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -320,28 +320,23 @@ local function append_display_sync(s)
{prefix="DS:" .. o.prefix_sep .. " - / ", prefix_sep=""})
end
- -- Since no graph is needed we can print ratio/jitter on the same line and save some space
- if not (o.plot_vsync_ratio or o.plot_vsync_jitter) then
- local vratio = append_property(s, "vsync-ratio", {prefix="VSync Ratio:"})
- append_property(s, "vsync-jitter", {prefix="VSync Jitter:", nl=vratio and "" or o.nl})
- return
- end
-
- -- As we potentially need to plot some graphs we print jitter and ratio on
- -- their own lines so we have the same layout when toggled (= drawing graphs)
- local ratio_graph = ""
- local jitter_graph = ""
- if o.ass_formatting and timer:is_enabled() then
+ -- As we need to plot some graphs we print jitter and ratio on their own lines
+ if timer:is_enabled() and (o.plot_vsync_ratio or o.plot_vsync_jitter) and o.ass_formatting then
+ local ratio_graph = ""
+ local jitter_graph = ""
if o.plot_vsync_ratio then
ratio_graph = generate_graph(vsratio_buf, vsratio_buf.pos, vsratio_buf.len, vsratio_buf.max, 0.8)
end
if o.plot_vsync_jitter then
jitter_graph = generate_graph(vsjitter_buf, vsjitter_buf.pos, vsjitter_buf.len, vsjitter_buf.max, 0.8)
end
+ append_property(s, "vsync-ratio", {prefix="VSync Ratio:", suffix=o.prefix_sep .. ratio_graph})
+ append_property(s, "vsync-jitter", {prefix="VSync Jitter:", suffix=o.prefix_sep .. jitter_graph})
+ else
+ -- Since no graph is needed we can print ratio/jitter on the same line and save some space
+ local vratio = append_property(s, "vsync-ratio", {prefix="VSync Ratio:"})
+ append_property(s, "vsync-jitter", {prefix="VSync Jitter:", nl="" or o.nl})
end
-
- append_property(s, "vsync-ratio", {prefix="VSync Ratio:", suffix=o.prefix_sep .. ratio_graph})
- append_property(s, "vsync-jitter", {prefix="VSync Jitter:", suffix=o.prefix_sep .. jitter_graph})
end