summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/lua/osc.lua29
1 files changed, 14 insertions, 15 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 262e679891..e06e1ef8ef 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -59,21 +59,6 @@ if user_opts.hidetimeout < 0 then
msg.warn("hidetimeout cannot be negative. Using " .. user_opts.hidetimeout)
end
--- validate window control options
-if user_opts.windowcontrols ~= "auto" and
- user_opts.windowcontrols ~= "yes" and
- user_opts.windowcontrols ~= "no" then
- msg.warn("windowcontrols cannot be \"" ..
- user_opts.windowcontrols .. "\". Ignoring.")
- user_opts.windowcontrols = "auto"
-end
-if user_opts.windowcontrols_alignment ~= "right" and
- user_opts.windowcontrols_alignment ~= "left" then
- msg.warn("windowcontrols_alignment cannot be \"" ..
- user_opts.windowcontrols_alignment .. "\". Ignoring.")
- user_opts.windowcontrols_alignment = "right"
-end
-
local osc_param = { -- calculated by osc_init()
playresy = 0, -- canvas size Y
playresx = 0, -- canvas size X
@@ -1645,6 +1630,20 @@ function validate_user_opts()
msg.warn("Using \"slider\" seekrangestyle together with \"bar\" seekbarstyle is not supported")
user_opts.seekrangestyle = "inverted"
end
+
+ if user_opts.windowcontrols ~= "auto" and
+ user_opts.windowcontrols ~= "yes" and
+ user_opts.windowcontrols ~= "no" then
+ msg.warn("windowcontrols cannot be \"" ..
+ user_opts.windowcontrols .. "\". Ignoring.")
+ user_opts.windowcontrols = "auto"
+ end
+ if user_opts.windowcontrols_alignment ~= "right" and
+ user_opts.windowcontrols_alignment ~= "left" then
+ msg.warn("windowcontrols_alignment cannot be \"" ..
+ user_opts.windowcontrols_alignment .. "\". Ignoring.")
+ user_opts.windowcontrols_alignment = "right"
+ end
end