mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 13:55:36 -04:00
enable "Organize save files" if no savegame found in old location
Also, remove the menu item since this will get switched back anyway.
This commit is contained in:
parent
724af3ca8b
commit
3951f1ad15
20
src/d_main.c
20
src/d_main.c
@ -2451,7 +2451,24 @@ void D_DoomMain(void)
|
||||
|
||||
PrintVersion();
|
||||
|
||||
if (!M_CheckParm("-save") && organize_savefiles)
|
||||
if (!M_CheckParm("-save"))
|
||||
{
|
||||
if (!organize_savefiles)
|
||||
{
|
||||
// [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);
|
||||
|
||||
if (I_NextGlob(glob) == NULL)
|
||||
{
|
||||
organize_savefiles = true;
|
||||
}
|
||||
|
||||
I_EndGlob(glob);
|
||||
}
|
||||
|
||||
if (organize_savefiles)
|
||||
{
|
||||
int i;
|
||||
char *wadname = wadfiles[0], *oldsavegame = basesavegame;
|
||||
@ -2480,6 +2497,7 @@ void D_DoomMain(void)
|
||||
NormalizeSlashes(basesavegame);
|
||||
M_MakeDirectory(basesavegame);
|
||||
}
|
||||
}
|
||||
|
||||
I_Printf(VB_INFO, "Savegame directory: %s\n", basesavegame);
|
||||
|
||||
|
@ -3993,7 +3993,6 @@ enum {
|
||||
gen4_demobar,
|
||||
gen4_palette_changes,
|
||||
gen4_level_brightness,
|
||||
gen4_organize_savefiles,
|
||||
gen4_end1,
|
||||
|
||||
gen4_title2,
|
||||
@ -4188,9 +4187,6 @@ setup_menu_t gen_settings4[] = { // General Settings screen4
|
||||
{"Level Brightness", S_THERMO|S_STRICT, m_null, M_X_THRM,
|
||||
M_Y + gen4_level_brightness*M_SPC, {"extra_level_brightness"}},
|
||||
|
||||
{"Organize save files", S_YESNO|S_PRGWARN, m_null, M_X,
|
||||
M_Y + gen4_organize_savefiles*M_SPC, {"organize_savefiles"}},
|
||||
|
||||
{"", S_SKIP, m_null, M_X, M_Y + gen4_end1*M_SPC},
|
||||
|
||||
{"Compatibility-breaking Features" ,S_SKIP|S_TITLE, m_null, M_X,
|
||||
|
Loading…
x
Reference in New Issue
Block a user