summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-07-16 10:33:46 +0300
committeravih <avih@users.noreply.github.com>2021-07-19 22:06:50 +0300
commit50280197e26e83210d63165572b6748e329d140f (patch)
treeece2a4a19d5af3e181a43c5174d0c52dfc5e0fb0
parent3e28c8e983c01c9892f40da5afa2f2dff65c6c75 (diff)
downloadmpv-50280197e26e83210d63165572b6748e329d140f.tar.bz2
mpv-50280197e26e83210d63165572b6748e329d140f.tar.xz
stats.lua: move internal performance from page 4 to page 0
This allows adding more pages without the internal performance page getting stuck at the middle of the list.
-rw-r--r--DOCS/man/stats.rst6
-rw-r--r--player/lua/stats.lua6
2 files changed, 6 insertions, 6 deletions
diff --git a/DOCS/man/stats.rst b/DOCS/man/stats.rst
index 2cf730f673..f9c125447c 100644
--- a/DOCS/man/stats.rst
+++ b/DOCS/man/stats.rst
@@ -24,7 +24,7 @@ stats:
1 Show usual stats
2 Show frame timings (scroll)
3 Input cache stats
-4 Internal stuff (scroll)
+0 Internal stuff (scroll)
==== ==================
On pages which support scroll, these key bindings are also active:
@@ -64,8 +64,8 @@ Configurable Options
Default: 2
``key_page_3``
Default: 3
-``key_page_4``
- Default: 4
+``key_page_0``
+ Default: 0
Key bindings for page switching while stats are displayed.
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index bfdf68aba6..653a367b77 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -18,7 +18,7 @@ local o = {
key_page_1 = "1",
key_page_2 = "2",
key_page_3 = "3",
- key_page_4 = "4",
+ key_page_0 = "0",
-- For pages which support scrolling
key_scroll_up = "UP",
key_scroll_down = "DOWN",
@@ -669,7 +669,7 @@ local function perf_stats()
local stats = {}
eval_ass_formatting()
add_header(stats)
- local page = pages[o.key_page_4]
+ local page = pages[o.key_page_0]
append(stats, "", {prefix=o.nl .. o.nl .. page.desc .. ":", nl="", indent=""})
page.offset = append_general_perfdata(stats, page.offset)
return table.concat(stats)
@@ -800,7 +800,7 @@ pages = {
[o.key_page_1] = { f = default_stats, desc = "Default" },
[o.key_page_2] = { f = vo_stats, desc = "Extended Frame Timings", scroll = true },
[o.key_page_3] = { f = cache_stats, desc = "Cache Statistics" },
- [o.key_page_4] = { f = perf_stats, desc = "Internal performance info", scroll = true },
+ [o.key_page_0] = { f = perf_stats, desc = "Internal performance info", scroll = true },
}