Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docs building #99

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this exclude the platform specifics for mac and linux (like capturer/engine, targets/ and utils)?

4 changes: 2 additions & 2 deletions src/capturer/engine/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/targets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down