Skip to content

Commit

Permalink
fix: cannot freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Feb 16, 2024
1 parent 2d38971 commit 0ceaf38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libwayshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ impl WayshotConnection {
);

let file = tempfile::tempfile().unwrap();
let image: DynamicImage = frame_copy.try_into().unwrap();
let image: DynamicImage = frame_copy.try_into()?;
let image = image::imageops::resize(
&image,
output_info.region.size.width,
Expand All @@ -493,7 +493,7 @@ impl WayshotConnection {
0,
output_info.region.size.width as i32,
output_info.region.size.height as i32,
(output_info.region.size.height * 4) as i32,
(output_info.region.size.width * 4) as i32,
frame_copy.frame_format.format,
&qh,
(),
Expand All @@ -515,7 +515,7 @@ impl WayshotConnection {
}

surface.set_buffer_transform(output_info.transform);
surface.set_buffer_scale(output_info.scale);
surface.set_buffer_scale(1);
surface.attach(Some(&buffer), 0, 0);

debug!("Committing surface with attached buffer.");
Expand Down

0 comments on commit 0ceaf38

Please sign in to comment.