Commit 6858411d authored by Georg Krause's avatar Georg Krause

Also check /usr/share/loopp for default controller maps

parent d210216c
Pipeline #419 passed with stages
in 1 minute and 59 seconds
......@@ -84,9 +84,21 @@ int DiskReader::loadPreferences()
cJSON* ctlr = cJSON_GetArrayItem( ctlrs, i );
if( ctlr && strcmp(ctlr->valuestring, "") != 0 ) {
LOOPP_NOTE("Loading controller %s", ctlr->valuestring);
stringstream s;
s << getenv("HOME") << "/.config/soundship/loopp/controllers/" << ctlr->valuestring;
gui->addMidiControllerToSetup( s.str() );
// TODO This is a really dirty hack. This way its possible to load
// default controllers also from user installed mappings. But it will also
// generate a lot of Error messages. This needs some refactoring to be done properly.
stringstream s_home;
s_home << getenv ( "HOME" )
<< "/.config/soundship/loopp/controllers/"
<< ctlr->valuestring;
gui->addMidiControllerToSetup (
s_home.str () );
stringstream s_share;
s_share << "/usr/share/loopp/"
<< ctlr->valuestring;
gui->addMidiControllerToSetup (
s_share.str () );
}
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment