From f552cd3e49699ba96971265f9c8238761eb9c3bf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 14 Jan 2012 17:42:07 +0000 Subject: Load files passed on command line without -l option (fix #804). Patch from Albert Graef. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3940 a436a847-0d15-0410-975c-d299462d15a1 --- src/ingen/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ingen/main.cpp') diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index 8a929458..4fd477d2 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -166,7 +166,7 @@ main(int argc, char** argv) // Load necessary modules before activating engine (and Jack driver) - if (conf.option("load").is_valid()) { + if (conf.option("load").is_valid() || !conf.files().empty()) { ingen_try(world->load_module("serialisation"), "Unable to load serialisation module"); } @@ -184,7 +184,7 @@ main(int argc, char** argv) } // Load a patch - if (conf.option("load").is_valid()) { + if (conf.option("load").is_valid() || !conf.files().empty()) { boost::optional parent; boost::optional symbol; const Raul::Atom& path_option = conf.option("path"); @@ -204,7 +204,9 @@ main(int argc, char** argv) ingen_try(world->parser(), "Unable to create parser"); - const string path = conf.option("load").get_string(); + const string path = conf.option("load").is_valid() ? + conf.option("load").get_string() : + conf.files().front(); engine_interface->get("ingen:plugins"); engine_interface->get("path:/"); -- cgit v1.2.1