MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / loadSettings

Method loadSettings

src/CardinalCommon.cpp:752–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750}
751
752void Initializer::loadSettings(const bool isRealInstance)
753{
754 using namespace rack;
755
756 if (isRealInstance)
757 {
758 INFO("Loading settings");
759 settings::load();
760 shouldSaveSettings = true;
761 }
762
763 // enforce settings that do not make sense as anything else
764 settings::safeMode = false;
765 settings::token.clear();
766 settings::windowMaximized = false;
767 settings::windowPos = math::Vec(0, 0);
768 settings::pixelRatio = 0.0;
769 settings::sampleRate = 0;
770 settings::threadCount = 1;
771 settings::autosaveInterval = 0;
772 settings::skipLoadOnLaunch = true;
773 settings::autoCheckUpdates = false;
774 settings::showTipsOnLaunch = false;
775 settings::tipIndex = -1;
776
777 if (settings::uiTheme != "dark" && settings::uiTheme != "light")
778 {
779 settings::uiTheme = "dark";
780 rack::ui::refreshTheme();
781 }
782
783 // reload dark/light mode as necessary
784 switchDarkMode(settings::uiTheme == "dark");
785}
786
787#ifdef HAVE_LIBLO
788bool Initializer::startRemoteServer(const char* const port)

Callers 2

CardinalPlugin.cppFile · 0.45
WebBrowserDataLoadedFunction · 0.45

Calls 3

VecClass · 0.85
switchDarkModeFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected