- fix issue #1708 - respect user preferences when specifying custom save/config/screenshot paths
This commit is contained in:
parent
dd07f6513f
commit
03d76027cf
5 changed files with 68 additions and 18 deletions
|
|
@ -2197,6 +2197,33 @@ FString G_BuildSaveName (const char *prefix, int slot)
|
|||
return name;
|
||||
}
|
||||
|
||||
CCMD(opensaves)
|
||||
{
|
||||
FString name;
|
||||
FString leader;
|
||||
const char *slash = "";
|
||||
|
||||
leader = Args->CheckValue ("-savedir");
|
||||
if (leader.IsEmpty())
|
||||
{
|
||||
leader = save_dir;
|
||||
if (leader.IsEmpty())
|
||||
{
|
||||
leader = M_GetSavegamesPath();
|
||||
}
|
||||
}
|
||||
size_t len = leader.Len();
|
||||
if (leader[0] != '\0' && leader[len-1] != '\\' && leader[len-1] != '/')
|
||||
{
|
||||
slash = "/";
|
||||
}
|
||||
name << leader << slash;
|
||||
name = NicePath(name);
|
||||
CreatePath(name);
|
||||
|
||||
I_OpenShellFolder(name);
|
||||
}
|
||||
|
||||
CVAR (Int, autosavenum, 0, CVAR_NOSET|CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
static int nextautosave = -1;
|
||||
CVAR (Int, disableautosave, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue