From 5311c9ca6e369c4d3f56bade4311faf38af83209 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 4 Jan 2021 16:50:06 +0100 Subject: [PATCH] Add logging for IHostApplication::createInstance --- .../bridges/vst3-impls/host-context-proxy.cpp | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/wine-host/bridges/vst3-impls/host-context-proxy.cpp b/src/wine-host/bridges/vst3-impls/host-context-proxy.cpp index 0c0c63a7..226465c3 100644 --- a/src/wine-host/bridges/vst3-impls/host-context-proxy.cpp +++ b/src/wine-host/bridges/vst3-impls/host-context-proxy.cpp @@ -66,24 +66,23 @@ Vst3HostContextProxyImpl::createInstance(Steinberg::TUID /*cid*/, // These objects don't have to be created by the actual host since they'll // only be used as an argument to other functions. We can just serialize // them at that point. + tresult response; Steinberg::FUID iid = Steinberg::FUID::fromTUID(_iid); if (iid == Steinberg::Vst::IMessage::iid) { - // TODO: Add logging for this on verbosity level 1 *obj = static_cast(new YaMessage{}); - return Steinberg::kResultTrue; + response = Steinberg::kResultTrue; } else if (iid == Steinberg::Vst::IAttributeList::iid) { - // TODO: Add logging for this on verbosity level 1 *obj = static_cast(new YaAttributeList{}); - return Steinberg::kResultTrue; + response = Steinberg::kResultTrue; } else { - // When the host requests an interface we do not (yet) implement, - // we'll print a recognizable log message - const Steinberg::FUID uid = Steinberg::FUID::fromTUID(_iid); - bridge.logger.log_query_interface( - "In IHostApplication::createInstance()", Steinberg::kNotImplemented, - uid); - - return Steinberg::kNotImplemented; + *obj = nullptr; + response = Steinberg::kNotImplemented; } + + const Steinberg::FUID uid = Steinberg::FUID::fromTUID(_iid); + bridge.logger.log_query_interface("In IHostApplication::createInstance()", + response, uid); + + return response; }