From a20d6b352e3c0677473213380a0a505f779401fd Mon Sep 17 00:00:00 2001 From: Stevyn Pompelio Date: Mon, 15 Mar 2021 12:15:34 -0400 Subject: [PATCH] apply fix for macOS --- src/QZXingFilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QZXingFilter.cpp b/src/QZXingFilter.cpp index 58bc38b..4959d9c 100644 --- a/src/QZXingFilter.cpp +++ b/src/QZXingFilter.cpp @@ -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;