Return type not bool for checking if host supports "sizeWindow"


#1

On this line: https://github.com/WeAreROLI/JUCE/blob/master/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp#L1197

unless the hostCallback is some sort of wrapper than translates the return values the hostOpcodeCanHostDo returns a type of VstInt32, not bool, so the following won’t work:

The return values are 0 = don’t know, -1 = no and 1 = yes, the above code will treat -1 like 1 since neither are zero so both will be cast to true for the bool. This may need to be updated to the following (if no translation of the values are done, which I can’t see happening anywhere):

A check throughout the code may be wise to check how from the return values from hostCallback are handled.


#2

Yes, you’re right. I’ll fix this.