From 7bf4bec257dffb633d818fb1a7ade6b899ec79a5 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Thu, 15 Dec 2022 22:50:36 -0500 Subject: camera: Use pre-allocated vector for camera data And avoid an unnecessary copy --- src/yuzu/bootmanager.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu/bootmanager.h') diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index f4deae4ee..4dec2da2a 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h @@ -246,6 +246,9 @@ private: #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA std::unique_ptr camera; std::unique_ptr camera_capture; + static constexpr std::size_t CAMERA_WIDTH = 320; + static constexpr std::size_t CAMERA_HEIGHT = 240; + std::vector camera_data; #endif std::unique_ptr camera_timer; -- cgit v1.2.3