From d4c7112a366583b48e3c8e416807fd4ca4b377f9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 14 Jun 2006 01:12:15 +0000 Subject: [PATCH] fix problem with SM erroring (nonfatal) when a song is played without a background --- stepmania/Themes/default/Scripts/Utilities.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/Themes/default/Scripts/Utilities.lua b/stepmania/Themes/default/Scripts/Utilities.lua index 7291fb7c38..e8c1570a27 100644 --- a/stepmania/Themes/default/Scripts/Utilities.lua +++ b/stepmania/Themes/default/Scripts/Utilities.lua @@ -97,6 +97,14 @@ function GetRandomSongBackground() return THEME:GetPathG("", "_blank") end +function GetSongBackground() + local Path = GAMESTATE:GetCurrentSong():GetBackgroundPath() + if not Path then + return THEME:GetPathG("Common","fallback background") + end + return Path +end + -- (c) 2005 Glenn Maynard, Chris Danford -- All rights reserved. --