Forráskód Böngészése

UI: Recalculate main preview scale on video reset

Fixes a minor bug introduced by the windowless graphics context merge.
When setting a new base resolution, it would not recalculate the preview
size, and the preview would display the wrong size until the main window
was resized by the user.  This patch makes it so that it calls the
recalculation function when the base resolution is changed to prevent
that from happening.
jp9000 10 éve
szülő
commit
f3b76a72c7
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      obs/window-basic-main.cpp

+ 2 - 0
obs/window-basic-main.cpp

@@ -2043,6 +2043,8 @@ int OBSBasic::ResetVideo()
 			ovi.graphics_module = DL_OPENGL;
 			ret = AttemptToResetVideo(&ovi);
 		}
+	} else if (ret == OBS_VIDEO_SUCCESS) {
+		ResizePreview(ovi.base_width, ovi.base_height);
 	}
 
 	return ret;