Skip to content

Commit ac7c50b

Browse files
authored
Merge pull request #95 from MAlba124/main
linux: fix compilation errors
2 parents 7734b7f + f48ba14 commit ac7c50b

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

src/capturer/engine/linux/mod.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,7 @@ impl LinuxCapturer {
335335
.pw_node_id();
336336

337337
// TODO: Fix this hack
338-
let options = Options {
339-
fps: options.fps,
340-
show_cursor: options.show_cursor,
341-
show_highlight: options.show_highlight,
342-
output_type: options.output_type,
343-
targets: options.targets.clone(),
344-
excluded_targets: None,
345-
output_resolution: crate::capturer::Resolution::Captured,
346-
source_rect: None,
347-
};
338+
let options = options.clone();
348339
let (ready_sender, ready_recv) = sync_channel(1);
349340
let capturer_join_handle = std::thread::spawn(move || {
350341
let res = pipewire_capturer(options, tx, &ready_sender, stream_id);

src/targets/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn get_scale_factor(target: &Target) -> f64 {
5757
return win::get_scale_factor(target);
5858

5959
#[cfg(target_os = "linux")]
60-
return 1;
60+
return 1.0;
6161
}
6262

6363
pub fn get_main_display() -> Display {
@@ -67,8 +67,8 @@ pub fn get_main_display() -> Display {
6767
#[cfg(target_os = "windows")]
6868
return win::get_main_display();
6969

70-
// #[cfg(target_os = "linux")]
71-
// return linux::get_main_display();
70+
#[cfg(target_os = "linux")]
71+
unreachable!();
7272
}
7373

7474
pub fn get_target_dimensions(target: &Target) -> (u64, u64) {
@@ -78,6 +78,6 @@ pub fn get_target_dimensions(target: &Target) -> (u64, u64) {
7878
#[cfg(target_os = "windows")]
7979
return win::get_target_dimensions(target);
8080

81-
// #[cfg(target_os = "linux")]
82-
// return linux::get_target_dimensions(target);
81+
#[cfg(target_os = "linux")]
82+
unreachable!();
8383
}

0 commit comments

Comments
 (0)