diff options
author | Chris Apers | 2007-05-01 09:51:53 +0000 |
---|---|---|
committer | Chris Apers | 2007-05-01 09:51:53 +0000 |
commit | 3aee6e3f8e50f249ad2a57d348c8bc6b5a50d45a (patch) | |
tree | f46af2b116e510bdba056a10a6546c4e4713193a | |
parent | cd6ec5e741e78641e8d5ef16713c0321f25b5005 (diff) | |
download | scummvm-rg350-3aee6e3f8e50f249ad2a57d348c8bc6b5a50d45a.tar.gz scummvm-rg350-3aee6e3f8e50f249ad2a57d348c8bc6b5a50d45a.tar.bz2 scummvm-rg350-3aee6e3f8e50f249ad2a57d348c8bc6b5a50d45a.zip |
Fixed sysEx function
svn-id: r26696
-rw-r--r-- | backends/midi/zodiac.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index e626db687e..703c7dbf20 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -110,12 +110,13 @@ void MidiDriver_Zodiac::send(uint32 b) { } void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { -FIXME: We may have to add the 0xF0 / 0xF7 frame here. -Or not -- maybe TwMidiSysEx doesn't expect it either. -But since I couldn't find any documentation on this API, -I'll leave it to the porter to decide that. -- Fingolfin + unsigned char buf[256]; + + buf[0] = 0xF0; + memcpy(buf + 1, msg, length); + buf[length + 1] = 0xF7; - TwMidiSysEx(_midiHandle, 0, (byte *)msg, length); + TwMidiSysEx(_midiHandle, 0, (byte *)buf, length + 2); } MidiDriver *MidiDriver_Zodiac_create() { |