Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Fix EditorGetRect opcode (#115)
Browse files Browse the repository at this point in the history
* Fix `EditorGetRect` opcode

Plugin should return `1` if it has editor on `EditorGetRect` opcode, otherwise provided dimensions won't be applied by host.

* cargo fmt

* Add some more clippy ignores

* Remove redundant clone

Co-authored-by: Charles Saracco <crsaracco@gmail.com>
  • Loading branch information
inikulin and crsaracco committed Jan 2, 2020
1 parent 5643069 commit f943b56
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- cargo build --verbose
- cargo test --verbose
- cargo fmt --all -- --check
- cargo +stable clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp
- cargo +stable clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp -A clippy::comparison-chain -A clippy::needless-doctest-main -A clippy::missing-safety-doc
- stage: test
os: osx
before_script:
Expand All @@ -25,7 +25,7 @@ jobs:
- cargo build --verbose
- cargo test --verbose
- cargo fmt --all -- --check
- cargo +stable clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp
- cargo +stable clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp -A clippy::comparison-chain -A clippy::needless-doctest-main -A clippy::missing-safety-doc

# deploy crates and documentation conditionally
# deploy on cargo if tagged master release
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ pub fn dispatch(effect: *mut AEffect, opcode: i32, index: i32, value: isize, ptr
bottom: (pos.1 + size.1) as i16, // y coord of pos + y coord of size
})) as *mut _; // TODO: free memory
}

return 1;
}
}
OpCode::EditorOpen => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub fn main<T: Plugin + Default>(callback: HostCallbackProc) -> *mut AEffect {

trace!("Creating VST plugin instance...");
let mut plugin = T::new(host);
let info = plugin.get_info().clone();
let info = plugin.get_info();
let params = plugin.get_parameter_object();
let editor = plugin.get_editor();

Expand Down

0 comments on commit f943b56

Please sign in to comment.