Skip to content

Commit

Permalink
VST3: allow multiple fdes per plugin UI (#8550)
Browse files Browse the repository at this point in the history
  • Loading branch information
x42 committed Jan 25, 2021
1 parent f0a89c4 commit 35552ab
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions gtk2_ardour/vst3_x11_plugin_ui.cc
Expand Up @@ -117,16 +117,22 @@ class VST3X11Runloop : public Linux::IRunLoop
return kInvalidArgument;
}

std::vector<boost::unordered_map<FileDescriptor, EventHandler>::iterator> to_erase;

tresult rv = false;

Glib::Threads::Mutex::Lock lm (_lock);
for (boost::unordered_map<FileDescriptor, EventHandler>::iterator it = _event_handlers.begin (); it != _event_handlers.end (); ++it) {
for (boost::unordered_map<FileDescriptor, EventHandler>::iterator it = _event_handlers.begin (); it != _event_handlers.end ();) {
if (it->second._handler == handler) {
g_source_remove (it->second._source_id);
g_io_channel_unref (it->second._gio_channel);
_event_handlers.erase (it);
return kResultTrue;
it = _event_handlers.erase (it);
rv = kResultTrue;
} else {
++it;
}
}
return kResultFalse;
return rv;
}

tresult registerTimer (Linux::ITimerHandler* handler, TimerInterval milliseconds) SMTG_OVERRIDE
Expand Down

0 comments on commit 35552ab

Please sign in to comment.