image-source: Don't use video info for color source size

The problem with using obs_get_video_info for a default is that the user
can change that value.  A default should not be a value that is subject
to change based upon the user's settings.

Instead, choose a sane "normal" value, like 1920x1080.  Later on, this
should be replaced with a system that allows automatic resizing via the
user.
This commit is contained in:
jp9000 2020-03-09 05:59:59 -07:00
parent 476c332a41
commit ef0f21b273

View File

@ -108,12 +108,9 @@ static void color_source_defaults_v1(obs_data_t *settings)
static void color_source_defaults_v2(obs_data_t *settings)
{
struct obs_video_info ovi;
obs_get_video_info(&ovi);
obs_data_set_default_int(settings, "color", 0xFFFFFFFF);
obs_data_set_default_int(settings, "width", ovi.base_width);
obs_data_set_default_int(settings, "height", ovi.base_height);
obs_data_set_default_int(settings, "width", 1920);
obs_data_set_default_int(settings, "height", 1080);
}
struct obs_source_info color_source_info_v1 = {