mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 20:40:03 +02:00
Fully implement IPlugViewContentScaleSupport
With this we're at VST 3.6.6 level support.
This commit is contained in:
@@ -30,7 +30,9 @@ InstancePlugView::InstancePlugView() {}
|
||||
|
||||
InstancePlugView::InstancePlugView(
|
||||
Steinberg::IPtr<Steinberg::IPlugView> plug_view)
|
||||
: plug_view(plug_view), parameter_finder(plug_view) {}
|
||||
: plug_view(plug_view),
|
||||
parameter_finder(plug_view),
|
||||
plug_view_content_scale_support(plug_view) {}
|
||||
|
||||
InstanceInterfaces::InstanceInterfaces() {}
|
||||
|
||||
@@ -737,6 +739,19 @@ void Vst3Bridge::run() {
|
||||
return YaPlugView::CheckSizeConstraintResponse{
|
||||
.result = result, .updated_rect = std::move(request.rect)};
|
||||
},
|
||||
[&](YaPlugViewContentScaleSupport::SetContentScaleFactor& request)
|
||||
-> YaPlugViewContentScaleSupport::SetContentScaleFactor::
|
||||
Response {
|
||||
return main_context
|
||||
.run_in_context<tresult>([&]() {
|
||||
return object_instances[request
|
||||
.owner_instance_id]
|
||||
.plug_view_instance
|
||||
->plug_view_content_scale_support
|
||||
->setContentScaleFactor(request.factor);
|
||||
})
|
||||
.get();
|
||||
},
|
||||
[&](YaPluginBase::Initialize& request)
|
||||
-> YaPluginBase::Initialize::Response {
|
||||
// We'll create a proxy object for the host context passed by
|
||||
|
||||
@@ -46,6 +46,8 @@ struct InstancePlugView {
|
||||
// pointers if `plug_view` did not implement the interface.
|
||||
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IParameterFinder> parameter_finder;
|
||||
Steinberg::FUnknownPtr<Steinberg::IPlugViewContentScaleSupport>
|
||||
plug_view_content_scale_support;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user