mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 12:30:00 +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:
@@ -113,6 +113,12 @@ Configuration::Configuration(const fs::path& config_path,
|
||||
} else {
|
||||
invalid_options.push_back(key);
|
||||
}
|
||||
} else if (key == "vst3_no_scaling") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
vst3_no_scaling = parsed_value->get();
|
||||
} else {
|
||||
invalid_options.push_back(key);
|
||||
}
|
||||
} else {
|
||||
unknown_options.push_back(key);
|
||||
}
|
||||
|
||||
@@ -122,6 +122,15 @@ class Configuration {
|
||||
*/
|
||||
std::optional<float> frame_rate;
|
||||
|
||||
/**
|
||||
* Disable `IPlugViewContentScaleSupport::setContentScaleFactor()`. Wine
|
||||
* does not properly implement DPI scaling, so without this option plugins
|
||||
* using GDI+ would draw their editor GUIs at the normal size even though
|
||||
* their window would actually be scaled. That would result in giant black
|
||||
* borders at the top and the right of the window.
|
||||
*/
|
||||
bool vst3_no_scaling = false;
|
||||
|
||||
/**
|
||||
* The name of the plugin group that should be used for the plugin this
|
||||
* configuration object was created for. If not set, then the plugin should
|
||||
@@ -165,6 +174,7 @@ class Configuration {
|
||||
s.value1b(editor_xembed);
|
||||
s.ext(frame_rate, bitsery::ext::StdOptional(),
|
||||
[](S& s, auto& v) { s.value4b(v); });
|
||||
s.value1b(vst3_no_scaling);
|
||||
s.ext(group, bitsery::ext::StdOptional(),
|
||||
[](S& s, auto& v) { s.text1b(v, 4096); });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user