| 188 | } |
| 189 | |
| 190 | bool MacroActionWait::Load(obs_data_t *obj) |
| 191 | { |
| 192 | MacroAction::Load(obj); |
| 193 | _waitType = static_cast<Type>(obs_data_get_int(obj, "waitType")); |
| 194 | // TODO: remove this fallback |
| 195 | if (obs_data_get_int(obj, "version") == 1) { |
| 196 | _duration2.Load(obj, "duration2"); |
| 197 | } else { |
| 198 | _duration2.Load(obj, "seconds2"); |
| 199 | _duration2.SetUnit(static_cast<Duration::Unit>( |
| 200 | obs_data_get_int(obj, "displayUnit2"))); |
| 201 | } |
| 202 | _duration.Load(obj); |
| 203 | _variable = |
| 204 | GetWeakVariableByName(obs_data_get_string(obj, "variableName")); |
| 205 | _condition = static_cast<Condition>(obs_data_get_int(obj, "condition")); |
| 206 | _strValue.Load(obj, "strValue"); |
| 207 | _numValue.Load(obj, "numValue"); |
| 208 | _regex.Load(obj); |
| 209 | _useTimeout = obs_data_get_bool(obj, "useTimeout"); |
| 210 | _conditionTimeout.Load(obj, "conditionTimeout"); |
| 211 | return true; |
| 212 | } |
| 213 | |
| 214 | std::string MacroActionWait::GetShortDesc() const |
| 215 | { |
nothing calls this directly
no test coverage detected