mirror of
https://github.com/mpv-player/mpv
synced 2024-12-29 02:22:19 +00:00
bca516bd2c
Not sure when this actually started happening, but it's probably been like this for years. Currently, the logic for the window-controls works by simply checking if the osc is visible and then either enabling or disabling the associated keybindings. The problem is that this can just constantly spam mp.enable_keybindings/disable_key_bindings on every single render call if the user disables the border at any point in time. This does a lot of pointless work and also results in the logs being spammed with lines like "disable-section". Clearly, this should just work like the code for checking the input keybindings just above it. Keep track of an internal state variable and check when it doesn't match the osc visibility. In that case, we can then either enable or disable the key bindings and just update the variable. |
||
---|---|---|
.. | ||
assdraw.lua | ||
auto_profiles.lua | ||
console.lua | ||
defaults.lua | ||
options.lua | ||
osc.lua | ||
stats.lua | ||
ytdl_hook.lua |