summaryrefslogtreecommitdiff
path: root/osd.lua
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-01-09 13:04:36 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-01-09 13:04:36 -0800
commit7428ae5098fdbd351fa3c9c470699ce71dd3b9a5 (patch)
tree701a93fcad5eee4f387dae80865883cdfa8155ed /osd.lua
parent765958208afde583447f97063779a308af678109 (diff)
downloadmpv-iptv-menu-7428ae5098fdbd351fa3c9c470699ce71dd3b9a5.tar.gz
mpv-iptv-menu-7428ae5098fdbd351fa3c9c470699ce71dd3b9a5.tar.xz
avoid image redraws when minimal space remains
Diffstat (limited to 'osd.lua')
-rw-r--r--osd.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/osd.lua b/osd.lua
index 7f44f60..f9d4078 100644
--- a/osd.lua
+++ b/osd.lua
@@ -278,9 +278,9 @@ function mt:set_img(path, menu_res)
-- line is. if it were possible to place images *under* text, maybe
-- we'd allow overlap, but mpv currently hard-codes this order.
local min_h = math.floor(3 * fs)
- local max_h = math.floor(math.min(
+ local max_h = math.floor(math.max(min_h, math.min(
self.height - 2*padding,
- (self.width - start - 2*padding) * 3/2))
+ (self.width - start - 2*padding) * 3/2)))
local max_w = math.floor(max_h * 2/3)
local top = math.floor(padding)
local right = math.floor(self.width - padding)