Fix issues/65

Fix issue 65: scan QR from screen requires independent GPU.
https://github.com/qinyuhang/ShadowsocksX-NG-R/issues/65
This commit is contained in:
秦宇航
2018-02-02 21:35:35 +08:00
parent f38ade4584
commit f38c2b8fd2
+2 -2
View File
@@ -45,7 +45,7 @@ void ScanQRCodeOnScreen() {
NSMutableArray* foundSSUrls = [NSMutableArray array];
CIDetector *detector = [CIDetector detectorOfType:@"CIDetectorTypeQRCode"
context:nil
context:[CIContext contextWithOptions:@{kCIContextUseSoftwareRenderer: @true}]
options:@{ CIDetectorAccuracy:CIDetectorAccuracyHigh }];
for (unsigned int displaysIndex = 0; displaysIndex < dspCount; displaysIndex++)
@@ -66,7 +66,7 @@ void ScanQRCodeOnScreen() {
}
free(displays);
// TODO if not find any urls push a notification tells there is no QR on the screen
[[NSNotificationCenter defaultCenter]
postNotificationName:@"NOTIFY_FOUND_SS_URL"
object:nil