Stopped save games from being deleteable outside menus

This commit is contained in:
Boondorl 2025-07-20 03:06:34 -04:00 committed by Ricardo Luís Vaz Silva
commit 53ffe3ddda

View file

@ -113,6 +113,11 @@ DEFINE_ACTION_FUNCTION(FSavegameManager, RemoveSaveSlot)
{
PARAM_SELF_STRUCT_PROLOGUE(FSavegameManagerBase);
PARAM_INT(sel);
if (!DMenu::InMenu)
{
Printf("Saves can only be deleted from within a menu\n");
ACTION_RETURN_INT(-1);
}
ACTION_RETURN_INT(self->RemoveSaveSlot(sel));
}