~guidocella/mpv-image-config

d99118898768beb9e1562c8d49c727ed8b085dd6 — Guido Cella 1 year, 1 month ago 1ca7f79
simplify
1 files changed, 4 insertions(+), 4 deletions(-)

M scripts/align-images.lua
M scripts/align-images.lua => scripts/align-images.lua +4 -4
@@ 40,10 40,10 @@ mp.observe_property('video-out-params', 'native', function (_, params)
        end
    end

    if dims.w - dims.ml - dims.mr > dims.w then
    if dims.ml + dims.mr < 0 then
        mp.set_property('video-align-x', options.align_x)
    end
    if dims.h - dims.mt - dims.mb > dims.h then
    if dims.mt + dims.mb < 0 then
        mp.set_property('video-align-y', -1)
    end
end)


@@ 55,10 55,10 @@ mp.observe_property('osd-dimensions', 'native', function (_, dims)
        return
    end

    if dims.w - dims.ml - dims.mr < dims.w then
    if dims.ml + dims.mr > 0 then
        mp.set_property('video-align-x', 0)
    end
    if dims.h - dims.mt - dims.mb < dims.h then
    if dims.mt + dims.mb > 0 then
        mp.set_property('video-align-y', 0)
    end
end)