Skip to content

Commit

Permalink
work around rust-analyzer derp
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyDM committed Dec 14, 2024
1 parent 7f06398 commit 78ca9bb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion plugins/examples/byo_gui_softbuffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ crate-type = ["cdylib", "lib"]

[dependencies]
nih_plug = { path = "../../../", features = ["assert_process_allocs", "standalone"] }
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "9a0b42c09d712777b2edb4c5e0cb6baf21e988f0" }
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when
# some crates do use it and others don't
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "9a0b42c09d712777b2edb4c5e0cb6baf21e988f0", features = ["opengl"]}
softbuffer = { version = "0.4.6", default-features = false, features = ["kms", "x11"]}
raw-window-handle = "0.5"
raw-window-handle-06 = { package = "raw-window-handle", version = "0.6" }
Expand Down
4 changes: 4 additions & 0 deletions plugins/examples/byo_gui_softbuffer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ impl Editor for CustomSoftbufferEditor {
scale: scaling_factor
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
.unwrap_or(WindowScalePolicy::SystemScaleFactor),

// NOTE: The OpenGL feature in baseview is not needed here, but rust-analyzer gets
// confused when some crates do use it and others don't.
gl_config: None,
},
move |window: &mut baseview::Window<'_>| -> CustomSoftbufferWindow {
CustomSoftbufferWindow::new(
Expand Down
4 changes: 3 additions & 1 deletion plugins/examples/byo_gui_wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ crate-type = ["cdylib", "lib"]

[dependencies]
nih_plug = { path = "../../../", features = ["assert_process_allocs", "standalone"] }
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "9a0b42c09d712777b2edb4c5e0cb6baf21e988f0" }
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when
# some crates do use it and others don't
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "9a0b42c09d712777b2edb4c5e0cb6baf21e988f0", features = ["opengl"]}
wgpu = "23"
raw-window-handle = "0.5"
raw-window-handle-06 = { package = "raw-window-handle", version = "0.6" }
Expand Down
4 changes: 4 additions & 0 deletions plugins/examples/byo_gui_wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ impl Editor for CustomWgpuEditor {
scale: scaling_factor
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
.unwrap_or(WindowScalePolicy::SystemScaleFactor),

// NOTE: The OpenGL feature in baseview is not needed here, but rust-analyzer gets
// confused when some crates do use it and others don't.
gl_config: None,
},
move |window: &mut baseview::Window<'_>| -> CustomWgpuWindow {
CustomWgpuWindow::new(
Expand Down

0 comments on commit 78ca9bb

Please sign in to comment.