diff options
Diffstat (limited to 'player/lua/defaults.lua')
-rw-r--r-- | player/lua/defaults.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index bc9114ffa5..d0ef57cccd 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -31,6 +31,17 @@ function mp.input_define_section(section, contents, flags) mp.commandv("define-section", section, contents, flags) end +function mp.input_enable_section(section, flags) + if flags == nil then + flags = "" + end + mp.commandv("enable-section", section, flags) +end + +function mp.input_disable_section(section) + mp.commandv("disable-section", section) +end + -- For dispatching script_binding. This is sent as: -- script_message_to $script_name $binding_name $keystate -- The array is indexed by $binding_name, and has functions like this as value: @@ -140,7 +151,7 @@ local function update_key_bindings() end mp.input_define_section(section, cfg, flags) -- TODO: remove the section if the script is stopped - mp.input_enable_section(section, "allow-hide-cursor|allow-vo-dragging") + mp.input_enable_section(section, "allow-hide-cursor+allow-vo-dragging") end end |