File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
- pub use crate :: base:: boolean_t;
2
-
3
1
#[ derive( Default ) ]
4
2
pub struct ScreenCaptureAccess ;
5
3
@@ -8,19 +6,19 @@ impl ScreenCaptureAccess {
8
6
/// Return the same result as preflight.
9
7
#[ inline]
10
8
pub fn request ( & self ) -> bool {
11
- unsafe { CGRequestScreenCaptureAccess ( ) == 1 }
9
+ unsafe { CGRequestScreenCaptureAccess ( ) }
12
10
}
13
11
14
12
/// Return `true` if has access
15
13
#[ inline]
16
14
pub fn preflight ( & self ) -> bool {
17
- unsafe { CGPreflightScreenCaptureAccess ( ) == 1 }
15
+ unsafe { CGPreflightScreenCaptureAccess ( ) }
18
16
}
19
17
}
20
18
21
19
#[ cfg_attr( feature = "link" , link( name = "CoreGraphics" , kind = "framework" ) ) ]
22
20
extern "C" {
23
21
// Screen Capture Access
24
- fn CGRequestScreenCaptureAccess ( ) -> boolean_t ;
25
- fn CGPreflightScreenCaptureAccess ( ) -> boolean_t ;
22
+ fn CGRequestScreenCaptureAccess ( ) -> bool ;
23
+ fn CGPreflightScreenCaptureAccess ( ) -> bool ;
26
24
}
You can’t perform that action at this time.
0 commit comments