diff --git a/Cargo.toml b/Cargo.toml index 10180fd..430af08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,3 +37,8 @@ objc = "0.2.7" pipewire = "0.8.0" dbus = "0.9.7" rand = "0.8.5" + +[package.metadata.docs.rs] +cargo-features = ["--no-default-features"] +cargo_args = ["--no-deps"] +default-target = "x86_64-pc-windows-msvc" diff --git a/src/capturer/engine/linux/mod.rs b/src/capturer/engine/linux/mod.rs index fc4d32e..bde7307 100644 --- a/src/capturer/engine/linux/mod.rs +++ b/src/capturer/engine/linux/mod.rs @@ -340,10 +340,10 @@ impl LinuxCapturer { show_cursor: options.show_cursor, show_highlight: options.show_highlight, output_type: options.output_type, - targets: options.targets.clone(), + target: options.target.clone(), excluded_targets: None, output_resolution: crate::capturer::Resolution::Captured, - source_rect: None, + crop_area: None, }; let (ready_sender, ready_recv) = sync_channel(1); let capturer_join_handle = std::thread::spawn(move || { diff --git a/src/main.rs b/src/main.rs index 4446323..b2e75a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ // This program is just a testing application // Refer to `lib.rs` for the library source code + use scap::{ capturer::{Area, Capturer, Options, Point, Size}, frame::Frame, diff --git a/src/targets/mod.rs b/src/targets/mod.rs index 836bc7c..a2cff4c 100644 --- a/src/targets/mod.rs +++ b/src/targets/mod.rs @@ -57,7 +57,7 @@ pub fn get_scale_factor(target: &Target) -> f64 { return win::get_scale_factor(target); #[cfg(target_os = "linux")] - return 1; + return 1.0; } pub fn get_main_display() -> Display { @@ -69,6 +69,7 @@ pub fn get_main_display() -> Display { // #[cfg(target_os = "linux")] // return linux::get_main_display(); + } pub fn get_target_dimensions(target: &Target) -> (u64, u64) {