diff --git a/Cargo.lock b/Cargo.lock index 56b9b44..5bb0648 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -742,9 +742,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitfield-struct" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3900346345f5da88777cf29b62ed5438d4976bac8fbf00427fac5277f583bd71" +checksum = "aad5e1745b6082358758e26ed8cf52ed6abb11c548491cc9bc21eb0fa6c14c36" dependencies = [ "proc-macro2", "quote", @@ -2622,9 +2622,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -5502,9 +5502,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd96d46534b10765ce0c6208f9451d98ea38636364a41b272d3610c70dd0e4c3" +checksum = "44438500b50708bfc1e6083844e135d1b516325aae58710dcd8fb67e050ae87c" dependencies = [ "anyhow", "bytes", @@ -5748,9 +5748,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaac63b65df8e85570993eaf93ae1dd73a6fb66d8bd99674ce65f41dc3c63e7d" +checksum = "1431602bcc71f2f840ad623915c9842ecc32999b867c4a787d975a17a9625cc6" dependencies = [ "gtk", "http", diff --git a/SOEMAUTDServer/ThirdPartyNotice.txt b/SOEMAUTDServer/ThirdPartyNotice.txt index 868a743..be26088 100644 --- a/SOEMAUTDServer/ThirdPartyNotice.txt +++ b/SOEMAUTDServer/ThirdPartyNotice.txt @@ -188,7 +188,7 @@ bit-vec 0.8.0 (Apache-2.0 OR MIT) https://github.com/contain-rs/bit-vec --------------------------------------------------------- -bitfield-struct 0.9.1 (MIT) +bitfield-struct 0.9.2 (MIT) https://github.com/wrenger/bitfield-struct-rs.git --------------------------------------------------------- @@ -380,7 +380,7 @@ httpdate 1.0.3 (Apache-2.0 OR MIT) https://github.com/pyfisch/httpdate --------------------------------------------------------- -hyper 1.4.1 (MIT) +hyper 1.5.0 (MIT) https://github.com/hyperium/hyper --------------------------------------------------------- diff --git a/TwinCATAUTDServerLightweight/ThirdPartyNotice.txt b/TwinCATAUTDServerLightweight/ThirdPartyNotice.txt index 3fa2d37..956dadc 100644 --- a/TwinCATAUTDServerLightweight/ThirdPartyNotice.txt +++ b/TwinCATAUTDServerLightweight/ThirdPartyNotice.txt @@ -170,7 +170,7 @@ bit-vec 0.8.0 (Apache-2.0 OR MIT) https://github.com/contain-rs/bit-vec --------------------------------------------------------- -bitfield-struct 0.9.1 (MIT) +bitfield-struct 0.9.2 (MIT) https://github.com/wrenger/bitfield-struct-rs.git --------------------------------------------------------- @@ -350,7 +350,7 @@ httpdate 1.0.3 (Apache-2.0 OR MIT) https://github.com/pyfisch/httpdate --------------------------------------------------------- -hyper 1.4.1 (MIT) +hyper 1.5.0 (MIT) https://github.com/hyperium/hyper --------------------------------------------------------- diff --git a/simulator/ThirdPartyNotice.txt b/simulator/ThirdPartyNotice.txt index 1dc4779..25ead91 100644 --- a/simulator/ThirdPartyNotice.txt +++ b/simulator/ThirdPartyNotice.txt @@ -170,7 +170,7 @@ bit-vec 0.8.0 (Apache-2.0 OR MIT) https://github.com/contain-rs/bit-vec --------------------------------------------------------- -bitfield-struct 0.9.1 (MIT) +bitfield-struct 0.9.2 (MIT) https://github.com/wrenger/bitfield-struct-rs.git --------------------------------------------------------- @@ -574,7 +574,7 @@ httpdate 1.0.3 (Apache-2.0 OR MIT) https://github.com/pyfisch/httpdate --------------------------------------------------------- -hyper 1.4.1 (MIT) +hyper 1.5.0 (MIT) https://github.com/hyperium/hyper --------------------------------------------------------- diff --git a/simulator/src/context.rs b/simulator/src/context.rs index 4d37e01..1d072cd 100644 --- a/simulator/src/context.rs +++ b/simulator/src/context.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use autd3_derive::Builder; use winit::window::Window; -use crate::{error::SimulatorError, surface::SurfaceWrapper}; +use crate::{error::SimulatorError, surface::SurfaceWrapper, State}; #[derive(Builder)] pub struct Context { @@ -17,6 +17,7 @@ pub struct Context { impl Context { pub async fn init( + state: &State, surface: &mut SurfaceWrapper, window: Arc, ) -> Result { @@ -51,7 +52,7 @@ impl Context { ) .await?; - surface.configure(window); + surface.configure(state, window); Ok(Self { _instance: instance, diff --git a/simulator/src/simulator.rs b/simulator/src/simulator.rs index a48098a..e3ef9e6 100644 --- a/simulator/src/simulator.rs +++ b/simulator/src/simulator.rs @@ -36,7 +36,7 @@ impl Simulator { .build(&event_loop)?, ); let mut surface = SurfaceWrapper::new(); - let context = Context::init(&mut surface, window.clone()).await?; + let context = Context::init(&state, &mut surface, window.clone()).await?; let renderer = Renderer::new(&state, &context, &surface, window.clone())?; let server = ServerWrapper::new(state.port, state.lightweight, state.lightweight_port); Ok(Self { diff --git a/simulator/src/surface.rs b/simulator/src/surface.rs index 2002ac3..12e5ce3 100644 --- a/simulator/src/surface.rs +++ b/simulator/src/surface.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use autd3_derive::Builder; use winit::{dpi::PhysicalSize, window::Window}; -use crate::{context::Context, error::SimulatorError}; +use crate::{context::Context, error::SimulatorError, State}; #[derive(Builder)] pub struct SurfaceWrapper { @@ -36,9 +36,9 @@ impl SurfaceWrapper { Ok(()) } - pub fn configure(&mut self, window: Arc) { + pub fn configure(&mut self, state: &State, window: Arc) { let size = window.inner_size(); - self.config = Some(Self::surface_configuration(&size, true)); + self.config = Some(Self::surface_configuration(&size, state.vsync)); } pub fn resize(&mut self, context: &Context, size: &PhysicalSize) { diff --git a/src-tauri/ThirdPartyNotice.txt b/src-tauri/ThirdPartyNotice.txt index fdd2873..f244264 100644 --- a/src-tauri/ThirdPartyNotice.txt +++ b/src-tauri/ThirdPartyNotice.txt @@ -228,7 +228,7 @@ bit-vec 0.8.0 (Apache-2.0 OR MIT) https://github.com/contain-rs/bit-vec --------------------------------------------------------- -bitfield-struct 0.9.1 (MIT) +bitfield-struct 0.9.2 (MIT) https://github.com/wrenger/bitfield-struct-rs.git --------------------------------------------------------- @@ -763,7 +763,7 @@ httpdate 1.0.3 (Apache-2.0 OR MIT) https://github.com/pyfisch/httpdate --------------------------------------------------------- -hyper 1.4.1 (MIT) +hyper 1.5.0 (MIT) https://github.com/hyperium/hyper --------------------------------------------------------- @@ -1609,7 +1609,7 @@ tao-macros 0.1.3 (Apache-2.0 OR MIT) https://github.com/tauri-apps/tao --------------------------------------------------------- -tauri 2.0.3 (Apache-2.0 OR MIT) +tauri 2.0.4 (Apache-2.0 OR MIT) https://github.com/tauri-apps/tauri --------------------------------------------------------- @@ -1645,7 +1645,7 @@ tauri-runtime 2.1.0 (Apache-2.0 OR MIT) https://github.com/tauri-apps/tauri --------------------------------------------------------- -tauri-runtime-wry 2.1.0 (Apache-2.0 OR MIT) +tauri-runtime-wry 2.1.1 (Apache-2.0 OR MIT) https://github.com/tauri-apps/tauri ---------------------------------------------------------