From 0a0037a11e453ad4de7a15c1031670ceb5667db2 Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Sun, 10 Jul 2016 12:55:45 +0200 Subject: Discover presence of UI before jack_activate jalv.has_ui should be set before jack_activate. If not, patch:Get message may be without effect and parameter replies never be sent from within jack process callback, as the latter may run before the corresponding UI logic (e.g. with jalv.has_ui still being false). --- src/jalv_console.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/jalv_console.c') diff --git a/src/jalv_console.c b/src/jalv_console.c index e72ff7a..d3f3389 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -157,11 +157,15 @@ jalv_process_command(Jalv* jalv, const char* cmd) } } +bool +jalv_discover_ui(Jalv* jalv) +{ + return jalv->opts.show_ui; +} + int jalv_open_ui(Jalv* jalv) { - jalv->has_ui = jalv->opts.show_ui; - const LV2UI_Idle_Interface* idle_iface = NULL; const LV2UI_Show_Interface* show_iface = NULL; if (jalv->ui && jalv->opts.show_ui) { -- cgit v1.2.1