Chris Robinson
ed0568bb24
Fix a potential infinite loop.
...
If the first XDG_CONFIG_DIRS entry isn't a proper relative path,
it would never break the loop.
2013-06-19 23:24:06 -07:00
Chris Robinson
3c90ed95af
Look for alsoft.conf in the XDG_CONFIG_DIRS and XDG_CONFIG_HOME directories
...
This follows the XDG Base Directory Specification. The old files/locations are
still supported, but configs found in XDG_CONFIG_DIRS take precedence over
/etc/openal/alsoft.conf, and a config found in XDG_CONFIG_HOME takes precedence
over $HOME/.alsoftrc.
2013-06-16 22:55:11 -07:00
Chris Robinson
48d5002190
Trace config file names being loaded
2013-06-16 20:43:31 -07:00
Chris Robinson
784e396cc7
Don't split config sections into separate blocks
2013-06-16 19:52:56 -07:00
Chris Robinson
8bd77be522
Improve parsing of the config files
...
This will also now recognize (and strip) quotation marks from around values.
2013-06-16 18:42:27 -07:00
Chris Robinson
1b840a3db8
Again try to get _WIN32_IE to behave right with MinGW
2012-09-11 01:39:05 -07:00
Chris Robinson
bf2ac6625c
Avoid size_t and ssize_t in some places
2011-09-20 11:40:56 -07:00
Chris Robinson
edb386eb1e
Add a ConfigValueStr function, to return the string through a parameter
2011-09-19 11:29:18 -07:00
Chris Robinson
7e06a10f73
Return int and float config values through a parameter
...
This allows the getter functions to return whether or not the option exists
without a separate call and check.
2011-09-18 16:16:55 -07:00
Chris Robinson
d46db2f648
Avoid a buffer underrun when getting the end of a config option value
2011-09-18 11:46:39 -07:00
Chris Robinson
17773c5644
Rename the ERROR macro to ERR
2011-07-13 01:43:00 -07:00
Chris Robinson
f56fbbb777
Use logging macros for config handling
2011-07-10 21:44:42 -07:00
Chris Robinson
f7936b4709
Avoid multiple getenv calls to the same var
2011-05-17 10:15:53 -07:00
Chris Robinson
61b682131e
Reduce some indentation
2010-05-12 07:30:45 -07:00
Alam Arias
cf4027df38
Mingw64's shlobj.h wants at least 0x501
2010-03-18 16:33:08 -07:00
Chris Robinson
781444d12c
Use size_t where appropriate
...
Spotted by Alam Arias
2010-03-18 14:21:06 -07:00
Chris Robinson
b6571904ce
Define _WIN32_IE to 0x400 only if it's a lesser value by default
...
Spotted by Alam Arias
2010-03-18 13:46:18 -07:00
Chris Robinson
45f8efec41
Return the default config string for empty entries
2010-01-09 06:48:43 -08:00
Chris Robinson
69ab93a824
Add a function to check if a config option is set to a non-empty value
2009-12-28 13:08:15 -08:00
Chris Robinson
6e9ce47a4b
GetConfigValueBool should take an int, not a float
2009-12-26 07:42:57 -08:00
Chris Robinson
49648fe22d
Make a GetConfigValueBool function and use it
2009-09-15 22:18:13 -07:00
Chris Robinson
87ed53c7f6
Don't read deprecated config files
2009-06-07 20:12:01 -07:00
Alam Arias
89e9437b84
add check for _WAVEFORMATEXTENSIBLE_ and define _WIN32_IE before inlcuding any header
2009-06-07 19:43:42 -07:00
Chris Robinson
670d70d3c9
Allow specifying another config file with the ALSOFT_CONF env var
2008-11-13 07:58:39 -08:00
Chris Robinson
3243f69f21
Use %AppData%\alsoft.ini for the config file in Windows
2008-06-04 18:09:21 -07:00
Chris Robinson
799ba1f954
Use less ambiguous config file names
2008-01-19 18:18:14 -08:00
Chris Robinson
6735fc7911
Add missing config.h includes
2008-01-16 14:09:04 -08:00
Chris Robinson
ab34e7c613
Use an AL_PRINT macro for printing lib messages/errors to the console
2007-11-30 00:28:34 -08:00
Chris Robinson
ae5f4e9a74
Initial import
2007-11-13 18:02:18 -08:00