work around rust-analyzer derp

This commit is contained in:
Billy Messenger
2024-12-14 17:42:28 -06:00
parent 89fb51248d
commit 490e7b5ed8
4 changed files with 14 additions and 2 deletions

View File

@@ -13,7 +13,9 @@ crate-type = ["cdylib", "lib"]
[dependencies] [dependencies]
nih_plug = { path = "../../../", features = ["assert_process_allocs", "standalone"] } 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"]} softbuffer = { version = "0.4.6", default-features = false, features = ["kms", "x11"]}
raw-window-handle = "0.5" raw-window-handle = "0.5"
raw-window-handle-06 = { package = "raw-window-handle", version = "0.6" } raw-window-handle-06 = { package = "raw-window-handle", version = "0.6" }

View File

@@ -202,6 +202,10 @@ impl Editor for CustomSoftbufferEditor {
scale: scaling_factor scale: scaling_factor
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64)) .map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
.unwrap_or(WindowScalePolicy::SystemScaleFactor), .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 { move |window: &mut baseview::Window<'_>| -> CustomSoftbufferWindow {
CustomSoftbufferWindow::new( CustomSoftbufferWindow::new(

View File

@@ -13,7 +13,9 @@ crate-type = ["cdylib", "lib"]
[dependencies] [dependencies]
nih_plug = { path = "../../../", features = ["assert_process_allocs", "standalone"] } 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" wgpu = "23"
raw-window-handle = "0.5" raw-window-handle = "0.5"
raw-window-handle-06 = { package = "raw-window-handle", version = "0.6" } raw-window-handle-06 = { package = "raw-window-handle", version = "0.6" }

View File

@@ -321,6 +321,10 @@ impl Editor for CustomWgpuEditor {
scale: scaling_factor scale: scaling_factor
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64)) .map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
.unwrap_or(WindowScalePolicy::SystemScaleFactor), .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 { move |window: &mut baseview::Window<'_>| -> CustomWgpuWindow {
CustomWgpuWindow::new( CustomWgpuWindow::new(