From 0074641ab28d5a4c12da4c578e7ec89717d066d2 Mon Sep 17 00:00:00 2001 From: Jamieson Christian Date: Sun, 1 Jun 2003 02:47:06 +0000 Subject: Fixed potentially structure alignment problem svn-id: r8213 --- scumm/instrument.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scumm/instrument.cpp') diff --git a/scumm/instrument.cpp b/scumm/instrument.cpp index 266165f770..d822ce1d38 100644 --- a/scumm/instrument.cpp +++ b/scumm/instrument.cpp @@ -171,7 +171,7 @@ public: class Instrument_Roland : public InstrumentInternal { private: - struct { + struct RolandInstrument { byte roland_id; byte device_id; byte model_id; @@ -227,7 +227,9 @@ private: byte tva_env_level[3]; byte tva_env_sustain_level; } partial[4]; - } _instrument; + byte checksum; + } GNUPACK; + RolandInstrument _instrument; char _instrument_name [11]; @@ -416,8 +418,10 @@ void Instrument_Roland::saveOrLoad (Serializer *s) { } void Instrument_Roland::send (MidiChannel *mc) { - if (_native_mt32) { // if (mc->device()->mt32device()) { + if (_native_mt32) { _instrument.device_id = mc->getNumber(); + if (_instrument.device_id > 7) + warning ("MT-32 part %d is greater than 7", (int) _instrument.device_id); mc->device()->sysEx ((byte *) &_instrument, sizeof (_instrument)); } else { // Convert to a GM program change. -- cgit v1.2.3