Fix regression for VST3 editor initial sizing

We accidentally reverted a little bit too much code in
762e622416. This didn't appear any sooner
because plugins are supposed to call `IPlugFrame::resizeView()` during
`IPlugView::attached()`, so this only affects plugins that don't confirm
to the spec.
This commit is contained in:
Robbert van der Helm
2021-08-02 14:44:44 +02:00
parent 1287beb1fe
commit 2e6732c0e2
2 changed files with 20 additions and 3 deletions
+9
View File
@@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fixed a regression from yabridge 3.5.1 where certain non-standard compliant
VST3 plugins wouldn't resize to their correct size when opening the editor.
This affects **Kontakt**, and it was caused by reverting just a little bit too
much code in the regression fix from the previous release.
## [3.5.1] - 2021-06-31
### Added
+11 -3
View File
@@ -739,9 +739,17 @@ void Vst3Bridge::run() {
editor_instance.get_win32_handle(),
type.c_str());
// Get rid of the editor again if the plugin didn't
// embed itself in it
if (result != Steinberg::kResultOk) {
// Set the window's initial size according to what the
// plugin reports. Otherwise get rid of the editor again
// if the plugin didn't embed itself in it.
if (result == Steinberg::kResultOk) {
Steinberg::ViewRect size{};
if (instance.plug_view_instance->plug_view->getSize(
&size) == Steinberg::kResultOk) {
instance.editor->resize(size.getWidth(),
size.getHeight());
}
} else {
instance.editor.reset();
}