Merge pull request #3377 from WizardCM/toolbar-fixes

UI: Don't save invalid colors via Source Toolbar (Freetype 2 Source)
master
Jim 2020-09-03 13:42:17 -07:00 committed by GitHub
commit ace0faebd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -574,7 +574,12 @@ void TextSourceToolbar::on_selectColor_clicked()
color = newColor;
obs_data_t *settings = obs_data_create();
obs_data_set_int(settings, "color", color_to_int(color));
if (!strncmp(obs_source_get_id(source), "text_ft2_source", 15)) {
obs_data_set_int(settings, "color1", color_to_int(color));
obs_data_set_int(settings, "color2", color_to_int(color));
} else {
obs_data_set_int(settings, "color", color_to_int(color));
}
obs_source_update(source, settings);
obs_data_release(settings);
}