ref: 2c339b744a4a310f6875c59c2a9d2d1b1b44f105
parent: 08e6666c5a1665c22175da3609b209c1bff1671e
author: Jacob Moody <[email protected]>
date: Tue Feb 7 21:48:36 EST 2023
use $home/lib/duke3d for config
--- a/Game/src/config.c
+++ b/Game/src/config.c
@@ -97,7 +97,6 @@
{
int32 i;
-
setupfilename[0] = '\0';
// Are we trying to load a mod?
@@ -105,7 +104,7 @@
FILE *fp = NULL;
//Yes
- sprintf(setupfilename, "%s\\%s", getGameDir(), SETUPFILENAME);
+ sprintf(setupfilename, "%s/%s", getGameDir(), SETUPFILENAME);
// let's make sure it's actually there
fp = fopen(setupfilename, "r");
@@ -114,12 +113,12 @@
else{
// It doesn't exist, so revert to the main one.
printf("Config file: %s does not exist, using main config.\n", setupfilename);
- sprintf(setupfilename, "%s", SETUPFILENAME);
+ sprintf(setupfilename, "%s/lib/duke3d/%s", getenv("home"), SETUPFILENAME);
}
}else{
//No
- strcpy (setupfilename, SETUPFILENAME);
+ sprintf(setupfilename, "%s/lib/duke3d/%s", getenv("home"), SETUPFILENAME);
}
printf("Using Setup file: '%s'\n",setupfilename);