summaryrefslogtreecommitdiff
path: root/src/strife/d_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/d_main.c')
-rw-r--r--src/strife/d_main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 35d2c908..cc1a9022 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1285,6 +1285,11 @@ void D_IntroTick(void)
//
//=============================================================================
+static void G_CheckDemoStatusAtExit (void)
+{
+ G_CheckDemoStatus();
+}
+
//
// D_DoomMain
//
@@ -1606,9 +1611,12 @@ void D_DoomMain (void)
if (p)
{
+ char *uc_filename = strdup(myargv[p + 1]);
+ M_ForceUppercase(uc_filename);
+
// With Vanilla you have to specify the file without extension,
// but make that optional.
- if (M_StringEndsWith(myargv[p + 1], ".lmp"))
+ if (M_StringEndsWith(uc_filename, ".LMP"))
{
M_StringCopy(file, myargv[p + 1], sizeof(file));
}
@@ -1617,6 +1625,8 @@ void D_DoomMain (void)
DEH_snprintf(file, sizeof(file), "%s.lmp", myargv[p+1]);
}
+ free(uc_filename);
+
if (D_AddFile (file))
{
M_StringCopy(demolumpname, lumpinfo[numlumps - 1].name,
@@ -1634,7 +1644,7 @@ void D_DoomMain (void)
printf("Playing demo %s.\n", file);
}
- I_AtExit((atexit_func_t) G_CheckDemoStatus, true);
+ I_AtExit(G_CheckDemoStatusAtExit, true);
// Generate the WAD hash table. Speed things up a bit.