PC speaker: add option to reset phase on freq chan

ge

some motherboards do so
This commit is contained in:
tildearrow 2024-01-11 14:50:53 -05:00
parent 8a14435b4a
commit 53c625354b
3 changed files with 11 additions and 1 deletions

View file

@ -997,6 +997,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
case DIV_SYSTEM_PCSPKR: {
int clockSel=flags.getInt("clockSel",0);
int speakerType=flags.getInt("speakerType",0);
bool resetPhase=flags.getBool("resetPhase",false);
ImGui::Text("Clock rate:");
ImGui::Indent();
@ -1034,10 +1035,15 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
}
ImGui::Unindent();
if (ImGui::Checkbox("Reset phase on frequency change",&resetPhase)) {
altered=true;
}
if (altered) {
e->lockSave([&]() {
flags.set("clockSel",clockSel);
flags.set("speakerType",speakerType);
flags.set("resetPhase",resetPhase);
});
}
break;