From b12785cf7c57eaaec886ce83984aad0e26d3a926 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 24 Sep 2007 19:11:26 +0000 Subject: (svn r11154) -Fix [FS#1239]: MIDI failing to play under Windows 95, 98 and ME. --- src/music/win32_m.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/music/win32_m.cpp') diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index 35e7cdef3..2310c50e2 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -142,7 +142,11 @@ const char *MusicDriver_Win32::Start(const char * const *parm) } if (NULL == (_midi.wait_obj = CreateEvent(NULL, FALSE, FALSE, NULL))) return "Failed to create event"; - if (NULL == (_midi.thread = CreateThread(NULL, 8192, MidiThread, 0, 0, NULL))) return "Failed to create thread"; + + /* The lpThreadId parameter of CreateThread (the last parameter) + * may NOT be NULL on Windows 95, 98 and ME. */ + DWORD threadId; + if (NULL == (_midi.thread = CreateThread(NULL, 8192, MidiThread, 0, 0, &threadId))) return "Failed to create thread"; return NULL; } -- cgit v1.2.3-54-g00ecf