gfx-effect-source: Fix UI mode detection

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-08-07 17:45:32 +02:00
parent 5b9e6f0f1b
commit 98a18480d0

View file

@ -267,7 +267,7 @@ gfx::effect_source::value_parameter::value_parameter(std::shared_ptr<gs::effect>
std::shared_ptr<gs::effect_parameter> 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<gs::effec
std::shared_ptr<gs::effect_parameter> 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;