GUI: fix chip flags storage in user presets

This commit is contained in:
tildearrow 2024-04-25 13:30:30 -05:00
parent b955b26af6
commit 930e5e9aaa
2 changed files with 3 additions and 3 deletions

View file

@ -3176,7 +3176,7 @@ FurnaceGUISysDef::FurnaceGUISysDef(const char* n, const char* def, DivEngine* e)
float panFR=conf.getFloat(nextStr.c_str(),0.0f);
conf.remove(nextStr.c_str());
nextStr=fmt::sprintf("flags%d",i);
String flags=conf.getString(nextStr.c_str(),"");
String flags=taDecodeBase64(conf.getString(nextStr.c_str(),"").c_str());
conf.remove(nextStr.c_str());
orig.push_back(FurnaceGUISysDefChip(e->systemFromFileFur(id),vol,pan,flags.c_str(),panFR));

View file

@ -438,9 +438,9 @@ void FurnaceGUI::drawUserPresets() {
if (ImGui::TreeNode("Configure")) {
DivConfig sysFlags;
sysFlags.loadFromBase64(chip.flags.c_str());
sysFlags.loadFromMemory(chip.flags.c_str());
if (drawSysConf(-1,i,chip.sys,sysFlags,false)) {
chip.flags=sysFlags.toBase64();
chip.flags=sysFlags.toString();
mustBake=true;
}
ImGui::TreePop();