| 123 | } |
| 124 | |
| 125 | bool MacroActionScreenshot::Load(obs_data_t *obj) |
| 126 | { |
| 127 | MacroAction::Load(obj); |
| 128 | _scene.Load(obj); |
| 129 | _source.Load(obj); |
| 130 | _saveType = static_cast<SaveType>(obs_data_get_int(obj, "saveType")); |
| 131 | _targetType = |
| 132 | static_cast<TargetType>(obs_data_get_int(obj, "targetType")); |
| 133 | _path.Load(obj, "savePath"); |
| 134 | _variable = GetWeakVariableByName(obs_data_get_string(obj, "variable")); |
| 135 | |
| 136 | // TODO: Remove fallback for older versions |
| 137 | if (!obs_data_has_user_value(obj, "version")) { |
| 138 | if (!_source.GetSource() && !_scene.GetScene(false)) { |
| 139 | _targetType = TargetType::MAIN_OUTPUT; |
| 140 | } |
| 141 | } |
| 142 | return true; |
| 143 | } |
| 144 | |
| 145 | std::string MacroActionScreenshot::GetShortDesc() const |
| 146 | { |
no test coverage detected