From 1a451cb91c14e9a7abdad94045b223517c02c8cb Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Sun, 16 Oct 2022 23:23:56 -0500
Subject: [PATCH] winecoreaudio: Disable thread DllMain() calls.

---
 dlls/winecoreaudio.drv/mmdevdrv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c
index 5d8a9654a3a..ae2b88d6b79 100644
--- a/dlls/winecoreaudio.drv/mmdevdrv.c
+++ b/dlls/winecoreaudio.drv/mmdevdrv.c
@@ -198,6 +198,7 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
     switch (reason)
     {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(dll);
         if(NtQueryVirtualMemory(GetCurrentProcess(), dll, MemoryWineUnixFuncs,
                                 &coreaudio_handle, sizeof(coreaudio_handle), NULL))
             return FALSE;
-- 
2.24.1