From fa32cadd361838092a98644f3e54524b660b05c5 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 15 Mar 2022 18:34:41 -0500 Subject: [PATCH] fix conflicting system flags when changing systems --- src/engine/engine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index c16392772..18841d4e3 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -612,6 +612,7 @@ void DivEngine::changeSystem(int index, DivSystem which) { quitDispatch(); isBusy.lock(); song.system[index]=which; + song.systemFlags[index]=0; recalcChans(); isBusy.unlock(); initDispatch(); @@ -633,7 +634,10 @@ bool DivEngine::addSystem(DivSystem which) { } quitDispatch(); isBusy.lock(); - song.system[song.systemLen++]=which; + song.system[song.systemLen]=which; + song.systemVol[song.systemLen]=64; + song.systemPan[song.systemLen]=0; + song.systemFlags[song.systemLen++]=0; recalcChans(); isBusy.unlock(); initDispatch();