mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
filter-transform: Migration code for earlier stable versions
This fixes #116 which was caused by a refactor in commit efb6b0b9be
. This bug was left undiscovered until users started upgrading from the last stable version to the current pre-release.
This commit is contained in:
parent
4f7c1cb35e
commit
18b3cd30bf
1 changed files with 14 additions and 0 deletions
|
@ -115,9 +115,23 @@ transform::transform_instance::~transform_instance()
|
|||
|
||||
void transform::transform_instance::load(obs_data_t* settings)
|
||||
{
|
||||
migrate_settings(settings);
|
||||
update(settings);
|
||||
}
|
||||
|
||||
inline void migrate_settings(obs_data_t* settings)
|
||||
{
|
||||
uint64_t version = static_cast<uint64_t>(obs_data_get_int(settings, S_VERSION));
|
||||
|
||||
switch (version & STREAMFX_MASK_COMPAT) {
|
||||
case 0:
|
||||
obs_data_set_double(settings, ST_ROTATION_X, -obs_data_get_double(settings, ST_ROTATION_X));
|
||||
obs_data_set_double(settings, ST_ROTATION_Y, -obs_data_get_double(settings, ST_ROTATION_Y));
|
||||
}
|
||||
|
||||
obs_data_set_int(settings, S_VERSION, STREAMFX_VERSION);
|
||||
}
|
||||
|
||||
void transform::transform_instance::update(obs_data_t* settings)
|
||||
{
|
||||
// Camera
|
||||
|
|
Loading…
Reference in a new issue