C64: fix filter reset not working well

This commit is contained in:
tildearrow 2022-02-01 03:16:03 -05:00
parent 34a68751e1
commit f75803c3b2
1 changed files with 5 additions and 3 deletions

View File

@ -249,8 +249,10 @@ int DivPlatformC64::dispatch(DivCommand c) {
case DIV_CMD_C64_FILTER_RESET: case DIV_CMD_C64_FILTER_RESET:
if (c.value&15) { if (c.value&15) {
DivInstrument* ins=parent->getIns(chan[c.chan].ins); DivInstrument* ins=parent->getIns(chan[c.chan].ins);
filtCut=ins->c64.cut; if (ins->c64.initFilter) {
updateFilter(); filtCut=ins->c64.cut;
updateFilter();
}
} }
chan[c.chan].resetFilter=c.value>>4; chan[c.chan].resetFilter=c.value>>4;
break; break;
@ -342,7 +344,7 @@ void DivPlatformC64::reset() {
filtControl=0; filtControl=0;
filtRes=0; filtRes=0;
filtCut=0; filtCut=2047;
resetTime=1; resetTime=1;
vol=15; vol=15;
} }