Automatic switch of aspect ratio for background
If the orig aspect ratio (width / height) is below or equal to 1.5, switch to EAspect.LetterBox. If not, leave it at EAspect.Crop (like in Vocaluxe before). Unfortunately the acinerella library, used by Vocaluxe, don't support reading of the DAR value of the video file. So the SAR value has to be correct in the video file, to see this automatic in action.
This commit is contained in:
1 parent
b651d7df4d
commit
69a87842e9
1 file changed
+3
-3
@@ -804,11 +804,11 @@ namespace Vocaluxe.Screens
|
||||
if (background != null)
|
||||
{
|
||||
SRectF bounds = CSettings.RenderRect;
|
||||
|
||||
if (_VideoAspect == EAspect.Automatic)
|
||||
|
||||
if (_VideoAspect == EAspect.Automatic)
|
||||
_VideoAspect = (background.OrigAspect <= 1.5 ? EAspect.LetterBox : EAspect.Crop);
|
||||
aspect = _VideoAspect;
|
||||
|
||||
|
||||
SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect);
|
||||
CDraw.DrawTexture(background, rect, background.Color, bounds);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user