aboutsummaryrefslogtreecommitdiff
path: root/src/core/frontend/camera/blank_camera.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-29 22:16:39 -0800
committerGitHub <noreply@github.com>2017-01-29 22:16:39 -0800
commit1410aa182435fcca3756bbb58af90a479e9f248d (patch)
tree53685c7e5422428869ef45d4f8de0a350dcfdd7f /src/core/frontend/camera/blank_camera.cpp
parenta925473995af1832f6773faef9ca07a7957692a1 (diff)
parentcf3a272332b03640730d1434e9802e166ca931da (diff)
Merge pull request #2368 from wwylele/camera-2
CAM: build the service framework with a dummy implementation
Diffstat (limited to 'src/core/frontend/camera/blank_camera.cpp')
-rw-r--r--src/core/frontend/camera/blank_camera.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/frontend/camera/blank_camera.cpp b/src/core/frontend/camera/blank_camera.cpp
new file mode 100644
index 000000000..7995abcbd
--- /dev/null
+++ b/src/core/frontend/camera/blank_camera.cpp
@@ -0,0 +1,31 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/frontend/camera/blank_camera.h"
+
+namespace Camera {
+
+void BlankCamera::StartCapture() {}
+
+void BlankCamera::StopCapture() {}
+
+void BlankCamera::SetFormat(Service::CAM::OutputFormat output_format) {
+ output_rgb = output_format == Service::CAM::OutputFormat::RGB565;
+}
+
+void BlankCamera::SetResolution(const Service::CAM::Resolution& resolution) {
+ width = resolution.width;
+ height = resolution.height;
+};
+
+void BlankCamera::SetFlip(Service::CAM::Flip) {}
+
+void BlankCamera::SetEffect(Service::CAM::Effect) {}
+
+std::vector<u16> BlankCamera::ReceiveFrame() const {
+ // Note: 0x80008000 stands for two black pixels in YUV422
+ return std::vector<u16>(width * height, output_rgb ? 0 : 0x8000);
+}
+
+} // namespace Camera