summaryrefslogtreecommitdiff
path: root/src/heretic/d_main.c
diff options
context:
space:
mode:
authorSimon Howard2009-03-08 23:46:09 +0000
committerSimon Howard2009-03-08 23:46:09 +0000
commitf0c5cc898d993d3388dfbce5833e8ccca7b2f03f (patch)
tree4ba918a271e4ea0142170c28b53e35b6f9d506f3 /src/heretic/d_main.c
parent67fbcdce28b89b24f8fb27d5f25393ad775af719 (diff)
downloadchocolate-doom-f0c5cc898d993d3388dfbce5833e8ccca7b2f03f.tar.gz
chocolate-doom-f0c5cc898d993d3388dfbce5833e8ccca7b2f03f.tar.bz2
chocolate-doom-f0c5cc898d993d3388dfbce5833e8ccca7b2f03f.zip
Fix -cdrom command line parameter to work with Heretic and Hexen;
compiles now work on Windows. Subversion-branch: /branches/raven-branch Subversion-revision: 1452
Diffstat (limited to 'src/heretic/d_main.c')
-rw-r--r--src/heretic/d_main.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index 9e4558c1..273b3f26 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -812,16 +812,6 @@ void D_DoomMain(void)
startmap = 1;
autostart = false;
- // Check for -CDROM
- cdrom = false;
-#ifdef __WATCOMC__
- if (M_CheckParm("-cdrom"))
- {
- cdrom = true;
- mkdir("c:\\heretic.cd");
- }
-#endif
-
//
// get skill / episode / map from parms
//
@@ -859,7 +849,34 @@ void D_DoomMain(void)
printf("V_Init: allocate screens.\n");
V_Init();
- M_SetConfigDir();
+ // Check for -CDROM
+
+ cdrom = false;
+
+#ifdef _WIN32
+
+ //!
+ // @platform windows
+ // @vanilla
+ //
+ // Save configuration data and savegames in c:\heretic.cd,
+ // allowing play from CD.
+ //
+
+ if (M_CheckParm("-cdrom"))
+ {
+ cdrom = true;
+ }
+#endif
+
+ if (cdrom)
+ {
+ M_SetConfigDir("c:\\heretic.cd\\");
+ }
+ else
+ {
+ M_SetConfigDir(NULL);
+ }
// Load defaults before initing other systems
printf("M_LoadDefaults: Load system defaults.\n");