From f48ba14f10d85614358257b5994984387a9cb2b3 Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 27 Jun 2024 15:25:47 +0200 Subject: [PATCH] linux: fix compilation errors --- src/capturer/engine/linux/mod.rs | 11 +---------- src/targets/mod.rs | 10 +++++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/capturer/engine/linux/mod.rs b/src/capturer/engine/linux/mod.rs index fc4d32e..cabefbc 100644 --- a/src/capturer/engine/linux/mod.rs +++ b/src/capturer/engine/linux/mod.rs @@ -335,16 +335,7 @@ impl LinuxCapturer { .pw_node_id(); // TODO: Fix this hack - let options = Options { - fps: options.fps, - show_cursor: options.show_cursor, - show_highlight: options.show_highlight, - output_type: options.output_type, - targets: options.targets.clone(), - excluded_targets: None, - output_resolution: crate::capturer::Resolution::Captured, - source_rect: None, - }; + let options = options.clone(); let (ready_sender, ready_recv) = sync_channel(1); let capturer_join_handle = std::thread::spawn(move || { let res = pipewire_capturer(options, tx, &ready_sender, stream_id); diff --git a/src/targets/mod.rs b/src/targets/mod.rs index 836bc7c..930ab62 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 { @@ -67,8 +67,8 @@ pub fn get_main_display() -> Display { #[cfg(target_os = "windows")] return win::get_main_display(); - // #[cfg(target_os = "linux")] - // return linux::get_main_display(); + #[cfg(target_os = "linux")] + unreachable!(); } pub fn get_target_dimensions(target: &Target) -> (u64, u64) { @@ -78,6 +78,6 @@ pub fn get_target_dimensions(target: &Target) -> (u64, u64) { #[cfg(target_os = "windows")] return win::get_target_dimensions(target); - // #[cfg(target_os = "linux")] - // return linux::get_target_dimensions(target); + #[cfg(target_os = "linux")] + unreachable!(); }