21 May
2025
21 May
'25
9:30 a.m.
Huw Davies (@huw) commented about dlls/mmdevapi/main.c:
params.err = &err; MIDI_CALL( midi_init, ¶ms ); - if (err == DRV_SUCCESS) CloseHandle( CreateThread( NULL, 0, notify_thread, NULL, 0, NULL )); + if (err == DRV_SUCCESS) notify_thread_handle = CreateThread( NULL, 0, notify_thread, NULL, 0, NULL ); return err; } case DRV_FREE: + case DRV_CLOSE: MIDI_CALL( midi_release, NULL ); + WaitForSingleObject(notify_thread_handle, INFINITE); + CloseHandle(notify_thread_handle); + notify_thread_handle = NULL;
Should we be doing this for both `DRV_FREE` and `DRV_CLOSE`? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8066#note_104078