- fixed: The check for savegames without picture was reversed.

- fixed: Savegames that were saved without picture did not display the 'No picture' message because the empty PNG container was still recognized as image.


SVN r2847 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-23 06:14:30 +00:00
parent b9185f7c62
commit 917e93e633

View file

@ -506,8 +506,12 @@ void DLoadSaveMenu::ExtractSaveData (int index)
// Extract pic // Extract pic
SavePic = PNGTexture_CreateFromFile(png, node->Filename); SavePic = PNGTexture_CreateFromFile(png, node->Filename);
delete png; delete png;
if (SavePic->GetWidth() == 1 && SavePic->GetHeight() == 1)
{
delete SavePic;
SavePic = NULL;
}
} }
fclose (file); fclose (file);
} }
@ -551,7 +555,7 @@ void DLoadSaveMenu::Drawer ()
if (SaveGames.Size() > 0) if (SaveGames.Size() > 0)
{ {
const char *text = const char *text =
(Selected == -1 || SaveGames[Selected]->bOldVersion) (Selected == -1 || !SaveGames[Selected]->bOldVersion)
? GStrings("MNU_NOPICTURE") : GStrings("MNU_DIFFVERSION"); ? GStrings("MNU_NOPICTURE") : GStrings("MNU_DIFFVERSION");
const int textlen = SmallFont->StringWidth (text)*CleanXfac; const int textlen = SmallFont->StringWidth (text)*CleanXfac;