diff --git a/Output/x86/PortAudio.dll b/Output/x86/PortAudio.dll index 4588ded3..a91a1516 100644 Binary files a/Output/x86/PortAudio.dll and b/Output/x86/PortAudio.dll differ diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 95779f67..2a5d76c2 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -28,6 +28,7 @@ namespace Vocaluxe.Base private static bool _BackgroundMusicAdded; private static bool _Playing; private static bool _VideoEnabled; + private static bool _SmallVideoIsEnabled; private static int _Video = -1; private static STexture _CurrentVideoTexture = new STexture(-1); @@ -71,7 +72,7 @@ namespace Vocaluxe.Base } else Next(); - if (_VideoEnabled) + if ((_VideoEnabled && _SmallVideoIsEnabled) || (_VideoEnabled && VideoToBackgroundIsEnabled())) LoadVideo(); } } @@ -356,6 +357,17 @@ namespace Vocaluxe.Base return CConfig.VideosToBackground == EOffOn.TR_CONFIG_ON; } + public static bool SmallVideoIsEnabled() + { + return _SmallVideoIsEnabled; + } + + public static void ToggleSmallVideo() + { + _SmallVideoIsEnabled = !_SmallVideoIsEnabled; + ApplyBackgroundVideo(); + } + public static bool HasVideo() { return File.Exists(_CurrentPlaylistElement.GetVideoFilePath()); @@ -386,7 +398,11 @@ namespace Vocaluxe.Base public static void ToggleVideoToBackground() { if (VideoToBackgroundIsEnabled()) + { CConfig.VideosToBackground = EOffOn.TR_CONFIG_OFF; + if (!_SmallVideoIsEnabled) //No videos are enabled so we should call ToggleVideo() to close + ToggleVideo(); + } else { CConfig.VideosToBackground = EOffOn.TR_CONFIG_ON; @@ -397,7 +413,7 @@ namespace Vocaluxe.Base public static void ApplyBackgroundVideo() { - if (!_VideoEnabled) + if (!_VideoEnabled && (!_SmallVideoIsEnabled || !VideoToBackgroundIsEnabled()) || (!_SmallVideoIsEnabled && !VideoToBackgroundIsEnabled())) //No videos are enabled so we should call ToggleVideo() to close ToggleVideo(); } } diff --git a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs index d95df149..51217b96 100644 --- a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs +++ b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs @@ -92,7 +92,7 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonRepeat)].Selected) CBackgroundMusic.Repeat(); if (Buttons[htButtons(ButtonShowVideo)].Selected) - CBackgroundMusic.ToggleVideo(); + CBackgroundMusic.ToggleSmallVideo(); if (Buttons[htButtons(ButtonSing)].Selected) StartSong(CBackgroundMusic.GetSongNr(), CBackgroundMusic.IsDuet()); if (Buttons[htButtons(ButtonToBackgroundVideo)].Selected) @@ -120,7 +120,7 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonRepeat)].Selected) CBackgroundMusic.Repeat(); if (Buttons[htButtons(ButtonShowVideo)].Selected) - CBackgroundMusic.ToggleVideo(); + CBackgroundMusic.ToggleSmallVideo(); if (Buttons[htButtons(ButtonSing)].Selected) StartSong(CBackgroundMusic.GetSongNr(), CBackgroundMusic.IsDuet()); if (Buttons[htButtons(ButtonToBackgroundVideo)].Selected) @@ -139,8 +139,9 @@ namespace Vocaluxe.Screens public override bool UpdateGame() { + Statics[htStatics(StaticCover)].Visible = !CBackgroundMusic.SmallVideoIsEnabled(); Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = CBackgroundMusic.VideoToBackgroundIsEnabled(); - Buttons[htButtons(ButtonShowVideo)].Pressed = CBackgroundMusic.IsVideoEnabled(); + Buttons[htButtons(ButtonShowVideo)].Pressed = CBackgroundMusic.SmallVideoIsEnabled(); return true; } @@ -157,12 +158,12 @@ namespace Vocaluxe.Screens if (CBackgroundMusic.IsVideoEnabled() && CBackgroundMusic.HasVideo()) { Statics[htStatics(StaticCover)].Texture = CBackgroundMusic.GetCover(); - Statics[htStatics(StaticCover)].Visible = false; + //Statics[htStatics(StaticCover)].Visible = false; CDraw.DrawTexture(Statics[htStatics(StaticCover)], CBackgroundMusic.GetVideoTexture(), EAspect.Crop); } else { - Statics[htStatics(StaticCover)].Visible = true; + //Statics[htStatics(StaticCover)].Visible = true; Statics[htStatics(StaticCover)].Texture = CBackgroundMusic.GetCover(); } Buttons[htButtons(ButtonPause)].Visible = CBackgroundMusic.IsPlaying();