diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-06-20 13:08:37 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-06-20 13:08:37 +0900 |
| commit | 364c09d11fb1a8e319d8d08d9fd804f7b44317bf (patch) | |
| tree | 4a18d500f83d75dc3c3468f2b466ce2136a2bec8 /ar/.config/mpv/scripts/keep-window-size.lua | |
| parent | 6a0348deb81c8295e7a64ee04fe1f1bfa898543d (diff) | |
modified scripts/integrity-check.lua, modified scripts/keep-window-size.lua, modified scripts/slicing.lua, modified scripts/thumbfast.lua
Diffstat (limited to 'ar/.config/mpv/scripts/keep-window-size.lua')
| -rw-r--r-- | ar/.config/mpv/scripts/keep-window-size.lua | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/ar/.config/mpv/scripts/keep-window-size.lua b/ar/.config/mpv/scripts/keep-window-size.lua index a7ea077..1b7487c 100644 --- a/ar/.config/mpv/scripts/keep-window-size.lua +++ b/ar/.config/mpv/scripts/keep-window-size.lua @@ -5,19 +5,21 @@ local saved_w = nil local restoring = false mp.observe_property("osd-width", "number", function(_, w) - if w and w > 0 and not restoring then - saved_w = w - end + if w and w > 0 and not restoring then + saved_w = w + end end) mp.register_event("video-reconfig", function() - if not saved_w then return end - local dw = mp.get_property_number("dwidth") - if dw and dw > 0 then - restoring = true - mp.set_property_number("window-scale", saved_w / dw) - mp.add_timeout(0.3, function() - restoring = false - end) - end + if not saved_w then + return + end + local dw = mp.get_property_number("dwidth") + if dw and dw > 0 then + restoring = true + mp.set_property_number("window-scale", saved_w / dw) + mp.add_timeout(0.3, function() + restoring = false + end) + end end) |
