- 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
|
|
@ -313,6 +313,12 @@ UNSAFE_CCMD (writeini)
|
|||
}
|
||||
}
|
||||
|
||||
CCMD(openconfig)
|
||||
{
|
||||
M_SaveDefaults(nullptr);
|
||||
I_OpenShellFile(GameConfig->GetPathName());
|
||||
}
|
||||
|
||||
//
|
||||
// M_LoadDefaults
|
||||
//
|
||||
|
|
@ -657,3 +663,32 @@ UNSAFE_CCMD (screenshot)
|
|||
G_ScreenShot (argv[1]);
|
||||
}
|
||||
|
||||
CCMD(openscreenshots)
|
||||
{
|
||||
size_t dirlen;
|
||||
FString autoname;
|
||||
autoname = Args->CheckValue("-shotdir");
|
||||
if (autoname.IsEmpty())
|
||||
{
|
||||
autoname = screenshot_dir;
|
||||
}
|
||||
dirlen = autoname.Len();
|
||||
if (dirlen == 0)
|
||||
{
|
||||
autoname = M_GetScreenshotsPath();
|
||||
dirlen = autoname.Len();
|
||||
}
|
||||
if (dirlen > 0)
|
||||
{
|
||||
if (autoname[dirlen-1] != '/' && autoname[dirlen-1] != '\\')
|
||||
{
|
||||
autoname += '/';
|
||||
}
|
||||
}
|
||||
autoname = NicePath(autoname);
|
||||
|
||||
CreatePath(autoname);
|
||||
|
||||
I_OpenShellFolder(autoname.GetChars());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue