cleanup
This commit is contained in:
@@ -443,28 +443,28 @@ try_element_again:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CString ThemeManager::GetPathToAndFallback( const CString &sThemeName, ElementCategory category, const CString &sClassName, const CString &sElement )
|
CString ThemeManager::GetPathToAndFallback( const CString &sThemeName, ElementCategory category, const CString &sClassName_, const CString &sElement )
|
||||||
{
|
{
|
||||||
CString sClass = sClassName;
|
CString sClassName = sClassName_;
|
||||||
|
|
||||||
int n = 100;
|
int n = 100;
|
||||||
while( n-- )
|
while( n-- )
|
||||||
{
|
{
|
||||||
// search with requested name
|
// search with requested name
|
||||||
CString sRet = GetPathToRaw( sThemeName, category, sClass, sElement );
|
CString sRet = GetPathToRaw( sThemeName, category, sClassName, sElement );
|
||||||
if( !sRet.empty() )
|
if( !sRet.empty() )
|
||||||
return sRet;
|
return sRet;
|
||||||
|
|
||||||
// search fallback name (if any)
|
// search fallback name (if any)
|
||||||
CString sFallback;
|
CString sFallback;
|
||||||
GetMetricRawRecursive( sClass, "Fallback", sFallback );
|
GetMetricRawRecursive( sClassName, "Fallback", sFallback );
|
||||||
if( sFallback.empty() )
|
if( sFallback.empty() )
|
||||||
return NULL;
|
return NULL;
|
||||||
sClass = sFallback;
|
sClassName = sFallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
RageException::Throw("Infinite recursion looking up theme element from theme \"%s\", class \"%s\"",
|
RageException::Throw("Infinite recursion looking up theme element from theme \"%s\", class \"%s\"",
|
||||||
sThemeName.c_str(), sClass.c_str() );
|
sThemeName.c_str(), sClassName.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
CString ThemeManager::GetPath( ElementCategory category, const CString &sClassName_, const CString &sElement_, bool bOptional )
|
CString ThemeManager::GetPath( ElementCategory category, const CString &sClassName_, const CString &sElement_, bool bOptional )
|
||||||
|
|||||||
Reference in New Issue
Block a user