Sidecar fix for the Deck menu hang bug: now the psp doesn't hang, but it goes to a crawl as we keep trying to reload the image on every render. Added a stopgap so that if we fail, we don't try to load the background anymore. To be reverted once we fix the PNG load failure on low memory.

This commit is contained in:
wrenczes@gmail.com
2010-11-10 02:43:28 +00:00
parent eea91e9a1a
commit f4fddda4ab

View File

@@ -95,10 +95,16 @@ void DeckMenu::RenderBackground()
{
ostringstream bgFilename;
bgFilename << backgroundName << ".png";
JQuad *background = resources.RetrieveTempQuad(bgFilename.str(), TEXTURE_SUB_5551);
if ( background )
JRenderer::GetInstance()->RenderQuad( background, 0, 0 );
static bool loadBackground = true;
if (loadBackground)
{
JQuad *background = resources.RetrieveTempQuad(bgFilename.str(), TEXTURE_SUB_5551);
if ( background )
JRenderer::GetInstance()->RenderQuad( background, 0, 0 );
else
loadBackground = false;
}
}
void DeckMenu::initMenuItems()