mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 19:10:50 +00:00
- Fixed: the new savegame order didn't take into account custom filenames. Try to catch most custom names.
This commit is contained in:
parent
ee41e9d93a
commit
f48c52291c
1 changed files with 16 additions and 9 deletions
|
@ -123,29 +123,36 @@ DEFINE_ACTION_FUNCTION(FSavegameManager, RemoveSaveSlot)
|
||||||
|
|
||||||
int FSavegameManager::InsertSaveNode(FSaveGameNode *node)
|
int FSavegameManager::InsertSaveNode(FSaveGameNode *node)
|
||||||
{
|
{
|
||||||
if (SaveGames.Size() == 0)
|
if (SaveGames.Size() == 0 || node->bOldVersion)
|
||||||
{
|
|
||||||
return SaveGames.Push(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node->bOldVersion)
|
|
||||||
{ // Add node at bottom of list
|
{ // Add node at bottom of list
|
||||||
return SaveGames.Push(node);
|
return SaveGames.Push(node);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Add node at top of list
|
{ // Add node at top of list
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
if (!strstr(node->Filename.GetChars(),"auto"))
|
if (strstr(node->Filename.GetChars(),"save"))
|
||||||
{
|
{
|
||||||
for (i = 0; i < SaveGames.Size(); i++)
|
for (i; i < SaveGames.Size(); i++)
|
||||||
{
|
{
|
||||||
//if (SaveGames[i]->bOldVersion || node->SaveTitle.CompareNoCase(SaveGames[i]->SaveTitle) <= 0)
|
//if (SaveGames[i]->bOldVersion || node->SaveTitle.CompareNoCase(SaveGames[i]->SaveTitle) <= 0)
|
||||||
if (!strstr(SaveGames[i]->Filename.GetChars(),"auto") && node->Filename.CompareNoCase(SaveGames[i]->Filename) >= 0)
|
if (strstr(SaveGames[i]->Filename.GetChars(),"save") && node->Filename.CompareNoCase(SaveGames[i]->Filename) >= 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!strstr(node->Filename.GetChars(),"auto"))
|
||||||
|
{
|
||||||
|
for (i; strstr(SaveGames[i]->Filename.GetChars(),"auto") && i < SaveGames.Size(); i++)
|
||||||
|
{}
|
||||||
|
for (i; i < SaveGames.Size(); i++)
|
||||||
|
{
|
||||||
|
if (strstr(SaveGames[i]->Filename.GetChars(),"save") || (!strstr(SaveGames[i]->Filename.GetChars(),"save") && node->Filename.CompareNoCase(SaveGames[i]->Filename) <= 0))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
SaveGames.Insert(i, node);
|
SaveGames.Insert(i, node);
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
|
Loading…
Reference in a new issue