summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/bootmanager.cpp2
-rw-r--r--src/yuzu/bootmanager.h10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 682b37f47..ffd3f0028 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -820,6 +820,7 @@ void GRenderWindow::RequestCameraCapture() {
820} 820}
821 821
822void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { 822void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) {
823#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA
823 // TODO: Capture directly in the format and resolution needed 824 // TODO: Capture directly in the format and resolution needed
824 const auto converted = 825 const auto converted =
825 img.scaled(CAMERA_WIDTH, CAMERA_HEIGHT, Qt::AspectRatioMode::IgnoreAspectRatio, 826 img.scaled(CAMERA_WIDTH, CAMERA_HEIGHT, Qt::AspectRatioMode::IgnoreAspectRatio,
@@ -828,6 +829,7 @@ void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) {
828 std::memcpy(camera_data.data(), converted.bits(), CAMERA_WIDTH * CAMERA_HEIGHT * sizeof(u32)); 829 std::memcpy(camera_data.data(), converted.bits(), CAMERA_WIDTH * CAMERA_HEIGHT * sizeof(u32));
829 input_subsystem->GetCamera()->SetCameraData(CAMERA_WIDTH, CAMERA_HEIGHT, camera_data); 830 input_subsystem->GetCamera()->SetCameraData(CAMERA_WIDTH, CAMERA_HEIGHT, camera_data);
830 pending_camera_snapshots = 0; 831 pending_camera_snapshots = 0;
832#endif
831} 833}
832 834
833bool GRenderWindow::event(QEvent* event) { 835bool GRenderWindow::event(QEvent* event) {
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 5bbcf61f7..514437359 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -242,16 +242,16 @@ private:
242 bool first_frame = false; 242 bool first_frame = false;
243 InputCommon::TasInput::TasState last_tas_state; 243 InputCommon::TasInput::TasState last_tas_state;
244 244
245 bool is_virtual_camera;
246 int pending_camera_snapshots;
247#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA 245#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA
248 std::unique_ptr<QCamera> camera;
249 std::unique_ptr<QCameraImageCapture> camera_capture;
250 static constexpr std::size_t CAMERA_WIDTH = 320; 246 static constexpr std::size_t CAMERA_WIDTH = 320;
251 static constexpr std::size_t CAMERA_HEIGHT = 240; 247 static constexpr std::size_t CAMERA_HEIGHT = 240;
248 bool is_virtual_camera;
249 int pending_camera_snapshots;
252 std::vector<u32> camera_data; 250 std::vector<u32> camera_data;
253#endif 251 std::unique_ptr<QCamera> camera;
252 std::unique_ptr<QCameraImageCapture> camera_capture;
254 std::unique_ptr<QTimer> camera_timer; 253 std::unique_ptr<QTimer> camera_timer;
254#endif
255 255
256 Core::System& system; 256 Core::System& system;
257 257