diff options
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/stats.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 4ae5aaa73a..c823541ffc 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -280,6 +280,14 @@ local function append_property(s, prop, attr, excluded) return append(s, ret, attr) end +local function sorted_keys(t, comp_fn) + local keys = {} + for k,_ in pairs(t) do + keys[#keys+1] = k + end + table.sort(keys, comp_fn) + return keys +end local function append_perfdata(s, dedicated_page) local vo_p = mp.get_property_native("vo-passes") @@ -327,7 +335,8 @@ local function append_perfdata(s, dedicated_page) b("Frame Timings:"), o.prefix_sep, o.font_size * 0.66, "(last/average/peak μs)", o.font_size) - for frame, data in pairs(vo_p) do + for _,frame in ipairs(sorted_keys(vo_p)) do -- ensure fixed display order + local data = vo_p[frame] local f = "%s%s%s{\\fn%s}%s / %s / %s %s%s{\\fn%s}%s%s%s" if dedicated_page then |