- Attempt at solving issue 247 (missing background image for trophy room). I think I attempted that a while ago and it caused some crashes, so let's revert this change if this happens
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-09-26 06:22:46 +00:00
parent 04ae98466b
commit ac435980ce
6 changed files with 23 additions and 13 deletions

View File

@@ -45,7 +45,7 @@ void WResourceManager::DebugRender(){
return;
font->SetScale(DEFAULT_MAIN_FONT_SCALE);
renderer->FillRect(0,0,SCREEN_WIDTH,20,ARGB(128,155,0,0));
renderer->FillRect(0,0,SCREEN_WIDTH,40,ARGB(128,155,0,0));
renderer->FillRect(0,SCREEN_HEIGHT-20,SCREEN_WIDTH,40,ARGB(128,155,0,0));
char buf[512];
@@ -66,6 +66,14 @@ void WResourceManager::DebugRender(){
font->DrawString(buf, 10,5);
#if defined (WIN32) || defined (LINUX)
#else
int maxLinear = ramAvailableLineareMax();
int ram = ramAvailable();
sprintf(buf, "Ram : linear max: %i - total : %i\n",maxLinear, ram);
font->DrawString(buf,10, 20);
#endif
sprintf(buf,"Time: %u. Total Size: %lu (%lu cached, %lu managed). ",lastTime,Size(),SizeCached(),SizeManaged());
font->DrawString(buf, SCREEN_WIDTH-10,SCREEN_HEIGHT-15,JGETEXT_RIGHT);
@@ -1341,8 +1349,9 @@ bool WCache<cacheItem, cacheActual>::Cleanup(){
|| ramAvailableLineareMax() < MIN_LINEAR_RAM
#endif
){
if (!RemoveOldest())
return false;
if (!RemoveOldest()) {
return false;
}
}
return true;
}