does it work if I put the check separately then

This commit is contained in:
Nadia Holmquist Pedersen 2025-07-24 08:33:20 +02:00
parent 01935d95ef
commit ab8696c504
1 changed files with 6 additions and 2 deletions

View File

@ -26,10 +26,12 @@ using namespace melonDS;
const char* kCamConfigPath[] = {"DSi.Camera0", "DSi.Camera1"};
#if QT_VERSION >= 0x060000
#if QT_VERSION_CHECK(6, 5, 0) && QT_CONFIG(permissions)
#if QT_VERSION_CHECK(6, 5, 0)
#if QT_CONFIG(permissions)
#include <QCoreApplication>
#include <QPermission>
#endif
#endif
CameraFrameDumper::CameraFrameDumper(QObject* parent) : QVideoSink(parent)
{
@ -355,7 +357,8 @@ void CameraManager::camStart()
if (camDevice)
{
#if QT_VERSION_MAJOR >= 6
#if QT_VERSION_CHECK(6, 5, 0) && QT_CONFIG(permissions)
#if QT_VERSION_CHECK(6, 5, 0)
#if QT_CONFIG(permissions)
QCameraPermission cameraPermission;
bool granted = false;
switch (qApp->checkPermission(cameraPermission)) {
@ -367,6 +370,7 @@ void CameraManager::camStart()
case Qt::PermissionStatus::Granted:
break;
}
#endif
#endif
camDumper = new CameraFrameDumper(this);