Fix banner precaching.
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include "Course.h"
|
#include "Course.h"
|
||||||
#include "RageDisplay.h"
|
#include "RageDisplay.h"
|
||||||
#include "RageTextureManager.h"
|
#include "RageTextureManager.h"
|
||||||
|
#include "Banner.h"
|
||||||
|
|
||||||
|
|
||||||
#define NUM_WHEEL_ITEMS min( MAX_WHEEL_ITEMS, THEME->GetMetricI("MusicWheel","NumWheelItems") )
|
#define NUM_WHEEL_ITEMS min( MAX_WHEEL_ITEMS, THEME->GetMetricI("MusicWheel","NumWheelItems") )
|
||||||
@@ -1047,32 +1048,33 @@ void MusicWheel::SetOpenGroup(CString group, SongSortOrder so)
|
|||||||
//
|
//
|
||||||
// cache banners
|
// cache banners
|
||||||
//
|
//
|
||||||
|
CString banner;
|
||||||
switch( from[i].m_Type )
|
switch( from[i].m_Type )
|
||||||
{
|
{
|
||||||
case TYPE_SONG:
|
case TYPE_SONG:
|
||||||
{
|
{
|
||||||
Song* pSong = from[i].m_pSong;
|
Song* pSong = from[i].m_pSong;
|
||||||
if( pSong->HasBanner() )
|
if( pSong->HasBanner() )
|
||||||
TEXTUREMAN->CacheTexture( pSong->GetBannerPath() );
|
banner = pSong->GetBannerPath();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_COURSE:
|
case TYPE_COURSE:
|
||||||
{
|
{
|
||||||
Course* pCourse = from[i].m_pCourse;
|
Course* pCourse = from[i].m_pCourse;
|
||||||
if( pCourse->HasBanner() )
|
if( pCourse->HasBanner() )
|
||||||
TEXTUREMAN->CacheTexture( pCourse->m_sBannerPath );
|
banner = pCourse->m_sBannerPath;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_SECTION:
|
case TYPE_SECTION:
|
||||||
{
|
{
|
||||||
CString sPath = SONGMAN->GetGroupBannerPath( from[i].m_sSectionName );
|
banner = SONGMAN->GetGroupBannerPath( from[i].m_sSectionName );
|
||||||
if( !sPath.empty() )
|
|
||||||
TEXTUREMAN->CacheTexture( sPath );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(banner != "")
|
||||||
|
TEXTUREMAN->CacheTexture( Banner::BannerTex(banner) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_iSelection = 0;
|
m_iSelection = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user