[Scummvm-cvs-logs] scummvm master -> 3e8a7afeae15f0a6d804d8092ccec2bea7a1a2f3
eriktorbjorn
eriktorbjorn at telia.com
Sun May 8 13:10:25 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3e8a7afeae CAMD: Added _isOpen checks to send() and sysEx()
Commit: 3e8a7afeae15f0a6d804d8092ccec2bea7a1a2f3
https://github.com/scummvm/scummvm/commit/3e8a7afeae15f0a6d804d8092ccec2bea7a1a2f3
Author: eriktorbjorn (eriktorbjorn at users.sourceforge.net)
Date: 2011-05-08T04:08:09-07:00
Commit Message:
CAMD: Added _isOpen checks to send() and sysEx()
At Raziel^'s request. This is the same as the ALSA checks I added
earlier today.
Changed paths:
backends/midi/camd.cpp
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp
index cc791cf..aafc734 100644
--- a/backends/midi/camd.cpp
+++ b/backends/midi/camd.cpp
@@ -116,11 +116,21 @@ void MidiDriver_CAMD::close() {
}
void MidiDriver_CAMD::send(uint32 b) {
+ if (!_isOpen) {
+ warning("MidiDriver_CAMD: Got event while not open");
+ return;
+ }
+
ULONG data = READ_LE_UINT32(&b);
_ICamd->PutMidi(_midi_link, data);
}
void MidiDriver_CAMD::sysEx(const byte *msg, uint16 length) {
+ if (!_isOpen) {
+ warning("MidiDriver_CAMD: Got SysEx while not open");
+ return;
+ }
+
unsigned char buf[266];
assert(length + 2 <= ARRAYSIZE(buf));
More information about the Scummvm-git-logs
mailing list