Handle all dispatch calls from the main thread

Some plugins apparently assume that all events (or at least some
specific ones) are sent from the thread it was created on and will
segfault otherwise. The is the case for Melda plugins.
This commit is contained in:
Robbert van der Helm
2020-03-23 23:41:00 +01:00
parent 5552fc3009
commit 096e36dfdc
3 changed files with 30 additions and 29 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ int main(int argc, char* argv[]) {
try {
PluginBridge bridge(plugin_dll_path, socket_endpoint_path);
// Block the main thread until the plugin shuts down
bridge.wait();
// Blocks the main thread until the plugin shuts down
bridge.handle_dispatch();
} catch (const std::runtime_error& error) {
std::cerr << "Error while initializing Wine VST host:" << std::endl;
std::cerr << error.what() << std::endl;