mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Apply srb2home to SAVECONFIG
This commit is contained in:
parent
de0da37691
commit
7616e30142
1 changed files with 7 additions and 2 deletions
|
@ -493,6 +493,7 @@ void M_FirstLoadConfig(void)
|
|||
void M_SaveConfig(const char *filename)
|
||||
{
|
||||
FILE *f;
|
||||
char *filepath;
|
||||
|
||||
// make sure not to write back the config until it's been correctly loaded
|
||||
if (!gameconfig_loaded)
|
||||
|
@ -507,10 +508,14 @@ void M_SaveConfig(const char *filename)
|
|||
return;
|
||||
}
|
||||
|
||||
f = fopen(filename, "w");
|
||||
// append srb2home to beginning of filename
|
||||
// configfile already has this applied
|
||||
filepath = va(pandf,srb2home, filename);
|
||||
|
||||
f = fopen(filepath, "w");
|
||||
// change it only if valid
|
||||
if (f)
|
||||
strcpy(configfile, filename);
|
||||
strcpy(configfile, filepath);
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Couldn't save game config file %s\n"), filename);
|
||||
|
|
Loading…
Reference in a new issue