mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user