mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 13:55:36 -04:00
Merge pull request #1302 from fabiangreffrath/auto_organize_savefiles
enable "Organize save files" if no savegame found in old location
This commit is contained in:
commit
aec003bb3a
17
src/d_main.c
17
src/d_main.c
@ -2451,7 +2451,21 @@ void D_DoomMain(void)
|
||||
|
||||
PrintVersion();
|
||||
|
||||
if (!M_CheckParm("-save") && organize_savefiles)
|
||||
if (!M_CheckParm("-save"))
|
||||
{
|
||||
if (organize_savefiles == -1)
|
||||
{
|
||||
// [FG] check for at least one savegame in the old location
|
||||
glob_t *glob = I_StartMultiGlob(basesavegame,
|
||||
GLOB_FLAG_NOCASE|GLOB_FLAG_SORTED,
|
||||
"*.dsg", NULL);
|
||||
|
||||
organize_savefiles = (I_NextGlob(glob) == NULL);
|
||||
|
||||
I_EndGlob(glob);
|
||||
}
|
||||
|
||||
if (organize_savefiles)
|
||||
{
|
||||
int i;
|
||||
char *wadname = wadfiles[0], *oldsavegame = basesavegame;
|
||||
@ -2480,6 +2494,7 @@ void D_DoomMain(void)
|
||||
NormalizeSlashes(basesavegame);
|
||||
M_MakeDirectory(basesavegame);
|
||||
}
|
||||
}
|
||||
|
||||
I_Printf(VB_INFO, "Savegame directory: %s\n", basesavegame);
|
||||
|
||||
|
@ -626,7 +626,7 @@ default_t defaults[] = {
|
||||
{
|
||||
"organize_savefiles",
|
||||
(config_t *) &organize_savefiles, NULL,
|
||||
{0}, {0,1}, number, ss_gen, wad_no,
|
||||
{-1}, {-1,1}, number, ss_gen, wad_no,
|
||||
"1 to organize save files"
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user