]> git.0x19.co - doomgeneric-snom360/commitdiff
the folder for save/load and default config set to '.'
authorozkl <ozkl@users.noreply.github.com>
Sun, 18 Aug 2019 12:28:49 +0000 (15:28 +0300)
committerozkl <ozkl@users.noreply.github.com>
Sun, 18 Aug 2019 12:28:49 +0000 (15:28 +0300)
doomgeneric/config.h
doomgeneric/d_iwad.c
doomgeneric/m_config.c

index 6fe8481bc5bdc29ecf4e07b7807b9de8e31b4071..7e05102e09a07c15d50c836049f07ee8ee8a77b9 100644 (file)
@@ -97,4 +97,4 @@
 #undef ORIGCODE
 
 /* Define to the directory where all game files are located */
-#define FILES_DIR "/mnt"
+#define FILES_DIR "."
index 04389a98f2963f0bf1a02c0e3e343274f92373e2..9da6337d466dea1a60fd8c1cba94032b2e97142e 100644 (file)
@@ -429,6 +429,8 @@ static char *CheckDirectoryHasIWAD(char *dir, char *iwadname)
         filename = M_StringJoin(dir, DIR_SEPARATOR_S, iwadname, NULL);
     }
 
+    printf("Trying IWAD file:%s\n", filename);
+
     if (M_FileExists(filename))
     {
         return filename;
@@ -611,8 +613,6 @@ static void BuildIWADDirList(void)
 
 #endif
 #else
-       AddIWADDir(".");
-
     AddIWADDir (FILES_DIR);
 
     // Don't run this function again.
@@ -735,6 +735,8 @@ char *D_FindIWAD(int mask, GameMission_t *mission)
     {
         // Search through the list and look for an IWAD
 
+        printf("-iwad not specified, trying a few iwad names\n");
+
         result = NULL;
 
         BuildIWADDirList();
index 31ac7a6909689b4253f987eb3065112d509b5cba..d35a02b5dc05d3dc4236e1eb1f453f440b398d7a 100644 (file)
@@ -2042,33 +2042,11 @@ float M_GetFloatVariable(char *name)
 
 static char *GetDefaultConfigDir(void)
 {
-#if !defined(_WIN32) || defined(_WIN32_WCE)
+    char *result = (char *)malloc(2);
+    result[0] = '.';
+    result[1] = '\0';
 
-    // Configuration settings are stored in ~/.chocolate-doom/,
-    // except on Windows, where we behave like Vanilla Doom and
-    // save in the current directory.
-
-    char *homedir;
-    char *result;
-
-    // frosted HACK - homedir = getenv("HOME");
-    homedir = "/mnt";
-
-    if (homedir != NULL)
-    {
-        // put all configuration in a config directory off the
-        // homedir
-
-        result = M_StringJoin(homedir, DIR_SEPARATOR_S,
-                              "." PACKAGE_TARNAME, DIR_SEPARATOR_S, NULL);
-
-        return result;
-    }
-    else
-#endif /* #ifndef _WIN32 */
-    {
-        return strdup(FILES_DIR"/");
-    }
+    return result;
 }
 
 //