diff options
author | rubidium <rubidium@openttd.org> | 2007-09-24 19:11:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-24 19:11:26 +0000 |
commit | 25f244513e5dc7f27797b63110c67a7cb9476c74 (patch) | |
tree | 78b03f6d1d57b3fbd4988b2c580d1fa3a775f20f /src/music/win32_m.cpp | |
parent | 4705536d7d38b1b8495a1cb3fa48533b172335a1 (diff) | |
download | openttd-25f244513e5dc7f27797b63110c67a7cb9476c74.tar.xz |
(svn r11154) -Fix [FS#1239]: MIDI failing to play under Windows 95, 98 and ME.
Diffstat (limited to 'src/music/win32_m.cpp')
-rw-r--r-- | src/music/win32_m.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |