Skip to content

Commit d7cc20e

Browse files
Use QT_VERSION_CHECK properly
1 parent ab8696c commit d7cc20e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/frontend/qt_sdl/CameraManager.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ using namespace melonDS;
2626
const char* kCamConfigPath[] = {"DSi.Camera0", "DSi.Camera1"};
2727

2828
#if QT_VERSION >= 0x060000
29-
#if QT_VERSION_CHECK(6, 5, 0)
30-
#if QT_CONFIG(permissions)
29+
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && QT_CONFIG(permissions)
3130
#include <QCoreApplication>
3231
#include <QPermission>
3332
#endif
34-
#endif
3533

3634
CameraFrameDumper::CameraFrameDumper(QObject* parent) : QVideoSink(parent)
3735
{
@@ -357,8 +355,7 @@ void CameraManager::camStart()
357355
if (camDevice)
358356
{
359357
#if QT_VERSION_MAJOR >= 6
360-
#if QT_VERSION_CHECK(6, 5, 0)
361-
#if QT_CONFIG(permissions)
358+
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && QT_CONFIG(permissions)
362359
QCameraPermission cameraPermission;
363360
bool granted = false;
364361
switch (qApp->checkPermission(cameraPermission)) {
@@ -370,7 +367,6 @@ void CameraManager::camStart()
370367
case Qt::PermissionStatus::Granted:
371368
break;
372369
}
373-
#endif
374370
#endif
375371

376372
camDumper = new CameraFrameDumper(this);

0 commit comments

Comments
 (0)