From 670d70d3c904aca81394649933c7cea1d8313368 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 13 Nov 2008 07:58:39 -0800 Subject: [PATCH] Allow specifying another config file with the ALSOFT_CONF env var --- Alc/alcConfig.c | 9 +++++++++ alsoftrc.sample | 2 ++ 2 files changed, 11 insertions(+) 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 -- 2.11.4.GIT