mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 04:42:10 +00:00
osc: fix borked options
This commit is contained in:
parent
a54ca2da31
commit
71b0c2b88c
@ -10,11 +10,11 @@ local msg = require 'mp.msg'
|
|||||||
-- default user option values
|
-- default user option values
|
||||||
-- do not touch, change them in plugin_osc.conf
|
-- do not touch, change them in plugin_osc.conf
|
||||||
local user_opts = {
|
local user_opts = {
|
||||||
show-windowed = true, -- show OSC when windowed?
|
showwindowed = true, -- show OSC when windowed?
|
||||||
show-fullscreen = true, -- show OSC when fullscreen?
|
showfullscreen = true, -- show OSC when fullscreen?
|
||||||
scale-windowed = 1, -- scaling of the controller when windowed
|
scalewindowed = 1, -- scaling of the controller when windowed
|
||||||
scale-fullscreen = 1, -- scaling of the controller when fullscreen
|
scalefullscreen = 1, -- scaling of the controller when fullscreen
|
||||||
scale-forcedwindow = 2, -- scaling of the controller when rendered on a forced (dummy) window
|
scaleforcedwindow = 2, -- scaling of the controller when rendered on a forced (dummy) window
|
||||||
vidscale = true, -- scale the controller with the video?
|
vidscale = true, -- scale the controller with the video?
|
||||||
valign = 0.8, -- vertical alignment, -1 (top) to 1 (bottom)
|
valign = 0.8, -- vertical alignment, -1 (top) to 1 (bottom)
|
||||||
halign = 0, -- horizontal alignment, -1 (left) to 1 (right)
|
halign = 0, -- horizontal alignment, -1 (left) to 1 (right)
|
||||||
@ -222,7 +222,7 @@ function get_slider_value(element)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function countone(val)
|
function countone(val)
|
||||||
if not (user_opts.iAmAProgrammer) then
|
if not (user_opts.iamaprogrammer) then
|
||||||
val = val + 1
|
val = val + 1
|
||||||
end
|
end
|
||||||
return val
|
return val
|
||||||
@ -642,11 +642,11 @@ function osc_init()
|
|||||||
local scale = 1
|
local scale = 1
|
||||||
|
|
||||||
if (mp.property_get("video") == "no") then -- dummy/forced window
|
if (mp.property_get("video") == "no") then -- dummy/forced window
|
||||||
scale = user_opts.scaleForcedWindow
|
scale = user_opts.scaleforcedwindow
|
||||||
elseif (mp.property_get("fullscreen") == "yes") then
|
elseif (mp.property_get("fullscreen") == "yes") then
|
||||||
scale = user_opts.scaleFullscreen
|
scale = user_opts.scalefullscreen
|
||||||
else
|
else
|
||||||
scale = user_opts.scaleWindowed
|
scale = user_opts.scalewindowed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -791,7 +791,7 @@ function osc_init()
|
|||||||
-- Smaller buttons
|
-- Smaller buttons
|
||||||
--
|
--
|
||||||
|
|
||||||
if not (user_opts.iAmAProgrammer) then
|
if not (user_opts.iamaprogrammer) then
|
||||||
update_tracklist()
|
update_tracklist()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -801,7 +801,7 @@ function osc_init()
|
|||||||
local eventresponder = {}
|
local eventresponder = {}
|
||||||
local contentF
|
local contentF
|
||||||
|
|
||||||
if not (user_opts.iAmAProgrammer) then
|
if not (user_opts.iamaprogrammer) then
|
||||||
metainfo.enabled = (#tracks_osc.audio > 0)
|
metainfo.enabled = (#tracks_osc.audio > 0)
|
||||||
|
|
||||||
contentF = function (ass)
|
contentF = function (ass)
|
||||||
@ -838,7 +838,7 @@ function osc_init()
|
|||||||
local eventresponder = {}
|
local eventresponder = {}
|
||||||
local contentF
|
local contentF
|
||||||
|
|
||||||
if not (user_opts.iAmAProgrammer) then
|
if not (user_opts.iamaprogrammer) then
|
||||||
metainfo.enabled = (#tracks_osc.sub > 0)
|
metainfo.enabled = (#tracks_osc.sub > 0)
|
||||||
|
|
||||||
contentF = function (ass)
|
contentF = function (ass)
|
||||||
@ -1203,7 +1203,7 @@ end
|
|||||||
|
|
||||||
-- called by mpv on every frame
|
-- called by mpv on every frame
|
||||||
function tick()
|
function tick()
|
||||||
if (mp.property_get("fullscreen") == "yes" and user_opts.showFullscreen) or (mp.property_get("fullscreen") == "no" and user_opts.showWindowed) then
|
if (mp.property_get("fullscreen") == "yes" and user_opts.showfullscreen) or (mp.property_get("fullscreen") == "no" and user_opts.showwindowed) then
|
||||||
render()
|
render()
|
||||||
else
|
else
|
||||||
mp.set_osd_ass(osc_param.playresy, osc_param.playresy, "")
|
mp.set_osd_ass(osc_param.playresy, osc_param.playresy, "")
|
||||||
|
Loading…
Reference in New Issue
Block a user