FireCubeStudios / Protecc

It protecc
https://apps.microsoft.com/store/detail/protecc-2fa-client/9PJX91M06TZS
MIT License
351 stars 42 forks source link

Use proper API for screen capture disablement #37

Closed Fei1Yang closed 1 year ago

Fei1Yang commented 1 year ago

The current implementation for "Blur codes" only blurs them when unfocused, other programs can still take a screenshot and get the code if the program is on foreground.

However Microsoft has provided ApplicationView.IsScreenCaptureEnabled property for screen capture disabling.

Switching to this property would not only disable screen capture even when the app is on foreground, but also simplify the codebase since background detection is no longer required.

Here is the sample code: windows-universal-samples/Samples/DisablingScreenCapture

FireCubeStudios commented 1 year ago

Wow I never knew about this Api thanks for posting it

FireCubeStudios commented 1 year ago

Added in github version. It will come to store in next update