camera: fix resolution selection code (could accidentally select a resolution like 640x360)

This commit is contained in:
Arisotura
2025-06-26 23:04:14 +02:00
parent 7b562f71b3
commit 005ef9c9fc

View File

@ -232,7 +232,7 @@ void CameraManager::init()
item.pixelFormat() != QVideoFrameFormat::Format_XRGB8888)
continue;
if (item.resolution().width() != 640 && item.resolution().height() != 480)
if (item.resolution().width() != 640 || item.resolution().height() != 480)
continue;
camDevice->setCameraFormat(item);
@ -282,7 +282,7 @@ void CameraManager::init()
item.pixelFormat() != QVideoFrame::Format_RGB32)
continue;
if (item.resolution().width() != 640 && item.resolution().height() != 480)
if (item.resolution().width() != 640 || item.resolution().height() != 480)
continue;
camDevice->setViewfinderSettings(item);