Improved Texture update handling

This commit is contained in:
Flamefire committed 2013-05-10 13:37:55 +02:00
1 parent dd96b61cae
commit a2c1ee67ad
14 files changed
+157 -116

No files matched your search

+12 -10
View File
@@ -438,19 +438,21 @@ namespace VocaluxeLib.Menu.SongMenu
if (_Actsong != _PreviewSelected)
_SelectSong(_PreviewSelected);
if (_Streams.Count > 0 && _Video != -1)
if (_Streams.Count <= 0 || _Video == -1)
return;
if (CBase.Video.IsFinished(_Video) || CBase.Sound.IsFinished(_Actsongstream))
{
if (CBase.Video.IsFinished(_Video) || CBase.Sound.IsFinished(_Actsongstream))
{
CBase.Video.Close(_Video);
_Video = -1;
return;
}
CBase.Video.Close(_Video);
_Video = -1;
return;
}
float time = CBase.Sound.GetPosition(_Actsongstream);
float time = CBase.Sound.GetPosition(_Actsongstream);
float vtime;
CBase.Video.GetFrame(_Video, ref _Vidtex, time, out vtime);
float vtime;
if (CBase.Video.GetFrame(_Video, ref _Vidtex, time, out vtime))
{
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
_Vidtex.Color.A = _VideoFadeTimer.ElapsedMilliseconds / 3000f;
else