diff --git a/src/common/configuration.cpp b/src/common/configuration.cpp index 9b15b7f5..5e22250d 100644 --- a/src/common/configuration.cpp +++ b/src/common/configuration.cpp @@ -49,6 +49,8 @@ Configuration::Configuration(const fs::path& config_path, // If the table is missing some fields then they will simply be left at // their defaults if (toml::table* config = value.as_table()) { + editor_double_embed = + (*config)["editor_double_embed"].value().value_or(false); group = (*config)["group"].value(); } diff --git a/src/common/configuration.h b/src/common/configuration.h index c2ba393c..61f64920 100644 --- a/src/common/configuration.h +++ b/src/common/configuration.h @@ -73,6 +73,20 @@ class Configuration { Configuration(const boost::filesystem::path& config_path, const boost::filesystem::path& yabridge_path); + /** + * If this is set to true, then the plugin editor should be embedded in yet + * another window. This would result in an embedding sequence of + * ` <-> <-> + * <-> `, where + * `` is the new addition. The only plugin I've + * encountered where this was necessary was PSPaudioware E27 (and it likely + * also applies to other PSPaudioware plugins with expandable GUIs). I also + * haven't noticed any issues caused from having this enabled, but having it + * behind a flag reduces the amount of moving parts so that's probably a + * better idea. + */ + bool editor_double_embed = 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 @@ -92,6 +106,7 @@ class Configuration { template void serialize(S& s) { + s.value1b(editor_double_embed); s.ext(group, bitsery::ext::StdOptional(), [](S& s, auto& v) { s.text1b(v, 4096); }); s.ext(matched_file, bitsery::ext::StdOptional(), diff --git a/src/plugin/plugin-bridge.cpp b/src/plugin/plugin-bridge.cpp index 578483a5..45547a13 100644 --- a/src/plugin/plugin-bridge.cpp +++ b/src/plugin/plugin-bridge.cpp @@ -633,6 +633,13 @@ void PluginBridge::log_init_message() { init_msg << ", 64-bit"; } init_msg << "'" << std::endl; + init_msg << "other options: '"; + if (config.editor_double_embed) { + init_msg << "editor: double embed"; + } else { + init_msg << ""; + } + init_msg << "'" << std::endl; init_msg << std::endl; // Include a list of enabled compile-tiem features, mostly to make debug