Use atomic fetch-and-add for unique window classes

This commit is contained in:
Robbert van der Helm
2020-12-31 14:12:14 +01:00
parent c3c0f96585
commit fa0753f520
4 changed files with 12 additions and 21 deletions
+1 -7
View File
@@ -379,13 +379,7 @@ intptr_t Vst2Bridge::dispatch_wrapper(AEffect* plugin,
// provided by the host, and let the plugin embed itself into
// the Wine window
const auto x11_handle = reinterpret_cast<size_t>(data);
// Win32 window classes have to be unique for the whole application.
// When hosting multiple plugins in a group process, all plugins
// should get a unique window class
const std::string window_class =
"yabridge plugin " + sockets.base_dir.string();
Editor& editor_instance =
editor.emplace(config, window_class, x11_handle);
Editor& editor_instance = editor.emplace(config, x11_handle);
return plugin->dispatcher(plugin, opcode, index, value,
editor_instance.get_win32_handle(),