From 3bdff1ea8fda48d27c11a71c92a08cd063b63c3f Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 9 Jun 2025 14:04:54 +0200 Subject: [PATCH] vst3: support 1 view only --- templates/vst3/src/vst3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/vst3/src/vst3.c b/templates/vst3/src/vst3.c index b65af19..43e51a9 100644 --- a/templates/vst3/src/vst3.c +++ b/templates/vst3/src/vst3.c @@ -2400,12 +2400,18 @@ static struct Steinberg_IPlugView* controllerCreateView(void* thisInterface, Ste return NULL; controller *c = (controller *)((char *)thisInterface - offsetof(controller, vtblIEditController)); + size_t i; + for (i = 0; i < c->viewsCount; c++) { + if (c->views[i] != NULL) { + TRACE("controllerCreateView: trying to create another view - not supported \n"); + return NULL; + } + } plugView *view = malloc(sizeof(plugView)); if (view == NULL) return NULL; - size_t i; for (i = 0; i < c->viewsCount; c++) if (c->views[i] == NULL) break;