From ab84537a6ee81a7f1c0984a87d6523d002a668d4 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 27 Nov 2021 07:59:24 +0100 Subject: [PATCH] gfx/shader/param-texture: Fix detection of enumerations and paths --- source/gfx/shader/gfx-shader-param-texture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/gfx/shader/gfx-shader-param-texture.cpp b/source/gfx/shader/gfx-shader-param-texture.cpp index 3933443c..459664c0 100644 --- a/source/gfx/shader/gfx-shader-param-texture.cpp +++ b/source/gfx/shader/gfx-shader-param-texture.cpp @@ -108,7 +108,8 @@ streamfx::gfx::shader::texture_parameter::texture_parameter(streamfx::gfx::shade // Value must be given, name is optional. if (auto eanno = get_parameter().get_annotation(key_value); - eanno && (get_type_from_effect_type(eanno.get_type()) == get_type())) { + eanno + && (get_type_from_effect_type(eanno.get_type()) == streamfx::gfx::shader::parameter_type::String)) { texture_enum_data entry; entry.data.file = std::filesystem::path(eanno.get_default_string()); @@ -210,7 +211,7 @@ void streamfx::gfx::shader::texture_parameter::properties(obs_properties_t* prop std::filesystem::path make_absolute_to(std::filesystem::path origin, std::filesystem::path destination) { auto destination_dir = std::filesystem::absolute(destination.remove_filename()); - return std::filesystem::absolute(origin / destination); + return std::filesystem::absolute(destination / origin); } void streamfx::gfx::shader::texture_parameter::update(obs_data_t* settings)