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-
31#[ derive( Default ) ]
42pub struct ScreenCaptureAccess ;
53
@@ -8,19 +6,19 @@ impl ScreenCaptureAccess {
86 /// Return the same result as preflight.
97 #[ inline]
108 pub fn request ( & self ) -> bool {
11- unsafe { CGRequestScreenCaptureAccess ( ) == 1 }
9+ unsafe { CGRequestScreenCaptureAccess ( ) }
1210 }
1311
1412 /// Return `true` if has access
1513 #[ inline]
1614 pub fn preflight ( & self ) -> bool {
17- unsafe { CGPreflightScreenCaptureAccess ( ) == 1 }
15+ unsafe { CGPreflightScreenCaptureAccess ( ) }
1816 }
1917}
2018
2119#[ cfg_attr( feature = "link" , link( name = "CoreGraphics" , kind = "framework" ) ) ]
2220extern "C" {
2321 // Screen Capture Access
24- fn CGRequestScreenCaptureAccess ( ) -> boolean_t ;
25- fn CGPreflightScreenCaptureAccess ( ) -> boolean_t ;
22+ fn CGRequestScreenCaptureAccess ( ) -> bool ;
23+ fn CGPreflightScreenCaptureAccess ( ) -> bool ;
2624}
You can’t perform that action at this time.
0 commit comments