From f46aa5cbfd019bd1df439244c88551fe987353ad Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 21 Dec 2023 18:14:28 -0500 Subject: [PATCH] prepare for color scheme import/export chamges this includes a small refactor of the settings mechanism --- src/engine/configEngine.cpp | 6 +- src/engine/engine.h | 3 + src/gui/gui.h | 17 + src/gui/settings.cpp | 845 ++++++++++++++++++------------------ 4 files changed, 451 insertions(+), 420 deletions(-) diff --git a/src/engine/configEngine.cpp b/src/engine/configEngine.cpp index 123a19a81..f226d1364 100644 --- a/src/engine/configEngine.cpp +++ b/src/engine/configEngine.cpp @@ -167,4 +167,8 @@ void DivEngine::setConf(String key, String value) { bool DivEngine::hasConf(String key) { return conf.has(key); -} \ No newline at end of file +} + +DivConfig& DivEngine::getConfObject() { + return conf; +} diff --git a/src/engine/engine.h b/src/engine/engine.h index 7773183c9..eb4bc5bbb 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -702,6 +702,9 @@ class DivEngine { double getConfDouble(String key, double fallback); String getConfString(String key, String fallback); + // get config object + DivConfig& getConfObject(); + // set a config value void setConf(String key, bool value); void setConf(String key, int value); diff --git a/src/gui/gui.h b/src/gui/gui.h index e591dd818..34a9c87bc 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -468,6 +468,20 @@ enum FurnaceGUIMobileScenes { GUI_SCENE_OTHER, }; +enum FurnaceGUISettingGroups: unsigned int { + GUI_SETTINGS_GENERAL=1, + GUI_SETTINGS_AUDIO=2, + GUI_SETTINGS_MIDI=4, + GUI_SETTINGS_KEYBOARD=8, + GUI_SETTINGS_BEHAVIOR=16, + GUI_SETTINGS_FONT=32, + GUI_SETTINGS_APPEARANCE=64, + GUI_SETTINGS_LAYOUTS=128, + GUI_SETTINGS_COLOR=256, + + GUI_SETTINGS_ALL=0xffffffff +}; + enum FurnaceGUIFileDialogs { GUI_FILE_OPEN, GUI_FILE_OPEN_BACKUP, @@ -2453,6 +2467,9 @@ class FurnaceGUI { void resetColors(); void resetKeybinds(); + void readConfig(DivConfig& conf, FurnaceGUISettingGroups groups=GUI_SETTINGS_ALL); + void writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups=GUI_SETTINGS_ALL); + void syncSettings(); void commitSettings(); void syncTutorial(); diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index c06e69c00..941580739 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -3678,208 +3678,208 @@ void FurnaceGUI::drawSettings() { x=maxV; \ } -void FurnaceGUI::syncSettings() { - settings.mainFontSize=e->getConfInt("mainFontSize",18); - settings.headFontSize=e->getConfInt("headFontSize",27); - settings.patFontSize=e->getConfInt("patFontSize",18); - settings.iconSize=e->getConfInt("iconSize",16); - settings.audioEngine=(e->getConfString("audioEngine","SDL")=="SDL")?1:0; - if (e->getConfString("audioEngine","SDL")=="JACK") { +void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { + settings.mainFontSize=conf.getInt("mainFontSize",18); + settings.headFontSize=conf.getInt("headFontSize",27); + settings.patFontSize=conf.getInt("patFontSize",18); + settings.iconSize=conf.getInt("iconSize",16); + settings.audioEngine=(conf.getString("audioEngine","SDL")=="SDL")?1:0; + if (conf.getString("audioEngine","SDL")=="JACK") { settings.audioEngine=DIV_AUDIO_JACK; - } else if (e->getConfString("audioEngine","SDL")=="PortAudio") { + } else if (conf.getString("audioEngine","SDL")=="PortAudio") { settings.audioEngine=DIV_AUDIO_PORTAUDIO; } else { settings.audioEngine=DIV_AUDIO_SDL; } - settings.audioDevice=e->getConfString("audioDevice",""); - settings.audioChans=e->getConfInt("audioChans",2); - settings.midiInDevice=e->getConfString("midiInDevice",""); - settings.midiOutDevice=e->getConfString("midiOutDevice",""); - settings.renderDriver=e->getConfString("renderDriver",""); - settings.sdlAudioDriver=e->getConfString("sdlAudioDriver",""); - settings.audioQuality=e->getConfInt("audioQuality",0); - settings.audioHiPass=e->getConfInt("audioHiPass",1); - settings.audioBufSize=e->getConfInt("audioBufSize",1024); - settings.audioRate=e->getConfInt("audioRate",44100); - settings.arcadeCore=e->getConfInt("arcadeCore",0); - settings.ym2612Core=e->getConfInt("ym2612Core",0); - settings.snCore=e->getConfInt("snCore",0); - settings.nesCore=e->getConfInt("nesCore",0); - settings.fdsCore=e->getConfInt("fdsCore",0); - settings.c64Core=e->getConfInt("c64Core",0); - settings.pokeyCore=e->getConfInt("pokeyCore",1); - settings.opnCore=e->getConfInt("opnCore",1); - settings.opl2Core=e->getConfInt("opl2Core",0); - settings.opl3Core=e->getConfInt("opl3Core",0); - settings.arcadeCoreRender=e->getConfInt("arcadeCoreRender",1); - settings.ym2612CoreRender=e->getConfInt("ym2612CoreRender",0); - settings.snCoreRender=e->getConfInt("snCoreRender",0); - settings.nesCoreRender=e->getConfInt("nesCoreRender",0); - settings.fdsCoreRender=e->getConfInt("fdsCoreRender",1); - settings.c64CoreRender=e->getConfInt("c64CoreRender",1); - settings.pokeyCoreRender=e->getConfInt("pokeyCoreRender",1); - settings.opnCoreRender=e->getConfInt("opnCoreRender",1); - settings.opl2CoreRender=e->getConfInt("opl2CoreRender",0); - settings.opl3CoreRender=e->getConfInt("opl3CoreRender",0); - settings.pcSpeakerOutMethod=e->getConfInt("pcSpeakerOutMethod",0); - settings.yrw801Path=e->getConfString("yrw801Path",""); - settings.tg100Path=e->getConfString("tg100Path",""); - settings.mu5Path=e->getConfString("mu5Path",""); - settings.mainFont=e->getConfInt("mainFont",0); - settings.headFont=e->getConfInt("headFont",0); - settings.patFont=e->getConfInt("patFont",0); - settings.mainFontPath=e->getConfString("mainFontPath",""); - settings.headFontPath=e->getConfString("headFontPath",""); - settings.patFontPath=e->getConfString("patFontPath",""); - settings.patRowsBase=e->getConfInt("patRowsBase",0); - settings.orderRowsBase=e->getConfInt("orderRowsBase",1); - settings.soloAction=e->getConfInt("soloAction",0); - settings.pullDeleteBehavior=e->getConfInt("pullDeleteBehavior",1); - settings.wrapHorizontal=e->getConfInt("wrapHorizontal",0); - settings.wrapVertical=e->getConfInt("wrapVertical",0); - settings.macroView=e->getConfInt("macroView",0); - settings.fmNames=e->getConfInt("fmNames",0); - settings.allowEditDocking=e->getConfInt("allowEditDocking",1); - settings.chipNames=e->getConfInt("chipNames",0); - settings.overflowHighlight=e->getConfInt("overflowHighlight",0); - settings.partyTime=e->getConfInt("partyTime",0); - settings.flatNotes=e->getConfInt("flatNotes",0); - settings.germanNotation=e->getConfInt("germanNotation",0); - settings.stepOnDelete=e->getConfInt("stepOnDelete",0); - settings.scrollStep=e->getConfInt("scrollStep",0); - settings.sysSeparators=e->getConfInt("sysSeparators",1); - settings.forceMono=e->getConfInt("forceMono",0); - settings.controlLayout=e->getConfInt("controlLayout",3); - settings.statusDisplay=e->getConfInt("statusDisplay",0); - settings.dpiScale=e->getConfFloat("dpiScale",0.0f); - settings.viewPrevPattern=e->getConfInt("viewPrevPattern",1); - settings.guiColorsBase=e->getConfInt("guiColorsBase",0); - settings.guiColorsShading=e->getConfInt("guiColorsShading",0); - settings.avoidRaisingPattern=e->getConfInt("avoidRaisingPattern",0); - settings.insFocusesPattern=e->getConfInt("insFocusesPattern",1); - settings.stepOnInsert=e->getConfInt("stepOnInsert",0); - settings.unifiedDataView=e->getConfInt("unifiedDataView",0); - settings.sysFileDialog=e->getConfInt("sysFileDialog",SYS_FILE_DIALOG_DEFAULT); - settings.roundedWindows=e->getConfInt("roundedWindows",1); - settings.roundedButtons=e->getConfInt("roundedButtons",1); - settings.roundedMenus=e->getConfInt("roundedMenus",0); - settings.loadJapanese=e->getConfInt("loadJapanese",0); - settings.loadChinese=e->getConfInt("loadChinese",0); - settings.loadChineseTraditional=e->getConfInt("loadChineseTraditional",0); - settings.loadKorean=e->getConfInt("loadKorean",0); - settings.fmLayout=e->getConfInt("fmLayout",4); - settings.sampleLayout=e->getConfInt("sampleLayout",0); - settings.waveLayout=e->getConfInt("waveLayout",0); - settings.susPosition=e->getConfInt("susPosition",0); - settings.effectCursorDir=e->getConfInt("effectCursorDir",1); - settings.cursorPastePos=e->getConfInt("cursorPastePos",1); - settings.titleBarInfo=e->getConfInt("titleBarInfo",1); - settings.titleBarSys=e->getConfInt("titleBarSys",1); - settings.frameBorders=e->getConfInt("frameBorders",0); - settings.effectDeletionAltersValue=e->getConfInt("effectDeletionAltersValue",1); - settings.oscRoundedCorners=e->getConfInt("oscRoundedCorners",1); - settings.oscTakesEntireWindow=e->getConfInt("oscTakesEntireWindow",0); - settings.oscBorder=e->getConfInt("oscBorder",1); - settings.oscEscapesBoundary=e->getConfInt("oscEscapesBoundary",0); - settings.oscMono=e->getConfInt("oscMono",1); - settings.oscAntiAlias=e->getConfInt("oscAntiAlias",1); - settings.separateFMColors=e->getConfInt("separateFMColors",0); - settings.insEditColorize=e->getConfInt("insEditColorize",0); - settings.metroVol=e->getConfInt("metroVol",100); - settings.sampleVol=e->getConfInt("sampleVol",50); - settings.pushNibble=e->getConfInt("pushNibble",0); - settings.scrollChangesOrder=e->getConfInt("scrollChangesOrder",0); - settings.oplStandardWaveNames=e->getConfInt("oplStandardWaveNames",0); - settings.cursorMoveNoScroll=e->getConfInt("cursorMoveNoScroll",0); - settings.lowLatency=e->getConfInt("lowLatency",0); - settings.notePreviewBehavior=e->getConfInt("notePreviewBehavior",1); - settings.powerSave=e->getConfInt("powerSave",POWER_SAVE_DEFAULT); - settings.absorbInsInput=e->getConfInt("absorbInsInput",0); - settings.eventDelay=e->getConfInt("eventDelay",0); - settings.moveWindowTitle=e->getConfInt("moveWindowTitle",1); - settings.hiddenSystems=e->getConfInt("hiddenSystems",0); - settings.horizontalDataView=e->getConfInt("horizontalDataView",0); - settings.noMultiSystem=e->getConfInt("noMultiSystem",0); - settings.oldMacroVSlider=e->getConfInt("oldMacroVSlider",0); - settings.displayAllInsTypes=e->getConfInt("displayAllInsTypes",0); - settings.displayPartial=e->getConfInt("displayPartial",0); - settings.noteCellSpacing=e->getConfInt("noteCellSpacing",0); - settings.insCellSpacing=e->getConfInt("insCellSpacing",0); - settings.volCellSpacing=e->getConfInt("volCellSpacing",0); - settings.effectCellSpacing=e->getConfInt("effectCellSpacing",0); - settings.effectValCellSpacing=e->getConfInt("effectValCellSpacing",0); - settings.doubleClickColumn=e->getConfInt("doubleClickColumn",1); - settings.blankIns=e->getConfInt("blankIns",0); - settings.dragMovesSelection=e->getConfInt("dragMovesSelection",2); - settings.unsignedDetune=e->getConfInt("unsignedDetune",0); - settings.noThreadedInput=e->getConfInt("noThreadedInput",0); - settings.saveWindowPos=e->getConfInt("saveWindowPos",1); - settings.initialSysName=e->getConfString("initialSysName",""); - settings.clampSamples=e->getConfInt("clampSamples",0); - settings.noteOffLabel=e->getConfString("noteOffLabel","OFF"); - settings.noteRelLabel=e->getConfString("noteRelLabel","==="); - settings.macroRelLabel=e->getConfString("macroRelLabel","REL"); - settings.emptyLabel=e->getConfString("emptyLabel","..."); - settings.emptyLabel2=e->getConfString("emptyLabel2",".."); - settings.saveUnusedPatterns=e->getConfInt("saveUnusedPatterns",0); - settings.channelColors=e->getConfInt("channelColors",1); - settings.channelTextColors=e->getConfInt("channelTextColors",0); - settings.channelStyle=e->getConfInt("channelStyle",1); - settings.channelVolStyle=e->getConfInt("channelVolStyle",0); - settings.channelFeedbackStyle=e->getConfInt("channelFeedbackStyle",1); - settings.channelFont=e->getConfInt("channelFont",1); - settings.channelTextCenter=e->getConfInt("channelTextCenter",1); - settings.maxRecentFile=e->getConfInt("maxRecentFile",10); - settings.midiOutClock=e->getConfInt("midiOutClock",0); - settings.midiOutTime=e->getConfInt("midiOutTime",0); - settings.midiOutProgramChange=e->getConfInt("midiOutProgramChange",0); - settings.midiOutMode=e->getConfInt("midiOutMode",1); - settings.midiOutTimeRate=e->getConfInt("midiOutTimeRate",0); - settings.centerPattern=e->getConfInt("centerPattern",0); - settings.ordersCursor=e->getConfInt("ordersCursor",1); - settings.persistFadeOut=e->getConfInt("persistFadeOut",1); - settings.exportLoops=e->getConfInt("exportLoops",0); - settings.exportFadeOut=e->getConfDouble("exportFadeOut",0.0); - settings.macroLayout=e->getConfInt("macroLayout",0); - settings.doubleClickTime=e->getConfFloat("doubleClickTime",0.3f); - settings.oneDigitEffects=e->getConfInt("oneDigitEffects",0); - settings.disableFadeIn=e->getConfInt("disableFadeIn",0); - settings.alwaysPlayIntro=e->getConfInt("alwaysPlayIntro",0); - settings.cursorFollowsOrder=e->getConfInt("cursorFollowsOrder",1); - settings.iCannotWait=e->getConfInt("iCannotWait",0); - settings.orderButtonPos=e->getConfInt("orderButtonPos",2); - settings.compress=e->getConfInt("compress",1); - settings.newPatternFormat=e->getConfInt("newPatternFormat",1); - settings.renderBackend=e->getConfString("renderBackend",GUI_BACKEND_DEFAULT_NAME); - settings.renderClearPos=e->getConfInt("renderClearPos",0); - settings.insertBehavior=e->getConfInt("insertBehavior",1); - settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1); - settings.newSongBehavior=e->getConfInt("newSongBehavior",0); - settings.memUsageUnit=e->getConfInt("memUsageUnit",1); - settings.cursorFollowsWheel=e->getConfInt("cursorFollowsWheel",0); - settings.noDMFCompat=e->getConfInt("noDMFCompat",0); - settings.removeInsOff=e->getConfInt("removeInsOff",0); - settings.removeVolOff=e->getConfInt("removeVolOff",0); - settings.playOnLoad=e->getConfInt("playOnLoad",0); - settings.insTypeMenu=e->getConfInt("insTypeMenu",1); - settings.capitalMenuBar=e->getConfInt("capitalMenuBar",0); - settings.centerPopup=e->getConfInt("centerPopup",1); - settings.insIconsStyle=e->getConfInt("insIconsStyle",1); - settings.classicChipOptions=e->getConfInt("classicChipOptions",0); - settings.wasapiEx=e->getConfInt("wasapiEx",0); - settings.chanOscThreads=e->getConfInt("chanOscThreads",0); - settings.renderPoolThreads=e->getConfInt("renderPoolThreads",0); - settings.showPool=e->getConfInt("showPool",0); - settings.writeInsNames=e->getConfInt("writeInsNames",1); - settings.readInsNames=e->getConfInt("readInsNames",1); - settings.defaultAuthorName=e->getConfString("defaultAuthorName",""); - settings.fontBackend=e->getConfInt("fontBackend",FONT_BACKEND_DEFAULT); - settings.fontHinting=e->getConfInt("fontHinting",0); - settings.fontBitmap=e->getConfInt("fontBitmap",0); - settings.fontAutoHint=e->getConfInt("fontAutoHint",1); - settings.fontAntiAlias=e->getConfInt("fontAntiAlias",1); - settings.selectAssetOnLoad=e->getConfInt("selectAssetOnLoad",1); - settings.basicColors=e->getConfInt("basicColors",1); + settings.audioDevice=conf.getString("audioDevice",""); + settings.audioChans=conf.getInt("audioChans",2); + settings.midiInDevice=conf.getString("midiInDevice",""); + settings.midiOutDevice=conf.getString("midiOutDevice",""); + settings.renderDriver=conf.getString("renderDriver",""); + settings.sdlAudioDriver=conf.getString("sdlAudioDriver",""); + settings.audioQuality=conf.getInt("audioQuality",0); + settings.audioHiPass=conf.getInt("audioHiPass",1); + settings.audioBufSize=conf.getInt("audioBufSize",1024); + settings.audioRate=conf.getInt("audioRate",44100); + settings.arcadeCore=conf.getInt("arcadeCore",0); + settings.ym2612Core=conf.getInt("ym2612Core",0); + settings.snCore=conf.getInt("snCore",0); + settings.nesCore=conf.getInt("nesCore",0); + settings.fdsCore=conf.getInt("fdsCore",0); + settings.c64Core=conf.getInt("c64Core",0); + settings.pokeyCore=conf.getInt("pokeyCore",1); + settings.opnCore=conf.getInt("opnCore",1); + settings.opl2Core=conf.getInt("opl2Core",0); + settings.opl3Core=conf.getInt("opl3Core",0); + settings.arcadeCoreRender=conf.getInt("arcadeCoreRender",1); + settings.ym2612CoreRender=conf.getInt("ym2612CoreRender",0); + settings.snCoreRender=conf.getInt("snCoreRender",0); + settings.nesCoreRender=conf.getInt("nesCoreRender",0); + settings.fdsCoreRender=conf.getInt("fdsCoreRender",1); + settings.c64CoreRender=conf.getInt("c64CoreRender",1); + settings.pokeyCoreRender=conf.getInt("pokeyCoreRender",1); + settings.opnCoreRender=conf.getInt("opnCoreRender",1); + settings.opl2CoreRender=conf.getInt("opl2CoreRender",0); + settings.opl3CoreRender=conf.getInt("opl3CoreRender",0); + settings.pcSpeakerOutMethod=conf.getInt("pcSpeakerOutMethod",0); + settings.yrw801Path=conf.getString("yrw801Path",""); + settings.tg100Path=conf.getString("tg100Path",""); + settings.mu5Path=conf.getString("mu5Path",""); + settings.mainFont=conf.getInt("mainFont",0); + settings.headFont=conf.getInt("headFont",0); + settings.patFont=conf.getInt("patFont",0); + settings.mainFontPath=conf.getString("mainFontPath",""); + settings.headFontPath=conf.getString("headFontPath",""); + settings.patFontPath=conf.getString("patFontPath",""); + settings.patRowsBase=conf.getInt("patRowsBase",0); + settings.orderRowsBase=conf.getInt("orderRowsBase",1); + settings.soloAction=conf.getInt("soloAction",0); + settings.pullDeleteBehavior=conf.getInt("pullDeleteBehavior",1); + settings.wrapHorizontal=conf.getInt("wrapHorizontal",0); + settings.wrapVertical=conf.getInt("wrapVertical",0); + settings.macroView=conf.getInt("macroView",0); + settings.fmNames=conf.getInt("fmNames",0); + settings.allowEditDocking=conf.getInt("allowEditDocking",1); + settings.chipNames=conf.getInt("chipNames",0); + settings.overflowHighlight=conf.getInt("overflowHighlight",0); + settings.partyTime=conf.getInt("partyTime",0); + settings.flatNotes=conf.getInt("flatNotes",0); + settings.germanNotation=conf.getInt("germanNotation",0); + settings.stepOnDelete=conf.getInt("stepOnDelete",0); + settings.scrollStep=conf.getInt("scrollStep",0); + settings.sysSeparators=conf.getInt("sysSeparators",1); + settings.forceMono=conf.getInt("forceMono",0); + settings.controlLayout=conf.getInt("controlLayout",3); + settings.statusDisplay=conf.getInt("statusDisplay",0); + settings.dpiScale=conf.getFloat("dpiScale",0.0f); + settings.viewPrevPattern=conf.getInt("viewPrevPattern",1); + settings.guiColorsBase=conf.getInt("guiColorsBase",0); + settings.guiColorsShading=conf.getInt("guiColorsShading",0); + settings.avoidRaisingPattern=conf.getInt("avoidRaisingPattern",0); + settings.insFocusesPattern=conf.getInt("insFocusesPattern",1); + settings.stepOnInsert=conf.getInt("stepOnInsert",0); + settings.unifiedDataView=conf.getInt("unifiedDataView",0); + settings.sysFileDialog=conf.getInt("sysFileDialog",SYS_FILE_DIALOG_DEFAULT); + settings.roundedWindows=conf.getInt("roundedWindows",1); + settings.roundedButtons=conf.getInt("roundedButtons",1); + settings.roundedMenus=conf.getInt("roundedMenus",0); + settings.loadJapanese=conf.getInt("loadJapanese",0); + settings.loadChinese=conf.getInt("loadChinese",0); + settings.loadChineseTraditional=conf.getInt("loadChineseTraditional",0); + settings.loadKorean=conf.getInt("loadKorean",0); + settings.fmLayout=conf.getInt("fmLayout",4); + settings.sampleLayout=conf.getInt("sampleLayout",0); + settings.waveLayout=conf.getInt("waveLayout",0); + settings.susPosition=conf.getInt("susPosition",0); + settings.effectCursorDir=conf.getInt("effectCursorDir",1); + settings.cursorPastePos=conf.getInt("cursorPastePos",1); + settings.titleBarInfo=conf.getInt("titleBarInfo",1); + settings.titleBarSys=conf.getInt("titleBarSys",1); + settings.frameBorders=conf.getInt("frameBorders",0); + settings.effectDeletionAltersValue=conf.getInt("effectDeletionAltersValue",1); + settings.oscRoundedCorners=conf.getInt("oscRoundedCorners",1); + settings.oscTakesEntireWindow=conf.getInt("oscTakesEntireWindow",0); + settings.oscBorder=conf.getInt("oscBorder",1); + settings.oscEscapesBoundary=conf.getInt("oscEscapesBoundary",0); + settings.oscMono=conf.getInt("oscMono",1); + settings.oscAntiAlias=conf.getInt("oscAntiAlias",1); + settings.separateFMColors=conf.getInt("separateFMColors",0); + settings.insEditColorize=conf.getInt("insEditColorize",0); + settings.metroVol=conf.getInt("metroVol",100); + settings.sampleVol=conf.getInt("sampleVol",50); + settings.pushNibble=conf.getInt("pushNibble",0); + settings.scrollChangesOrder=conf.getInt("scrollChangesOrder",0); + settings.oplStandardWaveNames=conf.getInt("oplStandardWaveNames",0); + settings.cursorMoveNoScroll=conf.getInt("cursorMoveNoScroll",0); + settings.lowLatency=conf.getInt("lowLatency",0); + settings.notePreviewBehavior=conf.getInt("notePreviewBehavior",1); + settings.powerSave=conf.getInt("powerSave",POWER_SAVE_DEFAULT); + settings.absorbInsInput=conf.getInt("absorbInsInput",0); + settings.eventDelay=conf.getInt("eventDelay",0); + settings.moveWindowTitle=conf.getInt("moveWindowTitle",1); + settings.hiddenSystems=conf.getInt("hiddenSystems",0); + settings.horizontalDataView=conf.getInt("horizontalDataView",0); + settings.noMultiSystem=conf.getInt("noMultiSystem",0); + settings.oldMacroVSlider=conf.getInt("oldMacroVSlider",0); + settings.displayAllInsTypes=conf.getInt("displayAllInsTypes",0); + settings.displayPartial=conf.getInt("displayPartial",0); + settings.noteCellSpacing=conf.getInt("noteCellSpacing",0); + settings.insCellSpacing=conf.getInt("insCellSpacing",0); + settings.volCellSpacing=conf.getInt("volCellSpacing",0); + settings.effectCellSpacing=conf.getInt("effectCellSpacing",0); + settings.effectValCellSpacing=conf.getInt("effectValCellSpacing",0); + settings.doubleClickColumn=conf.getInt("doubleClickColumn",1); + settings.blankIns=conf.getInt("blankIns",0); + settings.dragMovesSelection=conf.getInt("dragMovesSelection",2); + settings.unsignedDetune=conf.getInt("unsignedDetune",0); + settings.noThreadedInput=conf.getInt("noThreadedInput",0); + settings.saveWindowPos=conf.getInt("saveWindowPos",1); + settings.initialSysName=conf.getString("initialSysName",""); + settings.clampSamples=conf.getInt("clampSamples",0); + settings.noteOffLabel=conf.getString("noteOffLabel","OFF"); + settings.noteRelLabel=conf.getString("noteRelLabel","==="); + settings.macroRelLabel=conf.getString("macroRelLabel","REL"); + settings.emptyLabel=conf.getString("emptyLabel","..."); + settings.emptyLabel2=conf.getString("emptyLabel2",".."); + settings.saveUnusedPatterns=conf.getInt("saveUnusedPatterns",0); + settings.channelColors=conf.getInt("channelColors",1); + settings.channelTextColors=conf.getInt("channelTextColors",0); + settings.channelStyle=conf.getInt("channelStyle",1); + settings.channelVolStyle=conf.getInt("channelVolStyle",0); + settings.channelFeedbackStyle=conf.getInt("channelFeedbackStyle",1); + settings.channelFont=conf.getInt("channelFont",1); + settings.channelTextCenter=conf.getInt("channelTextCenter",1); + settings.maxRecentFile=conf.getInt("maxRecentFile",10); + settings.midiOutClock=conf.getInt("midiOutClock",0); + settings.midiOutTime=conf.getInt("midiOutTime",0); + settings.midiOutProgramChange=conf.getInt("midiOutProgramChange",0); + settings.midiOutMode=conf.getInt("midiOutMode",1); + settings.midiOutTimeRate=conf.getInt("midiOutTimeRate",0); + settings.centerPattern=conf.getInt("centerPattern",0); + settings.ordersCursor=conf.getInt("ordersCursor",1); + settings.persistFadeOut=conf.getInt("persistFadeOut",1); + settings.exportLoops=conf.getInt("exportLoops",0); + settings.exportFadeOut=conf.getDouble("exportFadeOut",0.0); + settings.macroLayout=conf.getInt("macroLayout",0); + settings.doubleClickTime=conf.getFloat("doubleClickTime",0.3f); + settings.oneDigitEffects=conf.getInt("oneDigitEffects",0); + settings.disableFadeIn=conf.getInt("disableFadeIn",0); + settings.alwaysPlayIntro=conf.getInt("alwaysPlayIntro",0); + settings.cursorFollowsOrder=conf.getInt("cursorFollowsOrder",1); + settings.iCannotWait=conf.getInt("iCannotWait",0); + settings.orderButtonPos=conf.getInt("orderButtonPos",2); + settings.compress=conf.getInt("compress",1); + settings.newPatternFormat=conf.getInt("newPatternFormat",1); + settings.renderBackend=conf.getString("renderBackend",GUI_BACKEND_DEFAULT_NAME); + settings.renderClearPos=conf.getInt("renderClearPos",0); + settings.insertBehavior=conf.getInt("insertBehavior",1); + settings.pullDeleteRow=conf.getInt("pullDeleteRow",1); + settings.newSongBehavior=conf.getInt("newSongBehavior",0); + settings.memUsageUnit=conf.getInt("memUsageUnit",1); + settings.cursorFollowsWheel=conf.getInt("cursorFollowsWheel",0); + settings.noDMFCompat=conf.getInt("noDMFCompat",0); + settings.removeInsOff=conf.getInt("removeInsOff",0); + settings.removeVolOff=conf.getInt("removeVolOff",0); + settings.playOnLoad=conf.getInt("playOnLoad",0); + settings.insTypeMenu=conf.getInt("insTypeMenu",1); + settings.capitalMenuBar=conf.getInt("capitalMenuBar",0); + settings.centerPopup=conf.getInt("centerPopup",1); + settings.insIconsStyle=conf.getInt("insIconsStyle",1); + settings.classicChipOptions=conf.getInt("classicChipOptions",0); + settings.wasapiEx=conf.getInt("wasapiEx",0); + settings.chanOscThreads=conf.getInt("chanOscThreads",0); + settings.renderPoolThreads=conf.getInt("renderPoolThreads",0); + settings.showPool=conf.getInt("showPool",0); + settings.writeInsNames=conf.getInt("writeInsNames",1); + settings.readInsNames=conf.getInt("readInsNames",1); + settings.defaultAuthorName=conf.getString("defaultAuthorName",""); + settings.fontBackend=conf.getInt("fontBackend",FONT_BACKEND_DEFAULT); + settings.fontHinting=conf.getInt("fontHinting",0); + settings.fontBitmap=conf.getInt("fontBitmap",0); + settings.fontAutoHint=conf.getInt("fontAutoHint",1); + settings.fontAntiAlias=conf.getInt("fontAntiAlias",1); + settings.selectAssetOnLoad=conf.getInt("selectAssetOnLoad",1); + settings.basicColors=conf.getInt("basicColors",1); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.headFontSize,2,96); @@ -4051,10 +4051,24 @@ void FurnaceGUI::syncSettings() { if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0; - String initialSys2=e->getConfString("initialSys2",""); - bool oldVol=e->getConfInt("configVersion",DIV_ENGINE_VERSION)<135; + // keybinds + for (int i=0; idecodeSysDesc(e->getConfString("initialSys","")); + initialSys2=e->decodeSysDesc(conf.getString("initialSys","")); oldVol=false; } settings.initialSys.clear(); @@ -4081,18 +4095,225 @@ void FurnaceGUI::syncSettings() { settings.initialSys.set(fmt::sprintf("vol%d",i),newVol); settings.initialSys.set(fmt::sprintf("pan%d",i),newPan); } - e->setConf("initialSys2",settings.initialSys.toBase64()); - e->setConf("configVersion",DIV_ENGINE_VERSION); + conf.set("initialSys2",settings.initialSys.toBase64()); + conf.set("configVersion",DIV_ENGINE_VERSION); } } +} + +void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { + conf.set("mainFontSize",settings.mainFontSize); + conf.set("headFontSize",settings.headFontSize); + conf.set("patFontSize",settings.patFontSize); + conf.set("iconSize",settings.iconSize); + conf.set("audioEngine",String(audioBackends[settings.audioEngine])); + conf.set("audioDevice",settings.audioDevice); + conf.set("midiInDevice",settings.midiInDevice); + conf.set("midiOutDevice",settings.midiOutDevice); + conf.set("renderDriver",settings.renderDriver); + conf.set("sdlAudioDriver",settings.sdlAudioDriver); + conf.set("audioQuality",settings.audioQuality); + conf.set("audioHiPass",settings.audioHiPass); + conf.set("audioBufSize",settings.audioBufSize); + conf.set("audioRate",settings.audioRate); + conf.set("audioChans",settings.audioChans); + conf.set("arcadeCore",settings.arcadeCore); + conf.set("ym2612Core",settings.ym2612Core); + conf.set("snCore",settings.snCore); + conf.set("nesCore",settings.nesCore); + conf.set("fdsCore",settings.fdsCore); + conf.set("c64Core",settings.c64Core); + conf.set("pokeyCore",settings.pokeyCore); + conf.set("opnCore",settings.opnCore); + conf.set("opl2Core",settings.opl2Core); + conf.set("opl3Core",settings.opl3Core); + conf.set("arcadeCoreRender",settings.arcadeCoreRender); + conf.set("ym2612CoreRender",settings.ym2612CoreRender); + conf.set("snCoreRender",settings.snCoreRender); + conf.set("nesCoreRender",settings.nesCoreRender); + conf.set("fdsCoreRender",settings.fdsCoreRender); + conf.set("c64CoreRender",settings.c64CoreRender); + conf.set("pokeyCoreRender",settings.pokeyCoreRender); + conf.set("opnCoreRender",settings.opnCoreRender); + conf.set("opl2CoreRender",settings.opl2CoreRender); + conf.set("opl3CoreRender",settings.opl3CoreRender); + conf.set("pcSpeakerOutMethod",settings.pcSpeakerOutMethod); + conf.set("yrw801Path",settings.yrw801Path); + conf.set("tg100Path",settings.tg100Path); + conf.set("mu5Path",settings.mu5Path); + conf.set("mainFont",settings.mainFont); + conf.set("headFont",settings.headFont); + conf.set("patFont",settings.patFont); + conf.set("mainFontPath",settings.mainFontPath); + conf.set("headFontPath",settings.headFontPath); + conf.set("patFontPath",settings.patFontPath); + conf.set("patRowsBase",settings.patRowsBase); + conf.set("orderRowsBase",settings.orderRowsBase); + conf.set("soloAction",settings.soloAction); + conf.set("pullDeleteBehavior",settings.pullDeleteBehavior); + conf.set("wrapHorizontal",settings.wrapHorizontal); + conf.set("wrapVertical",settings.wrapVertical); + conf.set("macroView",settings.macroView); + conf.set("fmNames",settings.fmNames); + conf.set("allowEditDocking",settings.allowEditDocking); + conf.set("chipNames",settings.chipNames); + conf.set("overflowHighlight",settings.overflowHighlight); + conf.set("partyTime",settings.partyTime); + conf.set("flatNotes",settings.flatNotes); + conf.set("germanNotation",settings.germanNotation); + conf.set("stepOnDelete",settings.stepOnDelete); + conf.set("scrollStep",settings.scrollStep); + conf.set("sysSeparators",settings.sysSeparators); + conf.set("forceMono",settings.forceMono); + conf.set("controlLayout",settings.controlLayout); + conf.set("statusDisplay",settings.statusDisplay); + conf.set("dpiScale",settings.dpiScale); + conf.set("viewPrevPattern",settings.viewPrevPattern); + conf.set("guiColorsBase",settings.guiColorsBase); + conf.set("guiColorsShading",settings.guiColorsShading); + conf.set("avoidRaisingPattern",settings.avoidRaisingPattern); + conf.set("insFocusesPattern",settings.insFocusesPattern); + conf.set("stepOnInsert",settings.stepOnInsert); + conf.set("unifiedDataView",settings.unifiedDataView); + conf.set("sysFileDialog",settings.sysFileDialog); + conf.set("roundedWindows",settings.roundedWindows); + conf.set("roundedButtons",settings.roundedButtons); + conf.set("roundedMenus",settings.roundedMenus); + conf.set("loadJapanese",settings.loadJapanese); + conf.set("loadChinese",settings.loadChinese); + conf.set("loadChineseTraditional",settings.loadChineseTraditional); + conf.set("loadKorean",settings.loadKorean); + conf.set("fmLayout",settings.fmLayout); + conf.set("sampleLayout",settings.sampleLayout); + conf.set("waveLayout",settings.waveLayout); + conf.set("susPosition",settings.susPosition); + conf.set("effectCursorDir",settings.effectCursorDir); + conf.set("cursorPastePos",settings.cursorPastePos); + conf.set("titleBarInfo",settings.titleBarInfo); + conf.set("titleBarSys",settings.titleBarSys); + conf.set("frameBorders",settings.frameBorders); + conf.set("effectDeletionAltersValue",settings.effectDeletionAltersValue); + conf.set("oscRoundedCorners",settings.oscRoundedCorners); + conf.set("oscTakesEntireWindow",settings.oscTakesEntireWindow); + conf.set("oscBorder",settings.oscBorder); + conf.set("oscEscapesBoundary",settings.oscEscapesBoundary); + conf.set("oscMono",settings.oscMono); + conf.set("oscAntiAlias",settings.oscAntiAlias); + conf.set("separateFMColors",settings.separateFMColors); + conf.set("insEditColorize",settings.insEditColorize); + conf.set("metroVol",settings.metroVol); + conf.set("sampleVol",settings.sampleVol); + conf.set("pushNibble",settings.pushNibble); + conf.set("scrollChangesOrder",settings.scrollChangesOrder); + conf.set("oplStandardWaveNames",settings.oplStandardWaveNames); + conf.set("cursorMoveNoScroll",settings.cursorMoveNoScroll); + conf.set("lowLatency",settings.lowLatency); + conf.set("notePreviewBehavior",settings.notePreviewBehavior); + conf.set("powerSave",settings.powerSave); + conf.set("absorbInsInput",settings.absorbInsInput); + conf.set("eventDelay",settings.eventDelay); + conf.set("moveWindowTitle",settings.moveWindowTitle); + conf.set("hiddenSystems",settings.hiddenSystems); + conf.set("initialSys2",settings.initialSys.toBase64()); + conf.set("initialSysName",settings.initialSysName); + conf.set("horizontalDataView",settings.horizontalDataView); + conf.set("noMultiSystem",settings.noMultiSystem); + conf.set("oldMacroVSlider",settings.oldMacroVSlider); + conf.set("displayAllInsTypes",settings.displayAllInsTypes); + conf.set("displayPartial",settings.displayPartial); + conf.set("noteCellSpacing",settings.noteCellSpacing); + conf.set("insCellSpacing",settings.insCellSpacing); + conf.set("volCellSpacing",settings.volCellSpacing); + conf.set("effectCellSpacing",settings.effectCellSpacing); + conf.set("effectValCellSpacing",settings.effectValCellSpacing); + conf.set("doubleClickColumn",settings.doubleClickColumn); + conf.set("blankIns",settings.blankIns); + conf.set("dragMovesSelection",settings.dragMovesSelection); + conf.set("unsignedDetune",settings.unsignedDetune); + conf.set("noThreadedInput",settings.noThreadedInput); + conf.set("saveWindowPos",settings.saveWindowPos); + conf.set("clampSamples",settings.clampSamples); + conf.set("noteOffLabel",settings.noteOffLabel); + conf.set("noteRelLabel",settings.noteRelLabel); + conf.set("macroRelLabel",settings.macroRelLabel); + conf.set("emptyLabel",settings.emptyLabel); + conf.set("emptyLabel2",settings.emptyLabel2); + conf.set("saveUnusedPatterns",settings.saveUnusedPatterns); + conf.set("channelColors",settings.channelColors); + conf.set("channelTextColors",settings.channelTextColors); + conf.set("channelStyle",settings.channelStyle); + conf.set("channelVolStyle",settings.channelVolStyle); + conf.set("channelFeedbackStyle",settings.channelFeedbackStyle); + conf.set("channelFont",settings.channelFont); + conf.set("channelTextCenter",settings.channelTextCenter); + conf.set("maxRecentFile",settings.maxRecentFile); + conf.set("midiOutClock",settings.midiOutClock); + conf.set("midiOutTime",settings.midiOutTime); + conf.set("midiOutProgramChange",settings.midiOutProgramChange); + conf.set("midiOutMode",settings.midiOutMode); + conf.set("midiOutTimeRate",settings.midiOutTimeRate); + conf.set("centerPattern",settings.centerPattern); + conf.set("ordersCursor",settings.ordersCursor); + conf.set("persistFadeOut",settings.persistFadeOut); + conf.set("exportLoops",settings.exportLoops); + conf.set("exportFadeOut",settings.exportFadeOut); + conf.set("macroLayout",settings.macroLayout); + conf.set("doubleClickTime",settings.doubleClickTime); + conf.set("oneDigitEffects",settings.oneDigitEffects); + conf.set("disableFadeIn",settings.disableFadeIn); + conf.set("alwaysPlayIntro",settings.alwaysPlayIntro); + conf.set("cursorFollowsOrder",settings.cursorFollowsOrder); + conf.set("iCannotWait",settings.iCannotWait); + conf.set("orderButtonPos",settings.orderButtonPos); + conf.set("compress",settings.compress); + conf.set("newPatternFormat",settings.newPatternFormat); + conf.set("renderBackend",settings.renderBackend); + conf.set("renderClearPos",settings.renderClearPos); + conf.set("insertBehavior",settings.insertBehavior); + conf.set("pullDeleteRow",settings.pullDeleteRow); + conf.set("newSongBehavior",settings.newSongBehavior); + conf.set("memUsageUnit",settings.memUsageUnit); + conf.set("cursorFollowsWheel",settings.cursorFollowsWheel); + conf.set("noDMFCompat",settings.noDMFCompat); + conf.set("removeInsOff",settings.removeInsOff); + conf.set("removeVolOff",settings.removeVolOff); + conf.set("playOnLoad",settings.playOnLoad); + conf.set("insTypeMenu",settings.insTypeMenu); + conf.set("capitalMenuBar",settings.capitalMenuBar); + conf.set("centerPopup",settings.centerPopup); + conf.set("insIconsStyle",settings.insIconsStyle); + conf.set("classicChipOptions",settings.classicChipOptions); + conf.set("wasapiEx",settings.wasapiEx); + conf.set("chanOscThreads",settings.chanOscThreads); + conf.set("renderPoolThreads",settings.renderPoolThreads); + conf.set("showPool",settings.showPool); + conf.set("writeInsNames",settings.writeInsNames); + conf.set("readInsNames",settings.readInsNames); + conf.set("defaultAuthorName",settings.defaultAuthorName); + conf.set("fontBackend",settings.fontBackend); + conf.set("fontHinting",settings.fontHinting); + conf.set("fontBitmap",settings.fontBitmap); + conf.set("fontAutoHint",settings.fontAutoHint); + conf.set("fontAntiAlias",settings.fontAntiAlias); + conf.set("selectAssetOnLoad",settings.selectAssetOnLoad); + conf.set("basicColors",settings.basicColors); + + // colors + for (int i=0; igetConfInt(String("keybind_GUI_ACTION_")+String(guiActions[i].name),guiActions[i].defaultBind); + conf.set(String("keybind_GUI_ACTION_")+String(guiActions[i].name),actionKeys[i]); } - decodeKeyMap(noteKeys,e->getConfString("noteKeys",DEFAULT_NOTE_KEYS)); + conf.set("noteKeys",encodeKeyMap(noteKeys)); +} + +void FurnaceGUI::syncSettings() { + readConfig(e->getConfObject()); parseKeybinds(); @@ -4136,217 +4357,10 @@ void FurnaceGUI::commitSettings() { settings.audioHiPass!=e->getConfInt("audioHiPass",1) ); - e->setConf("mainFontSize",settings.mainFontSize); - e->setConf("headFontSize",settings.headFontSize); - e->setConf("patFontSize",settings.patFontSize); - e->setConf("iconSize",settings.iconSize); - e->setConf("audioEngine",String(audioBackends[settings.audioEngine])); - e->setConf("audioDevice",settings.audioDevice); - e->setConf("midiInDevice",settings.midiInDevice); - e->setConf("midiOutDevice",settings.midiOutDevice); - e->setConf("renderDriver",settings.renderDriver); - e->setConf("sdlAudioDriver",settings.sdlAudioDriver); - e->setConf("audioQuality",settings.audioQuality); - e->setConf("audioHiPass",settings.audioHiPass); - e->setConf("audioBufSize",settings.audioBufSize); - e->setConf("audioRate",settings.audioRate); - e->setConf("audioChans",settings.audioChans); - e->setConf("arcadeCore",settings.arcadeCore); - e->setConf("ym2612Core",settings.ym2612Core); - e->setConf("snCore",settings.snCore); - e->setConf("nesCore",settings.nesCore); - e->setConf("fdsCore",settings.fdsCore); - e->setConf("c64Core",settings.c64Core); - e->setConf("pokeyCore",settings.pokeyCore); - e->setConf("opnCore",settings.opnCore); - e->setConf("opl2Core",settings.opl2Core); - e->setConf("opl3Core",settings.opl3Core); - e->setConf("arcadeCoreRender",settings.arcadeCoreRender); - e->setConf("ym2612CoreRender",settings.ym2612CoreRender); - e->setConf("snCoreRender",settings.snCoreRender); - e->setConf("nesCoreRender",settings.nesCoreRender); - e->setConf("fdsCoreRender",settings.fdsCoreRender); - e->setConf("c64CoreRender",settings.c64CoreRender); - e->setConf("pokeyCoreRender",settings.pokeyCoreRender); - e->setConf("opnCoreRender",settings.opnCoreRender); - e->setConf("opl2CoreRender",settings.opl2CoreRender); - e->setConf("opl3CoreRender",settings.opl3CoreRender); - e->setConf("pcSpeakerOutMethod",settings.pcSpeakerOutMethod); - e->setConf("yrw801Path",settings.yrw801Path); - e->setConf("tg100Path",settings.tg100Path); - e->setConf("mu5Path",settings.mu5Path); - e->setConf("mainFont",settings.mainFont); - e->setConf("headFont",settings.headFont); - e->setConf("patFont",settings.patFont); - e->setConf("mainFontPath",settings.mainFontPath); - e->setConf("headFontPath",settings.headFontPath); - e->setConf("patFontPath",settings.patFontPath); - e->setConf("patRowsBase",settings.patRowsBase); - e->setConf("orderRowsBase",settings.orderRowsBase); - e->setConf("soloAction",settings.soloAction); - e->setConf("pullDeleteBehavior",settings.pullDeleteBehavior); - e->setConf("wrapHorizontal",settings.wrapHorizontal); - e->setConf("wrapVertical",settings.wrapVertical); - e->setConf("macroView",settings.macroView); - e->setConf("fmNames",settings.fmNames); - e->setConf("allowEditDocking",settings.allowEditDocking); - e->setConf("chipNames",settings.chipNames); - e->setConf("overflowHighlight",settings.overflowHighlight); - e->setConf("partyTime",settings.partyTime); - e->setConf("flatNotes",settings.flatNotes); - e->setConf("germanNotation",settings.germanNotation); - e->setConf("stepOnDelete",settings.stepOnDelete); - e->setConf("scrollStep",settings.scrollStep); - e->setConf("sysSeparators",settings.sysSeparators); - e->setConf("forceMono",settings.forceMono); - e->setConf("controlLayout",settings.controlLayout); - e->setConf("statusDisplay",settings.statusDisplay); - e->setConf("dpiScale",settings.dpiScale); - e->setConf("viewPrevPattern",settings.viewPrevPattern); - e->setConf("guiColorsBase",settings.guiColorsBase); - e->setConf("guiColorsShading",settings.guiColorsShading); - e->setConf("avoidRaisingPattern",settings.avoidRaisingPattern); - e->setConf("insFocusesPattern",settings.insFocusesPattern); - e->setConf("stepOnInsert",settings.stepOnInsert); - e->setConf("unifiedDataView",settings.unifiedDataView); - e->setConf("sysFileDialog",settings.sysFileDialog); - e->setConf("roundedWindows",settings.roundedWindows); - e->setConf("roundedButtons",settings.roundedButtons); - e->setConf("roundedMenus",settings.roundedMenus); - e->setConf("loadJapanese",settings.loadJapanese); - e->setConf("loadChinese",settings.loadChinese); - e->setConf("loadChineseTraditional",settings.loadChineseTraditional); - e->setConf("loadKorean",settings.loadKorean); - e->setConf("fmLayout",settings.fmLayout); - e->setConf("sampleLayout",settings.sampleLayout); - e->setConf("waveLayout",settings.waveLayout); - e->setConf("susPosition",settings.susPosition); - e->setConf("effectCursorDir",settings.effectCursorDir); - e->setConf("cursorPastePos",settings.cursorPastePos); - e->setConf("titleBarInfo",settings.titleBarInfo); - e->setConf("titleBarSys",settings.titleBarSys); - e->setConf("frameBorders",settings.frameBorders); - e->setConf("effectDeletionAltersValue",settings.effectDeletionAltersValue); - e->setConf("oscRoundedCorners",settings.oscRoundedCorners); - e->setConf("oscTakesEntireWindow",settings.oscTakesEntireWindow); - e->setConf("oscBorder",settings.oscBorder); - e->setConf("oscEscapesBoundary",settings.oscEscapesBoundary); - e->setConf("oscMono",settings.oscMono); - e->setConf("oscAntiAlias",settings.oscAntiAlias); - e->setConf("separateFMColors",settings.separateFMColors); - e->setConf("insEditColorize",settings.insEditColorize); - e->setConf("metroVol",settings.metroVol); - e->setConf("sampleVol",settings.sampleVol); - e->setConf("pushNibble",settings.pushNibble); - e->setConf("scrollChangesOrder",settings.scrollChangesOrder); - e->setConf("oplStandardWaveNames",settings.oplStandardWaveNames); - e->setConf("cursorMoveNoScroll",settings.cursorMoveNoScroll); - e->setConf("lowLatency",settings.lowLatency); - e->setConf("notePreviewBehavior",settings.notePreviewBehavior); - e->setConf("powerSave",settings.powerSave); - e->setConf("absorbInsInput",settings.absorbInsInput); - e->setConf("eventDelay",settings.eventDelay); - e->setConf("moveWindowTitle",settings.moveWindowTitle); - e->setConf("hiddenSystems",settings.hiddenSystems); - e->setConf("initialSys2",settings.initialSys.toBase64()); - e->setConf("initialSysName",settings.initialSysName); - e->setConf("horizontalDataView",settings.horizontalDataView); - e->setConf("noMultiSystem",settings.noMultiSystem); - e->setConf("oldMacroVSlider",settings.oldMacroVSlider); - e->setConf("displayAllInsTypes",settings.displayAllInsTypes); - e->setConf("displayPartial",settings.displayPartial); - e->setConf("noteCellSpacing",settings.noteCellSpacing); - e->setConf("insCellSpacing",settings.insCellSpacing); - e->setConf("volCellSpacing",settings.volCellSpacing); - e->setConf("effectCellSpacing",settings.effectCellSpacing); - e->setConf("effectValCellSpacing",settings.effectValCellSpacing); - e->setConf("doubleClickColumn",settings.doubleClickColumn); - e->setConf("blankIns",settings.blankIns); - e->setConf("dragMovesSelection",settings.dragMovesSelection); - e->setConf("unsignedDetune",settings.unsignedDetune); - e->setConf("noThreadedInput",settings.noThreadedInput); - e->setConf("saveWindowPos",settings.saveWindowPos); - e->setConf("clampSamples",settings.clampSamples); - e->setConf("noteOffLabel",settings.noteOffLabel); - e->setConf("noteRelLabel",settings.noteRelLabel); - e->setConf("macroRelLabel",settings.macroRelLabel); - e->setConf("emptyLabel",settings.emptyLabel); - e->setConf("emptyLabel2",settings.emptyLabel2); - e->setConf("saveUnusedPatterns",settings.saveUnusedPatterns); - e->setConf("channelColors",settings.channelColors); - e->setConf("channelTextColors",settings.channelTextColors); - e->setConf("channelStyle",settings.channelStyle); - e->setConf("channelVolStyle",settings.channelVolStyle); - e->setConf("channelFeedbackStyle",settings.channelFeedbackStyle); - e->setConf("channelFont",settings.channelFont); - e->setConf("channelTextCenter",settings.channelTextCenter); - e->setConf("maxRecentFile",settings.maxRecentFile); - e->setConf("midiOutClock",settings.midiOutClock); - e->setConf("midiOutTime",settings.midiOutTime); - e->setConf("midiOutProgramChange",settings.midiOutProgramChange); - e->setConf("midiOutMode",settings.midiOutMode); - e->setConf("midiOutTimeRate",settings.midiOutTimeRate); - e->setConf("centerPattern",settings.centerPattern); - e->setConf("ordersCursor",settings.ordersCursor); - e->setConf("persistFadeOut",settings.persistFadeOut); - e->setConf("exportLoops",settings.exportLoops); - e->setConf("exportFadeOut",settings.exportFadeOut); - e->setConf("macroLayout",settings.macroLayout); - e->setConf("doubleClickTime",settings.doubleClickTime); - e->setConf("oneDigitEffects",settings.oneDigitEffects); - e->setConf("disableFadeIn",settings.disableFadeIn); - e->setConf("alwaysPlayIntro",settings.alwaysPlayIntro); - e->setConf("cursorFollowsOrder",settings.cursorFollowsOrder); - e->setConf("iCannotWait",settings.iCannotWait); - e->setConf("orderButtonPos",settings.orderButtonPos); - e->setConf("compress",settings.compress); - e->setConf("newPatternFormat",settings.newPatternFormat); - e->setConf("renderBackend",settings.renderBackend); - e->setConf("renderClearPos",settings.renderClearPos); - e->setConf("insertBehavior",settings.insertBehavior); - e->setConf("pullDeleteRow",settings.pullDeleteRow); - e->setConf("newSongBehavior",settings.newSongBehavior); - e->setConf("memUsageUnit",settings.memUsageUnit); - e->setConf("cursorFollowsWheel",settings.cursorFollowsWheel); - e->setConf("noDMFCompat",settings.noDMFCompat); - e->setConf("removeInsOff",settings.removeInsOff); - e->setConf("removeVolOff",settings.removeVolOff); - e->setConf("playOnLoad",settings.playOnLoad); - e->setConf("insTypeMenu",settings.insTypeMenu); - e->setConf("capitalMenuBar",settings.capitalMenuBar); - e->setConf("centerPopup",settings.centerPopup); - e->setConf("insIconsStyle",settings.insIconsStyle); - e->setConf("classicChipOptions",settings.classicChipOptions); - e->setConf("wasapiEx",settings.wasapiEx); - e->setConf("chanOscThreads",settings.chanOscThreads); - e->setConf("renderPoolThreads",settings.renderPoolThreads); - e->setConf("showPool",settings.showPool); - e->setConf("writeInsNames",settings.writeInsNames); - e->setConf("readInsNames",settings.readInsNames); - e->setConf("defaultAuthorName",settings.defaultAuthorName); - e->setConf("fontBackend",settings.fontBackend); - e->setConf("fontHinting",settings.fontHinting); - e->setConf("fontBitmap",settings.fontBitmap); - e->setConf("fontAutoHint",settings.fontAutoHint); - e->setConf("fontAntiAlias",settings.fontAntiAlias); - e->setConf("selectAssetOnLoad",settings.selectAssetOnLoad); - e->setConf("basicColors",settings.basicColors); - - // colors - for (int i=0; isetConf(guiColors[i].name,(int)ImGui::ColorConvertFloat4ToU32(uiColors[i])); - } - - // keybinds - for (int i=0; isetConf(String("keybind_GUI_ACTION_")+String(guiActions[i].name),actionKeys[i]); - } + writeConfig(e->getConfObject()); parseKeybinds(); - e->setConf("noteKeys",encodeKeyMap(noteKeys)); - midiMap.compile(); midiMap.write(e->getConfigPath()+DIR_SEPARATOR_STR+"midiIn_"+stripName(settings.midiInDevice)+".cfg"); @@ -4853,13 +4867,6 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { chanOscWorkPool=NULL; } - // colors - if (updateFonts) { - for (int i=0; igetConfInt(guiColors[i].name,guiColors[i].defaultColor)); - } - } - for (int i=0; i<64; i++) { ImVec4 col1=uiColors[GUI_COLOR_PATTERN_VOLUME_MIN]; ImVec4 col2=uiColors[GUI_COLOR_PATTERN_VOLUME_HALF];