[Scummvm-cvs-logs] SF.net SVN: scummvm: [26696] scummvm/trunk/backends/midi/zodiac.cpp
chrilith at users.sourceforge.net
chrilith at users.sourceforge.net
Tue May 1 11:51:54 CEST 2007
Revision: 26696
http://scummvm.svn.sourceforge.net/scummvm/?rev=26696&view=rev
Author: chrilith
Date: 2007-05-01 02:51:53 -0700 (Tue, 01 May 2007)
Log Message:
-----------
Fixed sysEx function
Modified Paths:
--------------
scummvm/trunk/backends/midi/zodiac.cpp
Modified: scummvm/trunk/backends/midi/zodiac.cpp
===================================================================
--- scummvm/trunk/backends/midi/zodiac.cpp 2007-05-01 09:50:50 UTC (rev 26695)
+++ scummvm/trunk/backends/midi/zodiac.cpp 2007-05-01 09:51:53 UTC (rev 26696)
@@ -110,12 +110,13 @@
}
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() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list