diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 6421de73..47748770 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -4417,8 +4417,12 @@ void DivEngine::updateSysFlags(int system, bool restart) { saveLock.unlock(); } - if (restart && isPlaying()) { - playSub(false); + if (restart) { + if (isPlaying()) { + playSub(false); + } else if (freelance) { + reset(); + } } BUSY_END; } diff --git a/src/engine/platform/snes.cpp b/src/engine/platform/snes.cpp index a0312161..a32492fc 100644 --- a/src/engine/platform/snes.cpp +++ b/src/engine/platform/snes.cpp @@ -754,6 +754,8 @@ void DivPlatformSNES::initEcho() { } void DivPlatformSNES::reset() { + writes.clear(); + memcpy(sampleMem,copyOfSampleMem,65536); dsp.init(sampleMem); dsp.set_output(NULL,0); diff --git a/src/gui/gui.h b/src/gui/gui.h index 93f1bdb5..29d61768 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1446,7 +1446,6 @@ class FurnaceGUI { int sysSeparators; int forceMono; int controlLayout; - int restartOnFlagChange; int statusDisplay; float dpiScale; int viewPrevPattern; @@ -1612,7 +1611,6 @@ class FurnaceGUI { sysSeparators(1), forceMono(0), controlLayout(3), - restartOnFlagChange(1), statusDisplay(0), dpiScale(0.0f), viewPrevPattern(1), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index ae6d70d7..afcd13f1 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -674,11 +674,6 @@ void FurnaceGUI::drawSettings() { } ImGui::Unindent(); - bool restartOnFlagChangeB=settings.restartOnFlagChange; - if (ImGui::Checkbox("Restart song when changing chip properties",&restartOnFlagChangeB)) { - settings.restartOnFlagChange=restartOnFlagChangeB; - } - // SUBSECTION START-UP CONFIG_SUBSECTION("Start-up"); ImGui::Text("Play intro on start-up:"); @@ -2954,7 +2949,6 @@ void FurnaceGUI::syncSettings() { settings.sysSeparators=e->getConfInt("sysSeparators",1); settings.forceMono=e->getConfInt("forceMono",0); settings.controlLayout=e->getConfInt("controlLayout",3); - settings.restartOnFlagChange=e->getConfInt("restartOnFlagChange",1); settings.statusDisplay=e->getConfInt("statusDisplay",0); settings.dpiScale=e->getConfFloat("dpiScale",0.0f); settings.viewPrevPattern=e->getConfInt("viewPrevPattern",1); @@ -3327,7 +3321,6 @@ void FurnaceGUI::commitSettings() { e->setConf("sysSeparators",settings.sysSeparators); e->setConf("forceMono",settings.forceMono); e->setConf("controlLayout",settings.controlLayout); - e->setConf("restartOnFlagChange",settings.restartOnFlagChange); e->setConf("statusDisplay",settings.statusDisplay); e->setConf("dpiScale",settings.dpiScale); e->setConf("viewPrevPattern",settings.viewPrevPattern); diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index 81d05f09..d32e43ab 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -24,7 +24,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool modifyOnChange, bool fromMenu) { bool altered=false; - bool restart=settings.restartOnFlagChange && modifyOnChange; + bool restart=modifyOnChange; bool supportsCustomRate=true; switch (type) {