diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-11 16:57:02 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-11 16:57:02 -0400 |
commit | 8f2ad9facc5b4ebe0e9e754f80772d91b509f781 (patch) | |
tree | 43c015e60a23b01879e5f303eab5bc8aaa057190 /jackd | |
parent | 20884fc74f2b8a3deeaf4b0e88db76219e46cde8 (diff) | |
download | jack1-8f2ad9facc5b4ebe0e9e754f80772d91b509f781.tar.gz |
add hackish command line parsing so that old use of -X seq (e.g. by qjackctl) has the desired effect
Diffstat (limited to 'jackd')
-rw-r--r-- | jackd/jackd.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/jackd/jackd.c b/jackd/jackd.c index eef1dbb..33a20d7 100644 --- a/jackd/jackd.c +++ b/jackd/jackd.c @@ -716,7 +716,7 @@ main (int argc, char *argv[]) break; case 'd': - seen_driver = 1; + seen_driver = optind + 1; driver_name = optarg; break; @@ -830,7 +830,26 @@ main (int argc, char *argv[]) exit (1); } + /* DIRTY HACK needed to pick up -X supplied as part of ALSA driver args. This is legacy + hack to make control apps like qjackctl based on the < 0.124 command line interface + continue to work correctly. + + If -X seq was given as part of the driver args, load the ALSA MIDI slave driver. + */ + + for (i = seen_driver; i < argc; ++i) { + if (strcmp (argv[i], "-X") == 0) { + if (argc >= i + 2) { + if (strcmp (argv[i+1], "seq") == 0) { + slave_drivers = jack_slist_append (slave_drivers,"alsa_midi"); + } + } + break; + } + } + drivers = jack_drivers_load (); + if (!drivers) { fprintf (stderr, "jackd: no drivers found; exiting\n"); exit (1); |