Skip to content

Commit

Permalink
- store current time in the save game node when saving a new game
Browse files Browse the repository at this point in the history
- when overwriting a save force it to reposition itself in the list in case any of its details have changed
  • Loading branch information
madame-rachelle committed Dec 29, 2024
1 parent 7c2cae5 commit 52b71c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/common/menu/savegamemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,26 @@ void FSavegameManagerBase::NotifyNewSave(const FString &file, const FString &tit
#endif
{
node->SaveTitle = title;
node->CreationTime = myasctime();
node->bOldVersion = false;
node->bMissingWads = false;

// refresh my game's position on the list (needed if time/name changed)
SaveGames.Delete(i);
int index = InsertSaveNode(node);

if (okForQuicksave)
{
if (quickSaveSlot == nullptr || quickSaveSlot == (FSaveGameNode*)1 || forceQuicksave) quickSaveSlot = node;
LastAccessed = LastSaved = i;
LastAccessed = LastSaved = index;
}
return;
}
}

auto node = new FSaveGameNode;
node->SaveTitle = title;
node->CreationTime = myasctime();
node->Filename = file;
node->bOldVersion = false;
node->bMissingWads = false;
Expand Down

0 comments on commit 52b71c9

Please sign in to comment.