Chris Robinson
0477d61599
Look in the executable's dir for another config file
...
On Windows it'll look for alsoft.ini, and elsewhere is alsoft.conf. This
applies after the user-local settings and before ALSOFT_CONF.
2016-06-04 10:45:44 -07:00
Chris Robinson
0eb83fe462
Make option and block names case-sensitive
...
This is to avoid any issues with device names that can be case-sensitive, and
strcasecmp not working properly for non-ASCII-7 uppercase characters.
2015-09-04 16:09:09 -07:00
Chris Robinson
5f40daabc2
Reverse the device and block names for device-specific options
2015-09-04 15:47:48 -07:00
Chris Robinson
70c63dd576
Allow '#' in config block names
...
Since some devices may have it appended.
2015-08-28 14:59:45 -07:00
Chris Robinson
e5fa4ee25d
Allow for device-specific config values
2015-08-28 14:10:39 -07:00
alexxvk
8846ad967f
Fix mingw64 build
2015-05-02 17:44:06 +06:00
Chris Robinson
50cdc0ac1e
Avoid tracing wide-char strings
...
Because on Windows, traced strings are written to a char string, which causes
UTF-16 strings to be converted to a narrow (non-UTF-8) encoding, potentially
losing characters.
2015-02-07 04:19:50 -08:00
Chris Robinson
312330dbaa
Rework HRTF decision logic
...
This way takes into account a new stereo-mode config option, which when set to
"headphones" will default to using HRTF. Eventually the device will also be
able to specify if headphones are being used.
2014-11-22 20:52:08 -08:00
Chris Robinson
e3d72ccd15
Support brace-enclosed environment variable names
...
This makes it possible to append alpha-numeric characters directly to an
environment variable value, e.g. ${FOO}bar will use "FOO" as the variable name
and keep the "bar" as-is, whereas $FOObar will take "FOObar" as the variable
name.
2014-08-19 16:54:53 -07:00
François Cami
3c13e1e333
Update COPYING to the latest https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source
2014-08-18 11:34:29 -07:00
Chris Robinson
028bd9767c
Don't bother stripping whitespace from comments
2014-05-15 01:37:01 -07:00
Chris Robinson
2a7f3c015e
Don't use the next power of two when duplicating config values
...
Speed isn't terribly important here, and reallocs should be extremely rare.
2014-05-04 00:37:25 -07:00
Chris Robinson
bb969c3ccc
Add a SZFMT macro for a size_t string formatter
2014-04-19 09:42:03 -07:00
Chris Robinson
2ca673cca2
Properly handle special folder names with extended characters
2014-03-28 01:21:05 -07:00
Chris Robinson
20886059fd
Wrap fopen calls under Windows
...
The idea is that all filenames we deal with are encoded as UTF-8, but the
Windows functions that take a char string interpret it using the ANSI codepage.
So instead, we convert the UTF-8 string to a wchar string, and then use the
wchar functions for proper extended character filename support.
2014-03-28 00:37:42 -07:00
Chris Robinson
ea8a85b19c
Move PATH_MAX fallback definitions to alMain.h
2014-02-27 18:17:20 -08:00
Chris Robinson
1b9a722601
Expand environment variables for all config option values when loading
2014-02-26 17:25:05 -08:00
Chris Robinson
46b2115bfb
Avoid using a global static buffer for config loading
2014-02-23 14:07:09 -08:00
Chris Robinson
0626a44eb1
Fix indentation
2014-02-23 09:54:26 -08:00
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