|
From: Lasse Kärkkäi. <tr...@us...> - 2012-07-03 23:41:24
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Jul 4 02:33:51 2012 +0300
Fix a song browser video playback regression introduced in da635890d22b18db56309c9d73f982dcadc10ee1.
Added the missing preparation pass.
---
game/screen_songs.cc | 5 +++++
game/screen_songs.hh | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 95a5d44..9dacfcf 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -164,6 +164,11 @@ void ScreenSongs::update() {
}
}
+void ScreenSongs::prepare() {
+ double time = m_audio.getPosition();
+ if (m_video) m_video->prepare(time);
+}
+
void ScreenSongs::drawJukebox() {
double pos = m_audio.getPosition();
double len = m_audio.getLength();
diff --git a/game/screen_songs.hh b/game/screen_songs.hh
index a04d18e..e8314cd 100644
--- a/game/screen_songs.hh
+++ b/game/screen_songs.hh
@@ -25,6 +25,7 @@ public:
void reloadGL();
void manageSharedKey(input::NavButton nav); ///< same behaviour for jukebox and normal mode
void manageEvent(SDL_Event event);
+ void prepare();
void draw();
void drawCovers(); ///< draw the cover browser
Surface& getCover(Song const& song); ///< get appropriate cover image for the song (incl. no cover)
|