diff --git a/Output/RequiredSkinElements.xml b/Output/RequiredSkinElements.xml index 7899e53d..a9ac470c 100644 --- a/Output/RequiredSkinElements.xml +++ b/Output/RequiredSkinElements.xml @@ -18,9 +18,7 @@ Minus RepeatIcon - - BG_Video - + Player1 Player2 diff --git a/Vocaluxe/Base/CVideoPlayer.cs b/Vocaluxe/Base/CVideoPlayer.cs index 86e8537b..3e0762f6 100644 --- a/Vocaluxe/Base/CVideoPlayer.cs +++ b/Vocaluxe/Base/CVideoPlayer.cs @@ -41,6 +41,10 @@ namespace Vocaluxe.Base public void Load(string videoName) { _VideoStream = CThemes.GetSkinVideo(videoName, -1, false); + if (_VideoStream == null) + { + return; + } _Loaded = true; CVideo.Pause(_VideoStream); } @@ -68,6 +72,11 @@ namespace Vocaluxe.Base public void Draw() { + if (!_Loaded) + { + return; + } + if (!_Finished) { float videoTime = _VideoTimer.ElapsedMilliseconds / 1000f; @@ -83,6 +92,10 @@ namespace Vocaluxe.Base public void PreLoad() { + if (!_Loaded) + { + return; + } bool paused = _VideoTimer.IsRunning; if (paused) CVideo.Resume(_VideoStream); diff --git a/Vocaluxe/Base/ThemeSystem/CSkin.cs b/Vocaluxe/Base/ThemeSystem/CSkin.cs index 5474177e..6e04b079 100644 --- a/Vocaluxe/Base/ThemeSystem/CSkin.cs +++ b/Vocaluxe/Base/ThemeSystem/CSkin.cs @@ -178,8 +178,8 @@ namespace Vocaluxe.Base.ThemeSystem CVideoSkinElement sk = new CVideoSkinElement {FileName = kvp.Value}; if (!File.Exists(Path.Combine(_Folder, sk.FileName))) { - CLog.LogError("Video \"" + kvp.Key + "\": (" + sk.FileName + ") not found!", true); - return false; + CLog.LogError("Video \"" + kvp.Key + "\": (" + sk.FileName + ") not found!"); + continue; } _Videos.Add(kvp.Key, sk); } diff --git a/VocaluxeLib/Menu/CBackground.cs b/VocaluxeLib/Menu/CBackground.cs index 548d10fa..611aa382 100644 --- a/VocaluxeLib/Menu/CBackground.cs +++ b/VocaluxeLib/Menu/CBackground.cs @@ -318,11 +318,15 @@ namespace VocaluxeLib.Menu private bool _DrawVideo() { - CBase.Video.GetFrame(_VideoStream, _VideoStream.VideoTime); - if (_VideoStream.Texture != null) + if (_VideoStream != null) { - CBase.Drawing.DrawTexture(_VideoStream.Texture, Rect, EAspect.Crop); - return true; + CBase.Video.GetFrame(_VideoStream, _VideoStream.VideoTime); + if (_VideoStream.Texture != null) + { + CBase.Drawing.DrawTexture(_VideoStream.Texture, Rect, EAspect.Crop); + return true; + } + return false; } return false; }