Skip to content

Commit

Permalink
experimental improvements to memory use, keep until they look like sh…
Browse files Browse the repository at this point in the history
…it or break the game?
  • Loading branch information
MinaciousGrace committed May 5, 2017
1 parent 279150b commit 2525925
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/BannerCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ void BannerCache::CacheBannerInternal( const RString &sBannerPath )

const int iSourceWidth = pImage->w, iSourceHeight = pImage->h;

int iWidth = pImage->w / 2, iHeight = pImage->h / 2;
// int iWidth = pImage->w, iHeight = pImage->h;
// cap banners to reasonable dimensions....? -mina
int iWidth = min(pImage->w, 512), iHeight = min(pImage->h, 160);

/* Round to the nearest power of two. This simplifies the actual texture load. */
iWidth = closest( iWidth, power_of_two(iWidth), power_of_two(iWidth) / 2 );
Expand Down
3 changes: 2 additions & 1 deletion src/RageBitmapTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ void RageBitmapTexture::Create()
actualID.iGrayscaleBits = -1;

/* Cap the max texture size to the hardware max. */
actualID.iMaxSize = min( actualID.iMaxSize, DISPLAY->GetMaxTextureSize() );
// and then divide by 2 because we dont need to see text in 4k to mash buttons -mina
actualID.iMaxSize = min( actualID.iMaxSize/2, DISPLAY->GetMaxTextureSize() );

/* Save information about the source. */
m_iSourceWidth = pImg->w;
Expand Down

0 comments on commit 2525925

Please sign in to comment.