diff options
author | Chris Robinson <[email protected]> | 2008-11-13 07:58:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-11-13 07:58:39 -0800 |
commit | 670d70d3c904aca81394649933c7cea1d8313368 (patch) | |
tree | 8745613e1a2ed527340b254351d5140920fc04f8 | |
parent | 010f7d12f48f8e046dcda4a5e39221265554e2ff (diff) |
Allow specifying another config file with the ALSOFT_CONF env var
-rw-r--r-- | Alc/alcConfig.c | 9 | ||||
-rw-r--r-- | alsoftrc.sample | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c index d5f4fb5e..6b959709 100644 --- a/Alc/alcConfig.c +++ b/Alc/alcConfig.c @@ -250,6 +250,15 @@ void ReadALConfig(void) } } #endif + if(getenv("ALSOFT_CONF")) + { + f = fopen(getenv("ALSOFT_CONF"), "r"); + if(f) + { + LoadConfigFromFile(f); + fclose(f); + } + } } void FreeALConfig(void) diff --git a/alsoftrc.sample b/alsoftrc.sample index ab1faee0..9fd96eee 100644 --- a/alsoftrc.sample +++ b/alsoftrc.sample @@ -5,6 +5,8 @@ # The system-wide settings can be put in /etc/openal/alsoft.conf and user- # specific override settings in ~/.alsoftrc. # For Windows, these settings should go into %AppData%\alsoft.ini +# The environment variable ALSOFT_CONF can be used to specify another config +# override # Option and block names are case-insenstive. The supplied values are only # hints and may not be honored (though generally it'll try to get as close as |