diff --git a/src/gui/gui.h b/src/gui/gui.h index dd3a02af5..e20656f7a 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1028,7 +1028,7 @@ class FurnaceGUI { String workingDirVGMExport, workingDirZSMExport, workingDirROMExport, workingDirFont, workingDirColors, workingDirKeybinds; String workingDirLayout, workingDirROM, workingDirTest; String mmlString[32]; - String mmlStringW; + String mmlStringW, mmlStringSNES; std::vector sysSearchResults; std::vector newSongSearchResults; diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index c77df05ec..1b793a2fb 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -18,7 +18,7 @@ */ #include "gui.h" -#include +#include "misc/cpp/imgui_stdlib.h" bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool modifyOnChange) { bool altered=false; @@ -1273,6 +1273,19 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo } rightClickable } + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); // wavetable text input size found here + if (ImGui::InputText("##MMLWave",&mmlStringSNES)) { + int actualData[256]; + int discardIt=0; + memset(actualData,0,256*sizeof(int)); + decodeMMLStrW(mmlStringSNES,actualData,discardIt,-128,127,false); + memcpy(echoFilter,actualData,8*sizeof(int)); + altered=true; + } + if (!ImGui::IsItemActive()) { + encodeMMLStr(mmlStringSNES,echoFilter,8,-1,-1,false); + } + if (altered) { e->lockSave([&]() { flags.set("volScaleL",127-vsL);