mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
CAMD: Added _isOpen checks to send() and sysEx()
At Raziel^'s request. This is the same as the ALSA checks I added earlier today.
This commit is contained in:
parent
d4e4148a39
commit
3e8a7afeae
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user