From 3bec24f4ff6d95f5ede4daac814089d0877fa8e5 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sat, 30 Jun 2018 11:06:50 +0200 Subject: [PATCH 1/4] Fix: Config.Video.VideoPreview is ignored (fixes #391) --- VocaluxeLib/Utils/Player/CSongPlayer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VocaluxeLib/Utils/Player/CSongPlayer.cs b/VocaluxeLib/Utils/Player/CSongPlayer.cs index 3ae765f4..218eef90 100644 --- a/VocaluxeLib/Utils/Player/CSongPlayer.cs +++ b/VocaluxeLib/Utils/Player/CSongPlayer.cs @@ -110,6 +110,10 @@ namespace VocaluxeLib.Utils.Player if (_Video != null || !SongHasVideo) return; + + if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_OFF) + return; + string videoFilePath = Path.Combine(_Song.Folder, _Song.VideoFileName); _Video = CBase.Video.Load(videoFilePath); if (_Video == null) From b3143bc908e27f2ea0e9ddcab9a6cd96592442b3 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 15 Jan 2020 22:30:43 +0100 Subject: [PATCH 2/4] Remove checking of CBase.Config.GetVideoPreview() --- VocaluxeLib/Utils/Player/CSongPlayer.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/VocaluxeLib/Utils/Player/CSongPlayer.cs b/VocaluxeLib/Utils/Player/CSongPlayer.cs index 218eef90..7f166ea1 100644 --- a/VocaluxeLib/Utils/Player/CSongPlayer.cs +++ b/VocaluxeLib/Utils/Player/CSongPlayer.cs @@ -111,9 +111,6 @@ namespace VocaluxeLib.Utils.Player if (_Video != null || !SongHasVideo) return; - if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_OFF) - return; - string videoFilePath = Path.Combine(_Song.Folder, _Song.VideoFileName); _Video = CBase.Video.Load(videoFilePath); if (_Video == null) @@ -179,4 +176,4 @@ namespace VocaluxeLib.Utils.Player _CloseVideo(); } } -} \ No newline at end of file +} From 5a8c88a11ee4d1cbdc4218bbdec7e9d0d05a4115 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 15 Jan 2020 22:32:47 +0100 Subject: [PATCH 3/4] Fix: Config.Video.VideoPreview is ignored (fixes #391) --- VocaluxeLib/Menu/SongMenu/CSongMenuList.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index 2c85058a..61b9a73c 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs @@ -511,7 +511,9 @@ namespace VocaluxeLib.Menu.SongMenu } _TextBG.Draw(); - CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; + CTextureRef vidtex = null; + if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON) + vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null); if (vidtex != null) { @@ -653,4 +655,4 @@ namespace VocaluxeLib.Menu.SongMenu base.LoadSkin(); } } -} \ No newline at end of file +} From aa7427a4d61bd0a02435eb5568c5c65acc87b94f Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 15 Jan 2020 22:33:43 +0100 Subject: [PATCH 4/4] Fix: Config.Video.VideoPreview is ignored (fixes #391) --- VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs index 18bcad8f..478c918b 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs @@ -485,7 +485,9 @@ namespace VocaluxeLib.Menu.SongMenu _TextBG.Draw(); - CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; + CTextureRef vidtex = null; + if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON) + vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null); if (vidtex != null) { @@ -608,4 +610,4 @@ namespace VocaluxeLib.Menu.SongMenu Init(); } } -} \ No newline at end of file +}