|
From: Lasse Kärkkäi. <tr...@us...> - 2012-02-19 17:48:52
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Feb 19 19:48:45 2012 +0200
Do not try to load background/video when they don't exist.
---
game/screen_songs.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 7dc98e8..64d621c 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -157,10 +157,10 @@ void ScreenSongs::update() {
double pstart = (!m_jukebox && song ? song->preview_start : 0.0);
m_audio.playMusic(music, true, 2.0, pstart);
if (song) {
- std::string background = song->path + song->background;
- std::string video = song->path + song->video;
- if (!background.empty()) try { m_songbg.reset(new Surface(background)); } catch (std::exception const&) {}
- if (!video.empty() && config["graphic/video"].b()) m_video.reset(new Video(video, song->videoGap));
+ std::string background = song->background;
+ std::string video = song->video;
+ if (!background.empty()) try { m_songbg.reset(new Surface(song->path + background)); } catch (std::exception const&) {}
+ if (!video.empty() && config["graphic/video"].b()) m_video.reset(new Video(song->path + video, song->videoGap));
}
}
|