Fix recently loaded tracking

Not present would return instantly; just chain it with the remove tail
This commit is contained in:
Kurt 2021-04-21 19:02:30 -07:00
parent 7256ff0a7f
commit 802275ced0

View File

@ -153,9 +153,8 @@ public GameVersion DefaultSaveVersion
public void LoadSaveFile(string path)
{
var recent = RecentlyLoaded;
if (!recent.Remove(path))
return;
if (recent.Count >= MaxRecentCount)
// Remove from list if already present.
if (!recent.Remove(path) && recent.Count >= MaxRecentCount)
recent.RemoveAt(recent.Count - 1);
recent.Insert(0, path);
}