From 8c59849ea431ef121205292d31f130bdc8a8670f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 8 Jun 2010 02:02:48 -0700 Subject: Make sure the log file is set before initializing the rest of the lib --- Alc/ALc.c | 12 ++++++------ 1 file 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); -- cgit v1.2.3