diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-27 17:56:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 17:56:22 -0500 |
commit | 6b64557ad62141d1ac5d42e88ba7a3ed0cc9884d (patch) | |
tree | 614d45e1b6bdeffc988163fbe727c6a524c200c0 /src/yuzu/bootmanager.cpp | |
parent | a2fde04da9630a5bf4948a0d2798d969956eb389 (diff) | |
parent | a75542ad2dd028f9aa3adfb00e92817ada12ccd8 (diff) |
Merge pull request #8829 from Docteh/qt6_0002
CMake: rework for Qt6 support
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index d88efacd7..c934069dd 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -4,8 +4,10 @@ #include <glad/glad.h> #include <QApplication> +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA #include <QCameraImageCapture> #include <QCameraInfo> +#endif #include <QHBoxLayout> #include <QMessageBox> #include <QPainter> @@ -707,6 +709,7 @@ void GRenderWindow::TouchEndEvent() { } void GRenderWindow::InitializeCamera() { +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA constexpr auto camera_update_ms = std::chrono::milliseconds{50}; // (50ms, 20Hz) if (!Settings::values.enable_ir_sensor) { return; @@ -760,18 +763,22 @@ void GRenderWindow::InitializeCamera() { connect(camera_timer.get(), &QTimer::timeout, [this] { RequestCameraCapture(); }); // This timer should be dependent of camera resolution 5ms for every 100 pixels camera_timer->start(camera_update_ms); +#endif } void GRenderWindow::FinalizeCamera() { +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA if (camera_timer) { camera_timer->stop(); } if (camera) { camera->unload(); } +#endif } void GRenderWindow::RequestCameraCapture() { +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA if (!Settings::values.enable_ir_sensor) { return; } @@ -788,6 +795,7 @@ void GRenderWindow::RequestCameraCapture() { pending_camera_snapshots++; camera_capture->capture(); +#endif } void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { |