diff options
author | Chris Robinson <[email protected]> | 2008-02-06 22:22:29 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-02-06 22:22:29 -0800 |
commit | 081e593e2b3caf86c7dfb8fa90485c309258ea0d (patch) | |
tree | 146c488ec3e0cad4079905a8ab720c38b6e92edc /Alc/ALc.c | |
parent | b4ffdfab81827626a3da2882218d401fd83cf375 (diff) |
Set the done flag immediately when entering the initialization
To prevent two threads from initializing at the same time (not that it's
likely to happen at this point).
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -203,6 +203,8 @@ static void InitAL(void) int i; const char *devs, *str; + done = 1; + InitializeCriticalSection(&_alMutex); ALTHUNK_INIT(); ReadALConfig(); @@ -249,7 +251,6 @@ static void InitAL(void) for(i = 0;BackendList[i].Init;i++) BackendList[i].Init(&BackendList[i].Funcs); - done = 1; str = GetConfigValue(NULL, "stereodup", "false"); DuplicateStereo = (strcasecmp(str, "true") == 0 || |