mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 15:19:53 -06:00
er, better this way
This commit is contained in:
@ -165,12 +165,10 @@ void CameraManager::init()
|
|||||||
|
|
||||||
#if QT_VERSION >= 0x060000
|
#if QT_VERSION >= 0x060000
|
||||||
const QList<QCameraDevice> cameras = QMediaDevices::videoInputs();
|
const QList<QCameraDevice> cameras = QMediaDevices::videoInputs();
|
||||||
const QCameraDevice& dev;
|
|
||||||
for (const QCameraDevice& cam : cameras)
|
for (const QCameraDevice& cam : cameras)
|
||||||
{
|
{
|
||||||
if (QString(cam.id()) == camDeviceName)
|
if (QString(cam.id()) == camDeviceName)
|
||||||
{
|
{
|
||||||
dev = cam;
|
|
||||||
camDevice = new QCamera(cam);
|
camDevice = new QCamera(cam);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -178,7 +176,7 @@ void CameraManager::init()
|
|||||||
|
|
||||||
if (camDevice)
|
if (camDevice)
|
||||||
{
|
{
|
||||||
const QList<QCameraFormat> supported = dev.videoFormats();
|
const QList<QCameraFormat> supported = camDevice.cameraDevice().videoFormats();
|
||||||
bool good = false;
|
bool good = false;
|
||||||
for (const QCameraFormat& item : supported)
|
for (const QCameraFormat& item : supported)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user