mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 21:15:51 +02:00
Add an option to disable VST3 content scaling
This might be necessary when using a HiDPI screen as plugin GUIs often don't scale correctly under Wine.
This commit is contained in:
@@ -742,15 +742,26 @@ void Vst3Bridge::run() {
|
||||
[&](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();
|
||||
if (config.vst3_no_scaling) {
|
||||
std::cerr << "The host requested the editor GUI to "
|
||||
"be scaled by a factor of "
|
||||
<< request.factor
|
||||
<< ", but the 'vst3_no_scale' option is "
|
||||
"enabled. Ignoring the request."
|
||||
<< std::endl;
|
||||
return Steinberg::kResultFalse;
|
||||
} else {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user