From b9153ee177387efeedd1d5294b07a49e928d2ebd Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Sep 2016 20:49:23 +0200 Subject: [PATCH] TOOLS/lua/observe-all: explicitly observe all options --- TOOLS/lua/observe-all.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/TOOLS/lua/observe-all.lua b/TOOLS/lua/observe-all.lua index be9f7270e4..0037439d5b 100644 --- a/TOOLS/lua/observe-all.lua +++ b/TOOLS/lua/observe-all.lua @@ -6,9 +6,17 @@ local utils = require("mp.utils") -for i,name in ipairs(mp.get_property_native("property-list")) do +function observe(name) mp.observe_property(name, "native", function(name, val) print("property '" .. name .. "' changed to '" .. utils.to_string(val) .. "'") end) end + +for i,name in ipairs(mp.get_property_native("property-list")) do + observe(name) +end + +for i,name in ipairs(mp.get_property_native("options")) do + observe("options/" .. name) +end