Shaders fix for duplicate parameters loading bug

This commit is contained in:
Remi McGill 2020-12-31 15:50:55 -05:00
parent 5f10db2c61
commit 7a565d739d
2 changed files with 8 additions and 0 deletions

View File

@ -2236,6 +2236,10 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
video_shader_parameter *param = &shader->parameters[shader->num_parameters];
strlcpy(param->id, meta_param.id.c_str(), sizeof(param->id));
strlcpy(param->desc, meta_param.desc.c_str(), sizeof(param->desc));
param->initial = meta_param.initial;
param->minimum = meta_param.minimum;
param->maximum = meta_param.maximum;
param->step = meta_param.step;
chain->add_parameter(i, shader->num_parameters, meta_param.id);
shader->num_parameters++;
}

View File

@ -2646,6 +2646,10 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
video_shader_parameter *param = &shader->parameters[shader->num_parameters];
strlcpy(param->id, meta_param.id.c_str(), sizeof(param->id));
strlcpy(param->desc, meta_param.desc.c_str(), sizeof(param->desc));
param->initial = meta_param.initial;
param->minimum = meta_param.minimum;
param->maximum = meta_param.maximum;
param->step = meta_param.step;
chain->add_parameter(i, shader->num_parameters, meta_param.id);
shader->num_parameters++;
}