Fix starting bg-music when disabled on start.
This commit is contained in:
1 parent
0d79abcda8
commit
d227490124
1 file changed
+10
-10
@@ -392,16 +392,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static void CheckAndApplyConfig(EOffOn NewOnOff, EBackgroundMusicSource NewSource, float NewVolume)
|
public static void CheckAndApplyConfig(EOffOn NewOnOff, EBackgroundMusicSource NewSource, float NewVolume)
|
||||||
{
|
{
|
||||||
if (CConfig.BackgroundMusic != NewOnOff)
|
if (CConfig.BackgroundMusicSource != NewSource || (NewOnOff == EOffOn.TR_CONFIG_ON && !_OwnMusicAdded && !_BackgroundMusicAdded))
|
||||||
{
|
|
||||||
CConfig.BackgroundMusic = NewOnOff;
|
|
||||||
if (NewOnOff == EOffOn.TR_CONFIG_ON)
|
|
||||||
Play();
|
|
||||||
else
|
|
||||||
Pause();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CConfig.BackgroundMusicSource != NewSource)
|
|
||||||
{
|
{
|
||||||
CConfig.BackgroundMusicSource = NewSource;
|
CConfig.BackgroundMusicSource = NewSource;
|
||||||
|
|
||||||
@@ -430,6 +421,15 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CConfig.BackgroundMusic != NewOnOff)
|
||||||
|
{
|
||||||
|
CConfig.BackgroundMusic = NewOnOff;
|
||||||
|
if (NewOnOff == EOffOn.TR_CONFIG_ON)
|
||||||
|
Play();
|
||||||
|
else
|
||||||
|
Pause();
|
||||||
|
}
|
||||||
|
|
||||||
if (CConfig.BackgroundMusicVolume != NewVolume)
|
if (CConfig.BackgroundMusicVolume != NewVolume)
|
||||||
{
|
{
|
||||||
CConfig.BackgroundMusicVolume = (int)NewVolume;
|
CConfig.BackgroundMusicVolume = (int)NewVolume;
|
||||||
|
|||||||
Reference in new issue
Block a user