Skip to content

Commit

Permalink
Rename on_options_configs_update() and add on_input_doubleclick_time_…
Browse files Browse the repository at this point in the history
…update()
  • Loading branch information
natural-harmonia-gropius committed Jan 7, 2024
1 parent de5987b commit 8b04d14
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions inputevent.lua
Original file line number Diff line number Diff line change
Expand Up @@ -427,21 +427,21 @@ function bind_from_options_configs()
end
end

function on_options_configs_update(list)
function on_options_update(list)
if (list.configs) then
bind_from_options_configs()
end
end

mp.observe_property("input-doubleclick-time", "native", function(_, new_duration)
function on_input_doubleclick_time_update(_, duration)
for _, binding in pairs(bind_map) do
binding:rebind({ duration = new_duration })
binding:rebind({ duration = duration })
end
end)
end

mp.register_script_message("bind", bind)
mp.register_script_message("unbind", unbind)

options.read_options(o, _, on_options_configs_update)
mp.observe_property("input-doubleclick-time", "native", on_input_doubleclick_time_update)
options.read_options(o, _, on_options_update)

bind_from_options_configs()

0 comments on commit 8b04d14

Please sign in to comment.