Bläddra i källkod

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.
jp9000 5 år sedan
förälder
incheckning
ef0f21b273
1 ändrade filer med 2 tillägg och 5 borttagningar
  1. 2 5
      plugins/image-source/color-source.c

+ 2 - 5
plugins/image-source/color-source.c

@@ -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 = {