mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
lua: fix options submodule
It polluted the global namespace, instead of exporting the function properly. For now, keep it compatible by explicitly keeping the bogus export. Also fix a mistake in the manpage example.
This commit is contained in:
@@ -30,7 +30,7 @@ local function typeconv(desttypeval, val)
|
||||
end
|
||||
|
||||
|
||||
function read_options(options, identifier)
|
||||
local function read_options(options, identifier)
|
||||
if identifier == nil then
|
||||
identifier = mp.get_script_name()
|
||||
end
|
||||
@@ -101,4 +101,9 @@ function read_options(options, identifier)
|
||||
|
||||
end
|
||||
|
||||
-- backwards compatibility with broken read_options export
|
||||
_G.read_options = read_options
|
||||
|
||||
return {
|
||||
read_options = read_options,
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ local user_opts = {
|
||||
}
|
||||
|
||||
-- read options from config and command-line
|
||||
read_options(user_opts, "osc")
|
||||
opt.read_options(user_opts, "osc")
|
||||
|
||||
local osc_param = { -- calculated by osc_init()
|
||||
playresy = 0, -- canvas size Y
|
||||
|
||||
Reference in New Issue
Block a user