diff options
author | german77 <juangerman-13@hotmail.com> | 2022-06-19 06:45:06 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2022-07-24 02:40:25 +0200 |
commit | 453970059528d564d9ef88f7f9096c05946fbefe (patch) | |
tree | 3b1a43e8dd51e5c03204108ac72c4cd33d5361c0 /src/core/hle/service/hid/irsensor/moment_processor.cpp | |
parent | core: hid: Add cammera support (diff) | |
download | yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.gz yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.bz2 yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.lz yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.xz yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.zst yuzu-453970059528d564d9ef88f7f9096c05946fbefe.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/irsensor/moment_processor.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/irsensor/moment_processor.cpp b/src/core/hle/service/hid/irsensor/moment_processor.cpp new file mode 100644 index 000000000..fb36be577 --- /dev/null +++ b/src/core/hle/service/hid/irsensor/moment_processor.cpp @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "core/hle/service/hid/irsensor/moment_processor.h" + +namespace Service::HID { +MomentProcessor::MomentProcessor(Core::IrSensor::DeviceFormat& device_format) + : device(device_format) { + device.mode = Core::IrSensor::IrSensorMode::MomentProcessor; + device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; + device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; + device.state.start = 0; + device.state.count = 0; +} + +MomentProcessor::~MomentProcessor() = default; + +void MomentProcessor::StartProcessor() {} + +void MomentProcessor::SuspendProcessor() {} + +void MomentProcessor::StopProcessor() {} + +void MomentProcessor::SetConfig(Core::IrSensor::PackedMomentProcessorConfig config) { + current_config.camera_config.exposure_time = config.camera_config.exposure_time; + current_config.camera_config.gain = config.camera_config.gain; + current_config.camera_config.is_negative_used = config.camera_config.is_negative_used; + current_config.camera_config.light_target = + static_cast<Core::IrSensor::CameraLightTarget>(config.camera_config.light_target); + current_config.window_of_interest = config.window_of_interest; + current_config.preprocess = + static_cast<Core::IrSensor::MomentProcessorPreprocess>(config.preprocess); + current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold; +} + +} // namespace Service::HID |