Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
send, sync capture access token
Browse files Browse the repository at this point in the history
  • Loading branch information
liam committed Apr 18, 2024
1 parent 4fb360b commit 1ac58e4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# CrabGrab
🦀 🖥️ 🦀

## A cross-platform screen-capturing crate for rust
3 changes: 3 additions & 0 deletions src/capture_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ pub struct CaptureAccessToken {
pub(crate) impl_capture_access_token: ImplCaptureAccessToken
}

unsafe impl Send for CaptureAccessToken {}
unsafe impl Sync for CaptureAccessToken {}

impl CaptureAccessToken {
pub fn allows_borderless(&self) -> bool {
self.impl_capture_access_token.allows_borderless()
Expand Down
3 changes: 3 additions & 0 deletions src/platform/macos/capture_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ impl MacosAudioCaptureConfigExt for AudioCaptureConfig {
#[derive(Clone, Copy, Debug)]
pub(crate) struct MacosCaptureAccessToken();

unsafe impl Send for MacosCaptureAccessToken {}
unsafe impl Sync for MacosCaptureAccessToken {}

impl MacosCaptureAccessToken {
pub(crate) fn allows_borderless(&self) -> bool {
true
Expand Down
3 changes: 3 additions & 0 deletions src/platform/windows/capture_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ pub(crate) struct WindowsCaptureAccessToken {
borderless: bool,
}

unsafe impl Send for WindowsCaptureAccessToken {}
unsafe impl Sync for WindowsCaptureAccessToken {}

impl WindowsCaptureAccessToken {
pub(crate) fn allows_borderless(&self) -> bool {
self.borderless
Expand Down

0 comments on commit 1ac58e4

Please sign in to comment.