Skip to content

Commit

Permalink
Merge pull request #95 from MAlba124/main
Browse files Browse the repository at this point in the history
linux: fix compilation errors
  • Loading branch information
clearlysid authored Jul 31, 2024
2 parents 7734b7f + f48ba14 commit ac7c50b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
11 changes: 1 addition & 10 deletions src/capturer/engine/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions 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 @@ -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) {
Expand All @@ -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!();
}

0 comments on commit ac7c50b

Please sign in to comment.