- Backend update from GZDoom

* IQM enhancements
* config storage in Users
* moving of savegame filename generation to the backend
This commit is contained in:
Christoph Oelckers 2022-11-06 11:46:26 +01:00
parent b4a49ea228
commit 41fc5660e5
25 changed files with 454 additions and 315 deletions

View file

@ -393,47 +393,6 @@ int G_ValidateSavegame(FileReader &fr, FString *savetitle, bool formenu)
return 0;
}
//=============================================================================
//
//
//
//=============================================================================
FString G_BuildSaveName (const char *prefix)
{
FString name;
bool usefilter;
if (const char *const dir = Args->CheckValue("-savedir"))
{
name = dir;
usefilter = false;
}
else
{
name = **cl_savedir ? cl_savedir : M_GetSavegamesPath();
usefilter = true;
}
const size_t len = name.Len();
if (len > 0)
{
name.Substitute("\\", "/");
if (name[len - 1] != '/')
name << '/';
}
if (usefilter)
name << LumpFilter << '/';
CreatePath(name);
name << prefix;
if (!strchr(prefix, '.')) name << SAVEGAME_EXT; // only add an extension if the prefix doesn't have one already.
name = NicePath(name);
name.Substitute("\\", "/");
return name;
}
#include "build.h"