Remove some redundant code

This commit is contained in:
James R 2020-03-31 15:26:22 -07:00
parent 735dd26dc6
commit e4094bc2a9

View file

@ -1083,6 +1083,10 @@ void D_SRB2Main(void)
// use user specific config file
#ifdef DEFAULTDIR
snprintf(srb2home, sizeof srb2home, "%s" PATHSEP DEFAULTDIR, userhome);
#else
snprintf(srb2home, sizeof srb2home, "%s", userhome);
#endif
if (dedicated)
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, srb2home);
else
@ -1090,17 +1094,6 @@ void D_SRB2Main(void)
// can't use sprintf since there is %u in savegamename
strcatbf(savegamename, srb2home, PATHSEP);
#else
snprintf(srb2home, sizeof srb2home, "%s", userhome);
if (dedicated)
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, userhome);
else
snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, userhome);
// can't use sprintf since there is %u in savegamename
strcatbf(savegamename, userhome, PATHSEP);
#endif
}
configfile[sizeof configfile - 1] = '\0';