mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
vo_gpu_next: restore initial hook param value
If the parameter is removed from the `glsl-shader-opts` list, it should be restored to initial value.
This commit is contained in:
@@ -2116,6 +2116,11 @@ static void update_hook_opts(struct priv *p, char **opts, const char *shaderpath
|
||||
if (!mp_splitext(basename, &shadername))
|
||||
shadername = bstr0(basename);
|
||||
|
||||
for (int i = 0; i < hook->num_parameters; i++) {
|
||||
const struct pl_hook_par *hp = &hook->parameters[i];
|
||||
memcpy(hp->data, &hp->initial, sizeof(*hp->data));
|
||||
}
|
||||
|
||||
for (int n = 0; opts[n * 2]; n++) {
|
||||
struct bstr k = bstr0(opts[n * 2 + 0]);
|
||||
struct bstr v = bstr0(opts[n * 2 + 1]);
|
||||
|
||||
Reference in New Issue
Block a user