aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbasisbit <basisbit@b956fd51-792f-4845-bead-9b4dfca2ff2c>2015-10-17 00:19:39 +0000
committerbasisbit <basisbit@b956fd51-792f-4845-bead-9b4dfca2ff2c>2015-10-17 00:19:39 +0000
commit82a567fb55cbbe70d6d3c28f44a9c821b73faa08 (patch)
tree6b3659ade30a97fdf82770e6ce814c9be7aec5f2
parentaf55a8e31668335375621273eb82a77d801e55fc (diff)
downloadusdx-82a567fb55cbbe70d6d3c28f44a9c821b73faa08.tar.gz
usdx-82a567fb55cbbe70d6d3c28f44a9c821b73faa08.tar.xz
usdx-82a567fb55cbbe70d6d3c28f44a9c821b73faa08.zip
* allow to switch between background-video, background-image and projectM visualization
ToDo: fix showing the image when a background was played before. ToDo: rewrite and clean up TScreenSing.LoadNextSong() git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3145 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--src/screens/UScreenSing.pas28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas
index 50d2d6dd..48f8d8c6 100644
--- a/src/screens/UScreenSing.pas
+++ b/src/screens/UScreenSing.pas
@@ -78,8 +78,10 @@ type
TScreenSing = class(TMenu)
private
fShowVisualization: boolean;
+ fShowBackground: boolean;
fCurrentVideo: IVideo;
fVideoClip: IVideo;
+ fVideoClipStill: IVideo;
fLyricsSync: TLyricsSyncSource;
fMusicSync: TMusicSyncSource;
fTimebarMode: TTimebarMode;
@@ -205,19 +207,29 @@ begin
Exit;
end;
+ //ToDo basisbit: get this to work properly
// show visualization
Ord('V'):
begin
- fShowVisualization := not fShowVisualization;
-
- if fShowVisualization then
+ if (fShowVisualization = false) and (fShowBackground = true) then //only Background should be visible currently, switch to video
begin
- fCurrentVideo := Visualization.Open(PATH_NONE);
- fCurrentVideo.play;
+ fShowBackground := false;
+ fCurrentVideo := fVideoClip;
end
else
begin
- fCurrentVideo := fVideoClip;
+ if fShowVisualization then
+ begin //switch to Background only
+ fShowBackground := true;
+ fCurrentVideo := fVideoClipStill; //note: ffmpeg is used to show certain images, too
+ fShowVisualization := false;
+ end
+ else
+ begin //Video is currently visible, change to visualization
+ fShowVisualization := true;
+ fCurrentVideo := Visualization.Open(PATH_NONE);
+ fCurrentVideo.play;
+ end;
end;
Exit;
end;
@@ -816,12 +828,14 @@ begin
{*
* set background to: video
+ * Note: ffmpeg / this is also used for many background formats"
*}
fShowVisualization := false;
VideoFile := CurrentSong.Path.Append(CurrentSong.Video);
if (Ini.VideoEnabled = 1) and CurrentSong.Video.IsSet() and VideoFile.IsFile then
begin
fVideoClip := VideoPlayback.Open(VideoFile);
+ fVideoClipStill := VideoPlayback.Open(CurrentSong.Path.Append(CurrentSong.Background));
fCurrentVideo := fVideoClip;
if (fVideoClip <> nil) then
begin
@@ -997,7 +1011,7 @@ begin
// draw background picture (if any, and if no visualizations)
// when we don't check for visualizations the visualizations would
// be overdrawn by the picture when {UNDEFINED UseTexture} in UVisualizer
- if (not fShowVisualization) then
+ if (not fShowVisualization) or (fShowBackground) then
SingDrawBackground;
// set player names (for 2 screens and only singstar skin)