Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions player/lua/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,27 @@ local function get_font()
end

local function get_margin_x()
return opts.margin_x > -1 and opts.margin_x or mp.get_property_native("osd-margin-x")
if opts.margin_x > -1 then
return opts.margin_x
end

if global_margins.t > 0 or global_margins.b > 0 then
return mp.get_property_native("option-info/osd-margin-x/default-value")
end

return mp.get_property_native("osd-margin-x")
end

local function get_margin_y()
return opts.margin_y > -1 and opts.margin_y or mp.get_property_native("osd-margin-y")
if opts.margin_y > -1 then
return opts.margin_y
end

if global_margins.t > 0 or global_margins.b > 0 then
return mp.get_property_native("option-info/osd-margin-y/default-value")
end

return mp.get_property_native("osd-margin-y")
end


Expand Down
Loading