mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-16 16:33:55 +02:00
Fix VST2 editor resizing in REAPER
After solving this for VST3 plugins it become clear that REAPER required us to do the exact same thing for VST2 plugins.
This commit is contained in:
@@ -187,4 +187,15 @@ class Vst2PluginBridge : PluginBridge<Vst2Sockets<std::jthread>> {
|
||||
* now happens in two different threads.
|
||||
*/
|
||||
std::mutex incoming_midi_events_mutex;
|
||||
|
||||
/**
|
||||
* REAPER requires us to call `audioMasterSizeWidnow()` from the same thread
|
||||
* that's calling `effEditIdle()`. If we call this from any other thread,
|
||||
* then the FX window won't be resized. To accommodate for this, we'll store
|
||||
* the width and the height passed to the last call to
|
||||
* `audioMasterSizeWindow`. If this contains a value, we'll then call
|
||||
* `audioMasterSizeWindow()` with the new size during `effEditIdle()`.
|
||||
*/
|
||||
std::optional<std::pair<int, int>> incoming_resize;
|
||||
std::mutex incoming_resize_mutex;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user