FDS: add FDS ins type auto-detection on .dmf

This commit is contained in:
tildearrow 2022-04-04 04:57:38 -05:00
parent ccb8d3d355
commit 81150d96fa

View file

@ -623,6 +623,15 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
} }
// instrument // instrument
pat->data[k][2]=reader.readS(); pat->data[k][2]=reader.readS();
// this is sad
if (ds.system[0]==DIV_SYSTEM_NES_FDS) {
if (i==5 && pat->data[k][2]!=-1) {
if (pat->data[k][2]>=0 && pat->data[k][2]<ds.insLen) {
ds.ins[pat->data[k][2]]->type=DIV_INS_FDS;
}
}
}
} }
} }
} }