aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_console.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-09 22:00:54 +0000
committerDavid Robillard <d@drobilla.net>2015-10-09 22:00:54 +0000
commit179200bf87a153e1103a3bbe6133c9f5339d62d2 (patch)
treeda5ef637c94c8bc19d168db40997e91a06d4456a /src/jalv_console.c
parent5791a2a5bb3db7784f87efbb181cf8151a40c2de (diff)
downloadjalv-179200bf87a153e1103a3bbe6133c9f5339d62d2.tar.gz
jalv-179200bf87a153e1103a3bbe6133c9f5339d62d2.tar.bz2
jalv-179200bf87a153e1103a3bbe6133c9f5339d62d2.zip
Allow Jack client name to be set from command line
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5760 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv_console.c')
-rw-r--r--src/jalv_console.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jalv_console.c b/src/jalv_console.c
index 79cde0f..b17779b 100644
--- a/src/jalv_console.c
+++ b/src/jalv_console.c
@@ -39,6 +39,8 @@ print_usage(const char* name, bool error)
fprintf(os, " -l DIR Load state from save directory\n");
fprintf(os, " -d DIR Dump plugin <=> UI communication\n");
fprintf(os, " -b SIZE Buffer size for plugin <=> UI communication\n");
+ fprintf(os, " -n NAME JACK client name\n");
+ fprintf(os, " -x Exact JACK client name (exit if taken)\n");
return error ? 1 : 0;
}
@@ -101,6 +103,15 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts)
opts->controls[n_controls] = NULL;
} else if ((*argv)[a][1] == 'd') {
opts->dump = true;
+ } else if ((*argv)[a][1] == 'n') {
+ if (++a == *argc) {
+ fprintf(stderr, "Missing argument for -n\n");
+ return 1;
+ }
+ free(opts->name);
+ opts->name = jalv_strdup((*argv)[a]);
+ } else if ((*argv)[a][1] == 'x') {
+ opts->name_exact = 1;
} else {
fprintf(stderr, "Unknown option %s\n", (*argv)[a]);
return print_usage((*argv)[0], true);