custom config directory

This commit is contained in:
tildearrow 2021-12-19 03:16:24 -05:00
parent 8bdbd1074f
commit f42cfcbdc8
7 changed files with 103 additions and 3 deletions

View file

@ -17,8 +17,10 @@
#ifdef _WIN32
#include <windows.h>
#define LAYOUT_INI "\\layout.ini"
#else
#include <unistd.h>
#define LAYOUT_INI "/layout.ini"
#endif
const int _ZERO=0;
@ -1961,7 +1963,10 @@ bool FurnaceGUI::init() {
sty.ScaleAllSizes(dpiScale);
strncpy(finalConfigPath,(e->getConfigPath()+String(LAYOUT_INI)).c_str(),4095);
ImGui::GetIO().ConfigFlags|=ImGuiConfigFlags_DockingEnable;
ImGui::GetIO().IniFilename=finalConfigPath;
if ((mainFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(defFont_main_compressed_data,defFont_main_compressed_size,18*dpiScale))==NULL) {
logE("could not load UI font!\n");

View file

@ -86,6 +86,8 @@ class FurnaceGUI {
ImVec4 uiColors[GUI_COLOR_MAX];
ImVec4 volColors[128];
char finalConfigPath[4096];
int curIns, curWave, curSample, curOctave, oldRow, editStep;
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen;