diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index e4705f1c31..8f14a18106 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -318,6 +318,11 @@ void Background::LoadFromSong( const Song* pSong ) if( PREFSMAN->m_fBGBrightness == 0 ) return; + /* Song backgrounds (even just background stills) can get very big; never keep them + * in memory. */ + RageTexture::TexPolicy OldPolicy = TEXTUREMAN->GetDefaultTexturePolicy(); + TEXTUREMAN->SetDefaultTexturePolicy( RageTexture::TEX_VOLATILE ); + TEXTUREMAN->DisableOddDimensionWarning(); const float fXZoom = RECT_BACKGROUND.GetWidth() / (float)SCREEN_WIDTH; @@ -429,6 +434,8 @@ void Background::LoadFromSong( const Song* pSong ) if( m_pDancingCharacters ) m_pDancingCharacters->LoadNextSong(); + + TEXTUREMAN->SetDefaultTexturePolicy( OldPolicy ); } int Background::FindBGSegmentForBeat( float fBeat ) const