I HATE GLOBAL CONFIGS I HATE GLOBAL CONFIGS I HATE

@tildearrow instead of this nonsense you could have just made a language menu in the interface settings
This commit is contained in:
tildearrow 2024-06-01 16:36:00 -05:00
parent 8e115220a3
commit c9482ba86c
7 changed files with 133 additions and 39 deletions

View file

@ -3956,15 +3956,24 @@ bool DivEngine::deinitAudioBackend(bool dueToSwitchMaster) {
return true;
}
bool DivEngine::preInit(bool noSafeMode) {
bool wantSafe=false;
// register systems
if (!systemsRegistered) registerSystems();
bool DivEngine::prePreInit() {
// init config
initConfDir();
logD("config path: %s",configPath.c_str());
configLoaded=true;
return loadConf();
}
bool DivEngine::preInit(bool noSafeMode) {
bool wantSafe=false;
if (!configLoaded) prePreInit();
logI("Furnace version " DIV_VERSION ".");
// register systems
if (!systemsRegistered) registerSystems();
// TODO: re-enable with a better approach
// see issue #1581
/*
@ -3979,10 +3988,6 @@ bool DivEngine::preInit(bool noSafeMode) {
String logPath=configPath+DIR_SEPARATOR_STR+"furnace.log";
startLogFile(logPath.c_str());
logI("Furnace version " DIV_VERSION ".");
loadConf();
if (!conf.has("opn1Core")) {
if (conf.has("opnCore")) {
conf.set("opn1Core",conf.getString("opnCore",""));

View file

@ -430,6 +430,7 @@ class DivEngine {
String exportPath;
std::thread* exportThread;
int chans;
bool configLoaded;
bool active;
bool lowQuality;
bool dcHiPass;
@ -1295,6 +1296,9 @@ class DivEngine {
// quit dispatch
void quitDispatch();
// pre-pre-initialize the engine.
bool prePreInit();
// pre-initialize the engine. returns whether Furnace should run in safe mode.
bool preInit(bool noSafeMode=true);
@ -1315,6 +1319,7 @@ class DivEngine {
output(NULL),
exportThread(NULL),
chans(0),
configLoaded(false),
active(false),
lowQuality(false),
dcHiPass(true),