-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScreenCaptureAccess.preflight returns incorrect value for Intel based 64bit Mac #677
Comments
The correct way to work with external booleans is always to compare them against |
Yup @madsmtm . That was what I tried first, but I observed that Is it possible that it's something to do with Boolean being 1 byte by int32 being 4 bytes? Because the last 8 bits of the returned value are always 0000 0000 or 0000 0001 |
Oh... Actually, you're right, the issue is that the definition in Rust is using |
Yup. Thank you @madsmtm |
Can't answer that, not a maintainer here, sorry |
Please submit a PR |
The function ScreenCaptureAccess.preflight [ Ref ] returns incorrectly for Intel based 64 bit Macs.
On further inspection, the reason for this is that the external method
CGPreflightScreenCaptureAccess
returns a value which is not 1 ( even if the permissions have been given ).From my research, I've found that it returns a number whose lowest 8 bits are 0. So something like the following should work
That's what I'm doing in my fork here
This is working good enough for me. What do you think about this approach? Does it make sense? I'm open to submitting a PR, or if you have a better solution in mind, I'll love to implement it.
The text was updated successfully, but these errors were encountered: