Finding the prefix in the key is not enough, the key has to actually start with the prefix. Otherwise a key like `uosc-font_scale` will not only match the `uosc-` prefix, but also the `osc-` prefix, resulting in a logged warning about `-font_scale` being an unknown key.
Showing the changes to player/lua/options.lua (1 of 1 file). Show all
Unified · Split
| @@ -110,7 +110,7 @@ local function read_options(options, identifier, on_update) · 109 unmodified lines | ||
| 110 | 110 | |
| 111 | 111 | local function parse_opts(full, options) |
| 112 | 112 | for key, val in pairs(full) do |
| 113 | − if not (string.find(key, prefix, 1, true) == nil) then | |
| 113 | + if string.find(key, prefix, 1, true) == 1 then | |
| 114 | 114 | key = string.sub(key, string.len(prefix)+1) |
| 115 | 115 | |
| 116 | 116 | -- match found values with defaults |