does it work if I put the check separately then
This commit is contained in:
parent
01935d95ef
commit
ab8696c504
|
@ -26,10 +26,12 @@ using namespace melonDS;
|
||||||
const char* kCamConfigPath[] = {"DSi.Camera0", "DSi.Camera1"};
|
const char* kCamConfigPath[] = {"DSi.Camera0", "DSi.Camera1"};
|
||||||
|
|
||||||
#if QT_VERSION >= 0x060000
|
#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 <QCoreApplication>
|
||||||
#include <QPermission>
|
#include <QPermission>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
CameraFrameDumper::CameraFrameDumper(QObject* parent) : QVideoSink(parent)
|
CameraFrameDumper::CameraFrameDumper(QObject* parent) : QVideoSink(parent)
|
||||||
{
|
{
|
||||||
|
@ -355,7 +357,8 @@ void CameraManager::camStart()
|
||||||
if (camDevice)
|
if (camDevice)
|
||||||
{
|
{
|
||||||
#if QT_VERSION_MAJOR >= 6
|
#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;
|
QCameraPermission cameraPermission;
|
||||||
bool granted = false;
|
bool granted = false;
|
||||||
switch (qApp->checkPermission(cameraPermission)) {
|
switch (qApp->checkPermission(cameraPermission)) {
|
||||||
|
@ -367,6 +370,7 @@ void CameraManager::camStart()
|
||||||
case Qt::PermissionStatus::Granted:
|
case Qt::PermissionStatus::Granted:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
camDumper = new CameraFrameDumper(this);
|
camDumper = new CameraFrameDumper(this);
|
||||||
|
|
Loading…
Reference in New Issue