From: bones_was_here <bones_was_here@xonotic.au>
Date: Sun, 21 Apr 2024 16:11:56 +0000 (+1000)
Subject: fs: use current working dir as basedir if not otherwise specified
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1f4743e9;p=xonotic%2Fdarkplaces.git

fs: use current working dir as basedir if not otherwise specified

Fixes https://github.com/DarkPlacesEngine/darkplaces/issues/42

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
---

diff --git a/fs.c b/fs.c
index 8e95b43c..e2afcf05 100644
--- a/fs.c
+++ b/fs.c
@@ -2163,6 +2163,9 @@ static void FS_Init_Dir (void)
 				}
 			}
 		}
+#else
+		// use the working directory
+		getcwd(fs_basedir, sizeof(fs_basedir));
 #endif
 	}