From 799ba1f9541c1310186805bd3e276eb9fc708ca2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 19 Jan 2008 18:18:14 -0800 Subject: [PATCH] Use less ambiguous config file names --- Alc/alcConfig.c | 19 +++++++++++++++++-- openalrc.sample => alsoftrc.sample | 5 +++-- 2 files changed, 20 insertions(+), 4 deletions(-) rename openalrc.sample => alsoftrc.sample (96%) 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 similarity index 96% rename from openalrc.sample rename to 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 -- 2.11.4.GIT