1
0
Fork 0

Return kNotImplemented for the VST3 input events

This commit is contained in:
Robbert van der Helm 2024-03-18 21:48:39 +01:00
parent 1ad6d6cc5c
commit 245add6530
2 changed files with 13 additions and 5 deletions

View file

@ -10,6 +10,14 @@ Since there is no stable release yet, the changes are organized per day in
reverse chronological order. The main purpose of this document in its current reverse chronological order. The main purpose of this document in its current
state is to list breaking changes. state is to list breaking changes.
## [2024-03-18]
### Changed
- (Keyboard) input events sent by the host through VST3's `IPlugView` interface
are now explicitly ignored. This may allow a couple more keyboard events to
reach through to plugin windows in hosts that use these.
## [2024-02-23] ## [2024-02-23]
### Fixed ### Fixed

View file

@ -5,7 +5,7 @@ use std::ffi::{c_void, CStr};
use std::mem; use std::mem;
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
use std::sync::Arc; use std::sync::Arc;
use vst3_sys::base::{kInvalidArgument, kResultFalse, kResultOk, tresult, TBool}; use vst3_sys::base::{kInvalidArgument, kNotImplemented, kResultFalse, kResultOk, tresult, TBool};
use vst3_sys::gui::{IPlugFrame, IPlugView, IPlugViewContentScaleSupport, ViewRect}; use vst3_sys::gui::{IPlugFrame, IPlugView, IPlugViewContentScaleSupport, ViewRect};
use vst3_sys::utils::SharedVstPtr; use vst3_sys::utils::SharedVstPtr;
use vst3_sys::VST3; use vst3_sys::VST3;
@ -337,7 +337,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
unsafe fn on_wheel(&self, _distance: f32) -> tresult { unsafe fn on_wheel(&self, _distance: f32) -> tresult {
// We'll let the plugin use the OS' input mechanisms because not all DAWs (or very few // We'll let the plugin use the OS' input mechanisms because not all DAWs (or very few
// actually) implement these functions // actually) implement these functions
kResultOk kNotImplemented
} }
unsafe fn on_key_down( unsafe fn on_key_down(
@ -346,7 +346,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
_key_code: i16, _key_code: i16,
_modifiers: i16, _modifiers: i16,
) -> tresult { ) -> tresult {
kResultOk kNotImplemented
} }
unsafe fn on_key_up( unsafe fn on_key_up(
@ -355,7 +355,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
_key_code: i16, _key_code: i16,
_modifiers: i16, _modifiers: i16,
) -> tresult { ) -> tresult {
kResultOk kNotImplemented
} }
unsafe fn get_size(&self, size: *mut ViewRect) -> tresult { unsafe fn get_size(&self, size: *mut ViewRect) -> tresult {
@ -398,7 +398,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
} }
unsafe fn on_focus(&self, _state: TBool) -> tresult { unsafe fn on_focus(&self, _state: TBool) -> tresult {
kResultOk kNotImplemented
} }
unsafe fn set_frame(&self, frame: *mut c_void) -> tresult { unsafe fn set_frame(&self, frame: *mut c_void) -> tresult {