Don't cache IHostApplication::getName()

As it turns out there are only two or three functions where we can do
this. It also breaks logging, and this function will probably only be
called once anyways. More consistency is always better.
This commit is contained in:
Robbert van der Helm
2020-12-19 18:28:16 +01:00
parent 01d84b0029
commit 63ae5f330c
13 changed files with 124 additions and 41 deletions
+18
View File
@@ -83,6 +83,24 @@ Vst3PluginBridge::Vst3PluginBridge()
[&](const WantsConfiguration&) -> WantsConfiguration::Response {
return config;
},
[&](const YaHostApplication::GetName& request)
-> YaHostApplication::GetName::Response {
tresult result;
Steinberg::Vst::String128 name{0};
if (request.owner_instance_id) {
result = plugin_proxies.at(*request.owner_instance_id)
.get()
.host_application->getName(name);
} else {
result =
plugin_factory->host_application->getName(name);
}
return YaHostApplication::GetNameResponse{
.result = result,
.name = tchar_pointer_to_u16string(name),
};
},
[&](const YaComponentHandler::BeginEdit& request)
-> YaComponentHandler::BeginEdit::Response {
return plugin_proxies.at(request.owner_instance_id)