Use less ambiguous config file names

This commit is contained in:
Chris Robinson
2008-01-19 18:18:14 -08:00
parent 1a3e39e452
commit 799ba1f954
2 changed files with 20 additions and 4 deletions
+17 -2
View File
@@ -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);
+3 -2
View File
@@ -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