mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Add option to check for addition chat message properties
This commit is contained in:
@@ -161,6 +161,7 @@ void TempVariableRef::Save(obs_data_t *obj, const char *name) const
|
||||
obs_data_set_int(data, "type", static_cast<int>(type));
|
||||
obs_data_set_int(data, "idx", GetIdx());
|
||||
obs_data_set_string(data, "id", _id.c_str());
|
||||
obs_data_set_int(data, "version", 1);
|
||||
obs_data_set_obj(obj, name, data);
|
||||
}
|
||||
|
||||
@@ -175,6 +176,14 @@ void TempVariableRef::Load(obs_data_t *obj, Macro *macro, const char *name)
|
||||
_id = obs_data_get_string(data, "id");
|
||||
const auto type =
|
||||
static_cast<SegmentType>(obs_data_get_int(data, "type"));
|
||||
|
||||
// Backwards compatibility checks
|
||||
if (obs_data_get_int(data, "version") < 1) {
|
||||
if (_id == "chatter") {
|
||||
_id = "user_login";
|
||||
}
|
||||
}
|
||||
|
||||
AddPostLoadStep([this, idx, type, macro]() {
|
||||
this->PostLoad(idx, type, macro);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user