Fix PC-98 FM synthesis not to re-register itself again if you reboot in PC-98 mode. Prior to this fix, rebooting in PC-98 mode resulted in garbled FM music.

This commit is contained in:
Jonathan Campbell 2018-02-15 20:32:33 -08:00
parent 645f2cdcc2
commit d394ec5dae

View File

@ -3981,7 +3981,12 @@ static void pc98_mix_CallBack(Bitu len) {
pc98_mixer->AddSamples_s32(s, (Bit32s*)MixTemp); pc98_mixer->AddSamples_s32(s, (Bit32s*)MixTemp);
} }
static bool pc98fm_init = false;
void PC98_FM_OnEnterPC98(Section *sec) { void PC98_FM_OnEnterPC98(Section *sec) {
if (!pc98fm_init) {
pc98fm_init = true;
// TODO: // TODO:
// - Give the user an option in dosbox.conf to enable/disable FM emulation // - Give the user an option in dosbox.conf to enable/disable FM emulation
// - Give the user a choice which board to emulate (the borrowed code can emulate 10 different cards) // - Give the user a choice which board to emulate (the borrowed code can emulate 10 different cards)
@ -4030,4 +4035,5 @@ void PC98_FM_OnEnterPC98(Section *sec) {
board86c_bind(); board86c_bind();
} }
}