Create a plugview if the plugin has an editor
The plugview, however, is still filled with stubs.
This commit is contained in:
parent
ea8edf2563
commit
2a0fde2fd5
1 changed files with 8 additions and 2 deletions
|
@ -949,8 +949,14 @@ impl<P: Plugin> IEditController for Wrapper<P> {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn create_view(&self, _name: vst3_sys::base::FIDString) -> *mut c_void {
|
unsafe fn create_view(&self, _name: vst3_sys::base::FIDString) -> *mut c_void {
|
||||||
// We currently don't support GUIs
|
// Without specialization this is the least redundant way to check if the plugin has an
|
||||||
ptr::null_mut()
|
// editor. The default implementation returns a None here.
|
||||||
|
match self.inner.plugin.read().editor_size() {
|
||||||
|
Some(_) => {
|
||||||
|
Box::into_raw(WrapperView::<P>::new(self.inner.clone())) as *mut vst3_sys::c_void
|
||||||
|
}
|
||||||
|
None => ptr::null_mut(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue