Video modes are now handled separately

PortAudio.dll library update
This commit is contained in:
Stephan Sundermann committed 2012-03-08 19:16:49 +01:00
1 parent 817066ee45
commit 4a37ca024e
3 files changed
+24 -7

No files matched your search

Binary file not shown.
+18 -2
View File
@@ -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();
}
}
@@ -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();