aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-06-08 02:02:48 -0700
committerChris Robinson <[email protected]>2010-06-08 02:02:48 -0700
commit8c59849ea431ef121205292d31f130bdc8a8670f (patch)
tree3ceb37d2bb433facb1531e238caa47d458d8d46b
parentf9e569099cffbf7ea2951ef96b837a2e0bb7afe6 (diff)
Make sure the log file is set before initializing the rest of the lib
-rw-r--r--Alc/ALc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index df496995..3c43c7a5 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -410,12 +410,6 @@ static void alc_init(void)
int i;
const char *devs, *str;
- InitializeCriticalSection(&g_csMutex);
- ALTHUNK_INIT();
- ReadALConfig();
-
- tls_create(&LocalContext);
-
str = getenv("ALSOFT_LOGFILE");
if(str && str[0])
{
@@ -426,6 +420,12 @@ static void alc_init(void)
if(!LogFile)
LogFile = stderr;
+ InitializeCriticalSection(&g_csMutex);
+ ALTHUNK_INIT();
+ ReadALConfig();
+
+ tls_create(&LocalContext);
+
RTPrioLevel = GetConfigValueInt(NULL, "rt-prio", 0);
DefaultResampler = GetConfigValueInt(NULL, "resampler", RESAMPLER_DEFAULT);