Merge pull request #193 from spompelio/mac_scan_fix

apply fix for macOS
This commit is contained in:
Nikos Ftylitakis 2021-03-16 11:01:26 +02:00 committed by GitHub
commit ed51996739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -179,8 +179,8 @@ static QImage* rgbDataToGrayscale(const uchar* data, const CaptureRect& captureR
data += (captureRect.startY * captureRect.sourceWidth + captureRect.startX) * stride;
for (int y = 1; y <= captureRect.targetHeight; ++y) {
//Quick fix for iOS devices. Will be handled better in the future
#ifdef Q_OS_IOS
//Quick fix for iOS & macOS devices. Will be handled better in the future
#if defined(Q_OS_IOS) || defined (Q_OS_MAC)
uchar* pixel = pixelInit + (y - 1) * captureRect.targetWidth;
#else
uchar* pixel = pixelInit + (captureRect.targetHeight - y) * captureRect.targetWidth;