[Scummvm-cvs-logs] CVS: scummvm/scumm instrument.cpp,2.17,2.18
Jamieson Christian
jamieson630 at users.sourceforge.net
Sat May 31 19:48:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv30761/scummvm/scumm
Modified Files:
instrument.cpp
Log Message:
Fixed potentially structure alignment problem
Index: instrument.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/instrument.cpp,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -d -r2.17 -r2.18
--- instrument.cpp 17 May 2003 03:06:16 -0000 2.17
+++ instrument.cpp 1 Jun 2003 02:47:06 -0000 2.18
@@ -171,7 +171,7 @@
class Instrument_Roland : public InstrumentInternal {
private:
- struct {
+ struct RolandInstrument {
byte roland_id;
byte device_id;
byte model_id;
@@ -227,7 +227,9 @@
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::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.
More information about the Scummvm-git-logs
mailing list