diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index a03e27cd..077afca4 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -271,6 +271,19 @@ namespace Vocaluxe.Screens CSound.SetGlobalVolume(CConfig.GameMusicVolume); } break; + + case Keys.V: + if (_VideoAspect == EAspect.Zoom2) + _VideoAspect = 0; + else + _VideoAspect++; + + CSong song = CGame.GetSong(); + song.VideoAspect = _VideoAspect; + + if (CConfig.SaveModifiedSongs == EOffOn.TR_CONFIG_ON) + song.Save(); + break; } } diff --git a/VocaluxeLib/CHelper.cs b/VocaluxeLib/CHelper.cs index c1c10d5e..7eb1cd7a 100644 --- a/VocaluxeLib/CHelper.cs +++ b/VocaluxeLib/CHelper.cs @@ -152,6 +152,30 @@ namespace VocaluxeLib scaledWidth = boundsH * rectAspect; } break; + case EAspect.Zoom1: + if (boundsAspect >= rectAspect) + { + scaledWidth = boundsW * 1.33f; + scaledHeight = boundsW * 1.33f / rectAspect; + } + else + { + scaledHeight = boundsH / 1.33f; + scaledWidth = boundsH / 1.33f * rectAspect; + } + break; + case EAspect.Zoom2: + if (boundsAspect >= rectAspect) + { + scaledWidth = boundsW * 1.17f; + scaledHeight = boundsW * 1.17f / rectAspect; + } + else + { + scaledHeight = boundsH / 1.17f; + scaledWidth = boundsH / 1.17f * rectAspect; + } + break; case EAspect.LetterBox: if (boundsAspect <= rectAspect) { diff --git a/VocaluxeLib/Enums.cs b/VocaluxeLib/Enums.cs index 4db6424c..13a57b6b 100644 --- a/VocaluxeLib/Enums.cs +++ b/VocaluxeLib/Enums.cs @@ -43,7 +43,9 @@ namespace VocaluxeLib { Crop, LetterBox, - Stretch + Stretch, + Zoom1, + Zoom2 } public enum EAlignment diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index 665beac4..a3752341 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -287,6 +287,11 @@ namespace VocaluxeLib.Songs return loader.ReadNotes(); } + public bool Save() + { + return Save(Path.Combine(Folder, FileName)); + } + public bool Save(string filePath) { var writer = new CSongWriter(this);