From fee174a65a679cbf114631d648d8cce68e0706cc Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 19 Jan 2022 21:53:09 -0500 Subject: [PATCH] fix ECxx accuracy --- src/engine/playback.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index 64384338d..d18728103 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -862,6 +862,23 @@ bool DivEngine::nextTick(bool noAccum) { if (--chan[i].cut<1) { chan[i].oldNote=chan[i].note; chan[i].note=-1; + chan[i].keyOff=true; + chan[i].keyOn=false; + if (chan[i].stopOnOff) { + chan[i].portaNote=-1; + chan[i].portaSpeed=-1; + chan[i].stopOnOff=false; + } + if (disCont[dispatchOfChan[i]].dispatch->keyOffAffectsPorta(dispatchChanOfChan[i])) { + chan[i].portaNote=-1; + chan[i].portaSpeed=-1; + if (i==2 && sysOfChan[i]==DIV_SYSTEM_SMS) { + chan[i+1].portaNote=-1; + chan[i+1].portaSpeed=-1; + } + } + dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false)); + chan[i].scheduledSlideReset=true; dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i)); } }