From 98a18480d010b2fb8abb273f77d1b1481d994258 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 7 Aug 2019 17:45:32 +0200 Subject: [PATCH] gfx-effect-source: Fix UI mode detection --- source/gfx/gfx-effect-source.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gfx/gfx-effect-source.cpp b/source/gfx/gfx-effect-source.cpp index a215b0f7..8622d4e7 100644 --- a/source/gfx/gfx-effect-source.cpp +++ b/source/gfx/gfx-effect-source.cpp @@ -267,7 +267,7 @@ gfx::effect_source::value_parameter::value_parameter(std::shared_ptr std::shared_ptr mode = param->get_annotation("mode"); if (mode && (mode->get_type() == gs::effect_parameter::type::String)) { std::string mode_str = mode->get_default_string(); - if (strcmpi(mode_str.c_str(), "slider")) { + if (strcmpi(mode_str.c_str(), "slider") == 0) { _mode = value_mode::SLIDER; } else { _mode = value_mode::INPUT; @@ -522,7 +522,7 @@ gfx::effect_source::matrix_parameter::matrix_parameter(std::shared_ptr mode = param->get_annotation("mode"); if (mode && (mode->get_type() == gs::effect_parameter::type::String)) { std::string mode_str = mode->get_default_string(); - if (strcmpi(mode_str.c_str(), "slider")) { + if (strcmpi(mode_str.c_str(), "slider") == 0) { _mode = value_mode::SLIDER; } else { _mode = value_mode::INPUT;