Davide Beatrici (@davidebeatrici) commented about dlls/winepulse.drv/mmdevdrv.c:
- if (!pulse_thread) + if (FAILED(hr = main_loop_start())) { - HANDLE event = CreateEventW(NULL, TRUE, FALSE, NULL); - if (!(pulse_thread = CreateThread(NULL, 0, pulse_mainloop_thread, event, 0, NULL))) - { - ERR("Failed to create mainloop thread.\n"); - sessions_unlock(); - CloseHandle(event); - return E_FAIL; - } - SetThreadPriority(pulse_thread, THREAD_PRIORITY_TIME_CRITICAL); - WaitForSingleObject(event, INFINITE); - CloseHandle(event); + ERR("Failed to create mainloop thread.\n");
Should this perhaps be moved into `main_loop_start()`? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3027#note_35313