Temporarily stop lua error if no background.

Caveat: if no song background, nothing shows on
song load and the background jarringly comes in.

Feel free to revert if this is a bad idea.
This commit is contained in:
Jason Felds
2011-06-04 19:20:41 -04:00
parent 8db68f9b1c
commit 0b67f6bc64
+8 -1
View File
@@ -1499,7 +1499,14 @@ public:
static int GetSongDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongDir() ); return 1; }
static int GetMusicPath( T* p, lua_State *L ) { RString s = p->GetMusicPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; }
static int GetBannerPath( T* p, lua_State *L ) { RString s = p->GetBannerPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; }
static int GetBackgroundPath( T* p, lua_State *L ) { RString s = p->GetBackgroundPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; }
static int GetBackgroundPath( T* p, lua_State *L )
{
RString s = p->GetBackgroundPath();
if( s.empty() )
s = "";
lua_pushstring(L, s);
return 1;
}
static int GetCDTitlePath( T* p, lua_State *L ) { RString s = p->GetCDTitlePath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; }
static int GetLyricsPath( T* p, lua_State *L ) { RString s = p->GetLyricsPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; }
static int GetSongFilePath( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongFilePath() ); return 1; }