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:
+8
-1
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user