From 25512231285008496a6aad9f8101e5d46e5d631e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 5 Feb 2004 21:59:26 +0000 Subject: [PATCH] don't cache song backgrounds --- stepmania/src/Background.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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