| 141 | } |
| 142 | |
| 143 | bool MacroConditionVariable::Load(obs_data_t *obj) |
| 144 | { |
| 145 | MacroCondition::Load(obj); |
| 146 | _variable = |
| 147 | GetWeakVariableByName(obs_data_get_string(obj, "variableName")); |
| 148 | _variable2 = GetWeakVariableByName( |
| 149 | obs_data_get_string(obj, "variable2Name")); |
| 150 | _strValue.Load(obj, "strValue"); |
| 151 | _numValue = obs_data_get_double(obj, "numValue"); |
| 152 | _type = static_cast<Condition>(obs_data_get_int(obj, "condition")); |
| 153 | _regex.Load(obj); |
| 154 | // TODO: remove in future version |
| 155 | if (obs_data_has_user_value(obj, "regex")) { |
| 156 | _regex.CreateBackwardsCompatibleRegex( |
| 157 | obs_data_get_bool(obj, "regex")); |
| 158 | } |
| 159 | return true; |
| 160 | } |
| 161 | |
| 162 | std::string MacroConditionVariable::GetShortDesc() const |
| 163 | { |
nothing calls this directly
no test coverage detected