aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-19 18:18:14 -0800
committerChris Robinson <[email protected]>2008-01-19 18:18:14 -0800
commit799ba1f9541c1310186805bd3e276eb9fc708ca2 (patch)
tree9551e6dbe06d93e97d306208707080c2207b8548
parent1a3e39e4528a09a0dde5f0816ad14580738e22b1 (diff)
Use less ambiguous config file names
-rw-r--r--Alc/alcConfig.c19
-rw-r--r--alsoftrc.sample (renamed from openalrc.sample)5
2 files changed, 20 insertions, 4 deletions
diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c
index b6a28a6e..de69ad87 100644
--- a/Alc/alcConfig.c
+++ b/Alc/alcConfig.c
@@ -202,7 +202,14 @@ void ReadALConfig(void)
#ifdef _WIN32
#else
- f = fopen("/etc/openal/config", "r");
+ f = fopen("/etc/openal/alsoft.conf", "r");
+ if(!f)
+ {
+ f = fopen("/etc/openal/config", "r");
+ if(f)
+ AL_PRINT("Reading /etc/openal/config; this file is deprecated\n"
+ "\tPlease rename it to /etc/openal/alsoft.conf\n");
+ }
if(f)
{
LoadConfigFromFile(f);
@@ -210,8 +217,16 @@ void ReadALConfig(void)
}
if(getenv("HOME") && *(getenv("HOME")))
{
- snprintf(buffer, sizeof(buffer), "%s/.openalrc", getenv("HOME"));
+ snprintf(buffer, sizeof(buffer), "%s/.alsoftrc", getenv("HOME"));
f = fopen(buffer, "r");
+ if(!f)
+ {
+ snprintf(buffer, sizeof(buffer), "%s/.openalrc", getenv("HOME"));
+ f = fopen(buffer, "r");
+ if(f)
+ AL_PRINT("Reading ~/.openalrc; this file is deprecated\n"
+ "\tPlease rename it to ~/.alsoftrc\n");
+ }
if(f)
{
LoadConfigFromFile(f);
diff --git a/openalrc.sample b/alsoftrc.sample
index 4650e5a0..78abb924 100644
--- a/openalrc.sample
+++ b/alsoftrc.sample
@@ -1,8 +1,9 @@
# OpenAL config file. Options that are not under a block or are under the
# [general] block are for general, non-backend-specific options. Blocks may
# appear multiple times, and duplicated options will take the last value
-# specified. The system-wide settings can be put in /etc/openal/config and
-# user-specific override settings in ~/.openalrc
+# specified.
+# The system-wide settings can be put in /etc/openal/alsoft.conf and user-
+# specific override settings in ~/.alsoftrc.
# 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