Skip to content

Commit 01935d9

Browse files
Add a version check for the permissions feature check
Checking for an unknown feature causes a division by zero
1 parent 56b52f4 commit 01935d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/frontend/qt_sdl/CameraManager.cpp

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

2828
#if QT_VERSION >= 0x060000
29-
#if QT_CONFIG(permissions)
29+
#if QT_VERSION_CHECK(6, 5, 0) && QT_CONFIG(permissions)
3030
#include <QCoreApplication>
3131
#include <QPermission>
3232
#endif
@@ -355,7 +355,7 @@ void CameraManager::camStart()
355355
if (camDevice)
356356
{
357357
#if QT_VERSION_MAJOR >= 6
358-
#if QT_CONFIG(permissions)
358+
#if QT_VERSION_CHECK(6, 5, 0) && QT_CONFIG(permissions)
359359
QCameraPermission cameraPermission;
360360
bool granted = false;
361361
switch (qApp->checkPermission(cameraPermission)) {

0 commit comments

Comments
 (0)