Browse Source

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 years ago
parent
commit
f3b76a72c7
1 changed files with 2 additions and 0 deletions
  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;