summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/defaults.lua13
-rw-r--r--player/lua/osc.lua2
2 files changed, 13 insertions, 2 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
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 8ce146d8e3..e131127922 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -1935,7 +1935,7 @@ end
function do_enable_keybindings()
if state.enabled then
- mp.enable_key_bindings("showhide", "allow-vo-dragging|allow-hide-cursor")
+ mp.enable_key_bindings("showhide", "allow-vo-dragging+allow-hide-cursor")
end
end