diff options
author | Jamieson Christian | 2003-06-01 02:47:06 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-06-01 02:47:06 +0000 |
commit | 0074641ab28d5a4c12da4c578e7ec89717d066d2 (patch) | |
tree | a39ec033ee2f568e8c1a2bb4b54bc2911e73b901 /scumm | |
parent | 3103dfa1f3db7542084436eed282689e186506f1 (diff) | |
download | scummvm-rg350-0074641ab28d5a4c12da4c578e7ec89717d066d2.tar.gz scummvm-rg350-0074641ab28d5a4c12da4c578e7ec89717d066d2.tar.bz2 scummvm-rg350-0074641ab28d5a4c12da4c578e7ec89717d066d2.zip |
Fixed potentially structure alignment problem
svn-id: r8213
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/instrument.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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. |