Skip to content

Commit

Permalink
Return kNotImplemented for the VST3 input events
Browse files Browse the repository at this point in the history
  • Loading branch information
robbert-vdh committed Mar 18, 2024
1 parent 1ad6d6c commit 245add6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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]

### Fixed
Expand Down
10 changes: 5 additions & 5 deletions src/wrapper/vst3/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::ffi::{c_void, CStr};
use std::mem;
use std::sync::atomic::Ordering;
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::utils::SharedVstPtr;
use vst3_sys::VST3;
Expand Down Expand Up @@ -337,7 +337,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
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
// actually) implement these functions
kResultOk
kNotImplemented
}

unsafe fn on_key_down(
Expand All @@ -346,7 +346,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
_key_code: i16,
_modifiers: i16,
) -> tresult {
kResultOk
kNotImplemented
}

unsafe fn on_key_up(
Expand All @@ -355,7 +355,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
_key_code: i16,
_modifiers: i16,
) -> tresult {
kResultOk
kNotImplemented
}

unsafe fn get_size(&self, size: *mut ViewRect) -> tresult {
Expand Down Expand Up @@ -398,7 +398,7 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
}

unsafe fn on_focus(&self, _state: TBool) -> tresult {
kResultOk
kNotImplemented
}

unsafe fn set_frame(&self, frame: *mut c_void) -> tresult {
Expand Down

0 comments on commit 245add6

Please sign in to comment.