From 00d80a6163e40ce4e4893aa7bb03a8f0b6c7e983 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Wed, 12 Mar 2014 16:20:25 +0100 Subject: [PATCH] Only draw the current video --- Vocaluxe/Screens/CScreenLoad.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Vocaluxe/Screens/CScreenLoad.cs b/Vocaluxe/Screens/CScreenLoad.cs index 35ce9d38..4b6cf767 100644 --- a/Vocaluxe/Screens/CScreenLoad.cs +++ b/Vocaluxe/Screens/CScreenLoad.cs @@ -38,7 +38,7 @@ namespace Vocaluxe.Screens private Thread _SongLoaderThread; private bool _SkipIntro; - private int _CurrentIntroVideoNr; + private int _CurrentIntroVideo; private bool _IntroOutPlayed; private CVideoPlayer[] _Intros; @@ -106,7 +106,7 @@ namespace Vocaluxe.Screens CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")"; _SkipIntro = false; - _CurrentIntroVideoNr = -1; + _CurrentIntroVideo = -1; _IntroOutPlayed = false; if (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON) @@ -182,8 +182,8 @@ namespace Vocaluxe.Screens { _DrawBG(); - foreach (CVideoPlayer videoPlayer in _Intros) - videoPlayer.Draw(); + if (_CurrentIntroVideo >= 0 && _CurrentIntroVideo < _Intros.Length) + _Intros[_CurrentIntroVideo].Draw(); _DrawFG(); return true; @@ -217,24 +217,24 @@ namespace Vocaluxe.Screens return; } - if (_CurrentIntroVideoNr < 0) + if (_CurrentIntroVideo < 0) { - _CurrentIntroVideoNr = 0; + _CurrentIntroVideo = 0; _Intros[0].Start(); } - else if (_CurrentIntroVideoNr == 0 && _Intros[0].IsFinished && CConfig.CoverLoading == ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART) + else if (_CurrentIntroVideo == 0 && _Intros[0].IsFinished && CConfig.CoverLoading == ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART) { - _CurrentIntroVideoNr = 1; + _CurrentIntroVideo = 1; _Intros[1].Loop = true; _Intros[1].Start(); } - else if ((_CurrentIntroVideoNr == 1 && CSongs.CoverLoaded) || - (_CurrentIntroVideoNr == 0 && _Intros[0].IsFinished)) + else if ((_CurrentIntroVideo == 1 && CSongs.CoverLoaded) || + (_CurrentIntroVideo == 0 && _Intros[0].IsFinished)) { - _CurrentIntroVideoNr = 2; + _CurrentIntroVideo = 2; _Intros[2].Start(); } - else if (_CurrentIntroVideoNr == 2 && _Intros[2].IsFinished) + else if (_CurrentIntroVideo == 2 && _Intros[2].IsFinished) _IntroOutPlayed = true; } }