From f0c5cc898d993d3388dfbce5833e8ccca7b2f03f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 Mar 2009 23:46:09 +0000 Subject: Fix -cdrom command line parameter to work with Heretic and Hexen; compiles now work on Windows. Subversion-branch: /branches/raven-branch Subversion-revision: 1452 --- src/heretic/d_main.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'src/heretic') 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"); -- cgit v1.2.3