mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- added save_dir CVAR to customize saved games path
This commit is contained in:
parent
b70796db4c
commit
01050be226
1 changed files with 6 additions and 2 deletions
|
@ -53,6 +53,8 @@ static FResourceFile *savereader;
|
||||||
void LoadEngineState();
|
void LoadEngineState();
|
||||||
void SaveEngineState();
|
void SaveEngineState();
|
||||||
|
|
||||||
|
CVAR(String, save_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
// This is for keeping my sanity while working with the horrible mess
|
// This is for keeping my sanity while working with the horrible mess
|
||||||
|
@ -342,7 +344,9 @@ int G_ValidateSavegame(FileReader &fr, FString *savetitle, bool formenu)
|
||||||
|
|
||||||
FString G_BuildSaveName (const char *prefix)
|
FString G_BuildSaveName (const char *prefix)
|
||||||
{
|
{
|
||||||
FString name = M_GetSavegamesPath();
|
FString name = *save_dir;
|
||||||
|
if (name.IsEmpty())
|
||||||
|
name = M_GetSavegamesPath();
|
||||||
size_t len = name.Len();
|
size_t len = name.Len();
|
||||||
if (name[0] != '\0' && name[len-1] != '\\' && name[len-1] != '/')
|
if (name[0] != '\0' && name[len-1] != '\\' && name[len-1] != '/')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue