mirror of https://github.com/mpv-player/mpv
DOCS/lua: update read_options example
This still shows the old way of calling read_options even though it was
deprecated 8 years in ago 327b091909
.
This commit is contained in:
parent
cf762c1482
commit
2016e902e1
|
@ -680,13 +680,13 @@ with values found in the config-file and the command-line (in that order).
|
||||||
|
|
||||||
Example implementation::
|
Example implementation::
|
||||||
|
|
||||||
require 'mp.options'
|
|
||||||
local options = {
|
local options = {
|
||||||
optionA = "defaultvalueA",
|
optionA = "defaultvalueA",
|
||||||
optionB = -0.5,
|
optionB = -0.5,
|
||||||
optionC = true,
|
optionC = true,
|
||||||
}
|
}
|
||||||
read_options(options, "myscript")
|
|
||||||
|
require "mp.options".read_options(options, "myscript")
|
||||||
print(options.optionA)
|
print(options.optionA)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue