Closed Spacechild1 closed 3 years ago
Alternatively, you could call audioMasterSizeWindow
after the editor has been opened and when the actual window size is available.
I've changed the code to return 1 (true) from effEditGetRect only if the editor opens, otherwise it returns 0 (false).
cool, thanks!
If it doesn't work just let me know.
There's a small quirk left: although it returns 0 if the editor isn't open, it assigns the output pointer argument to an (empty) window rect. Instead, it shouldn't assign the pointer at all.
But it's not a big deal, I can work around it.
Hi, I've written a VST plugin host for Pd and SuperCollider (https://git.iem.at/pd/vstplugin/) and just got a bug report from a user of LinVst where the plugin window would be too small.
I think the problem boils down to this: https://github.com/osxmidi/LinVst/blob/416acfedf276ac0e5f37a143a294530c441d69e6/linvst.cpp#L550 On
effEditGetRect
, LinVst simply usesretRect
and returns success, even ifretRect
hasn't been updated to the actual coordinates, which means it still has the default coordinates{0,0,200,500}
.I understand that LinVst can only get the actual rect after opening the plugin GUI and waiting for the server reply. But this means it should return 0 if the host calls
effEditGetRect
with the editor being closed, so the host knows that the rect is not really available (yet).I guess I have to adapt my own code for edge cases like this anyway, but you might want to fix it nevertheless.
Thanks!