diff options
-rw-r--r-- | src/frontend/qt_sdl/CameraManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/CameraManager.cpp b/src/frontend/qt_sdl/CameraManager.cpp index c158f5a..7f4db5d 100644 --- a/src/frontend/qt_sdl/CameraManager.cpp +++ b/src/frontend/qt_sdl/CameraManager.cpp @@ -16,6 +16,8 @@ with melonDS. If not, see http://www.gnu.org/licenses/. */ +#include <QEventLoop> + #include "CameraManager.h" #include "Config.h" @@ -256,6 +258,12 @@ void CameraManager::init() if (camDevice) { camDevice->load(); + if (camDevice->status() == QCamera::LoadingStatus) + { + QEventLoop loop; + connect(camDevice, &QCamera::statusChanged, &loop, &QEventLoop::quit); + loop.exec(); + } const QList<QCameraViewfinderSettings> supported = camDevice->supportedViewfinderSettings(); bool good = false; |