MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / GetUserPrefsPath

Method GetUserPrefsPath

Source/ModularSynth.cpp:301–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299
300
301std::string ModularSynth::GetUserPrefsPath()
302{
303 std::string filename = "userprefs.json";
304 for (int i = 0; i < JUCEApplication::getCommandLineParameterArray().size(); ++i)
305 {
306 juce::String specified = JUCEApplication::getCommandLineParameterArray()[i];
307 if (specified.endsWith(".json"))
308 {
309 filename = specified.toStdString();
310 if (!juce::File(ofToDataPath(filename)).existsAsFile())
311 TheSynth->SetFatalError("couldn't find command-line-specified userprefs file at " + ofToDataPath(filename));
312 break;
313 }
314 }
315
316 return ofToDataPath(filename);
317}
318
319static int sFrameCount = 0;
320void ModularSynth::Poll()

Callers 3

SaveMethod · 0.80
InitMethod · 0.80

Calls 3

ofToDataPathFunction · 0.85
sizeMethod · 0.80
SetFatalErrorMethod · 0.80

Tested by

no test coverage detected