Rename vst3_no_scaling to editor_disable_host_scaling

This will also affect CLAP plugins.
This commit is contained in:
Robbert van der Helm
2022-10-01 00:34:34 +02:00
parent 82840ab6df
commit 1b875ad286
6 changed files with 47 additions and 32 deletions
+6 -6
View File
@@ -107,6 +107,12 @@ Configuration::Configuration(const fs::path& config_path,
} else {
invalid_options.emplace_back(key);
}
} else if (key == "editor_disable_host_scaling") {
if (const auto parsed_value = value.as_boolean()) {
editor_disable_host_scaling = parsed_value->get();
} else {
invalid_options.emplace_back(key);
}
} else if (key == "editor_force_dnd") {
if (const auto parsed_value = value.as_boolean()) {
editor_force_dnd = parsed_value->get();
@@ -136,12 +142,6 @@ Configuration::Configuration(const fs::path& config_path,
} else {
invalid_options.emplace_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.emplace_back(key);
}
} else if (key == "vst3_prefer_32bit") {
if (const auto parsed_value = value.as_boolean()) {
vst3_prefer_32bit = parsed_value->get();
+2 -2
View File
@@ -150,7 +150,7 @@ class Configuration {
* that with a Wine font DPI of 192 plugins often do draw correctly at 200%
* scale.
*/
bool vst3_no_scaling = false;
bool editor_disable_host_scaling = false;
/**
* If a merged bundle contains both the 64-bit and the 32-bit versions of a
@@ -203,7 +203,7 @@ class Configuration {
s.ext(frame_rate, bitsery::ext::InPlaceOptional(),
[](S& s, auto& v) { s.value4b(v); });
s.value1b(hide_daw);
s.value1b(vst3_no_scaling);
s.value1b(editor_disable_host_scaling);
s.value1b(vst3_prefer_32bit);
s.ext(matched_file, bitsery::ext::InPlaceOptional(),
+3 -3
View File
@@ -291,6 +291,9 @@ class PluginBridge {
if (config_.editor_coordinate_hack) {
other_options.push_back("editor: coordinate hack");
}
if (config_.editor_disable_host_scaling) {
other_options.push_back("editor: no host DPI scaling");
}
if (config_.editor_force_dnd) {
other_options.push_back("editor: force drag-and-drop");
}
@@ -306,9 +309,6 @@ class PluginBridge {
if (config_.hide_daw) {
other_options.push_back("hack: hide DAW name");
}
if (config_.vst3_no_scaling) {
other_options.push_back("vst3: no GUI scaling");
}
if (config_.vst3_prefer_32bit) {
other_options.push_back("vst3: prefer 32-bit");
}
+8 -7
View File
@@ -997,13 +997,14 @@ void Vst3Bridge::run() {
[&](YaPlugViewContentScaleSupport::SetContentScaleFactor& request)
-> YaPlugViewContentScaleSupport::SetContentScaleFactor::
Response {
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;
if (config_.editor_disable_host_scaling) {
std::cerr
<< "The host requested the editor GUI to be "
"scaled by a factor of "
<< request.factor
<< ", but the 'editor_disable_host_scaling' "
"option is enabled. Ignoring the request."
<< std::endl;
return Steinberg::kNotImplemented;
} else {
return main_context_