summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/irsensor
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-06-19 23:27:48 +0200
committergerman77 <juangerman-13@hotmail.com>2022-07-24 02:40:25 +0200
commit097785e19e3865ac1060b9fae564a3a1e36c695d (patch)
tree2978bfd3fe724934e95fb73ff7dd17bbbe810551 /src/core/hle/service/hid/irsensor
parentservice: irs: Split processors and implement ImageTransferProcessor (diff)
downloadyuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.tar
yuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.tar.gz
yuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.tar.bz2
yuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.tar.lz
yuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.tar.xz
yuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.tar.zst
yuzu-097785e19e3865ac1060b9fae564a3a1e36c695d.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/irsensor/clustering_processor.cpp6
-rw-r--r--src/core/hle/service/hid/irsensor/clustering_processor.h4
-rw-r--r--src/core/hle/service/hid/irsensor/image_transfer_processor.cpp8
-rw-r--r--src/core/hle/service/hid/irsensor/image_transfer_processor.h4
-rw-r--r--src/core/hle/service/hid/irsensor/ir_led_processor.cpp6
-rw-r--r--src/core/hle/service/hid/irsensor/ir_led_processor.h4
-rw-r--r--src/core/hle/service/hid/irsensor/moment_processor.cpp6
-rw-r--r--src/core/hle/service/hid/irsensor/moment_processor.h4
-rw-r--r--src/core/hle/service/hid/irsensor/pointing_processor.cpp6
-rw-r--r--src/core/hle/service/hid/irsensor/pointing_processor.h5
-rw-r--r--src/core/hle/service/hid/irsensor/processor_base.cpp4
-rw-r--r--src/core/hle/service/hid/irsensor/processor_base.h4
-rw-r--r--src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp6
-rw-r--r--src/core/hle/service/hid/irsensor/tera_plugin_processor.h4
14 files changed, 28 insertions, 43 deletions
diff --git a/src/core/hle/service/hid/irsensor/clustering_processor.cpp b/src/core/hle/service/hid/irsensor/clustering_processor.cpp
index aac3e4fec..6479af212 100644
--- a/src/core/hle/service/hid/irsensor/clustering_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/clustering_processor.cpp
@@ -3,14 +3,12 @@
#include "core/hle/service/hid/irsensor/clustering_processor.h"
-namespace Service::HID {
+namespace Service::IRS {
ClusteringProcessor::ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format)
: device(device_format) {
device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor;
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
- device.state.start = 0;
- device.state.count = 0;
}
ClusteringProcessor::~ClusteringProcessor() = default;
@@ -33,4 +31,4 @@ void ClusteringProcessor::SetConfig(Core::IrSensor::PackedClusteringProcessorCon
current_config.object_intensity_min = config.object_intensity_min;
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/clustering_processor.h b/src/core/hle/service/hid/irsensor/clustering_processor.h
index 58b2acf1c..6e2ba8846 100644
--- a/src/core/hle/service/hid/irsensor/clustering_processor.h
+++ b/src/core/hle/service/hid/irsensor/clustering_processor.h
@@ -7,7 +7,7 @@
#include "core/hid/irs_types.h"
#include "core/hle/service/hid/irsensor/processor_base.h"
-namespace Service::HID {
+namespace Service::IRS {
class ClusteringProcessor final : public ProcessorBase {
public:
explicit ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -71,4 +71,4 @@ private:
ClusteringProcessorConfig current_config{};
Core::IrSensor::DeviceFormat& device;
};
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp b/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
index 703e825e6..98f0c579d 100644
--- a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
@@ -5,7 +5,7 @@
#include "core/hid/hid_core.h"
#include "core/hle/service/hid/irsensor/image_transfer_processor.h"
-namespace Service::HID {
+namespace Service::IRS {
ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
Core::IrSensor::DeviceFormat& device_format,
std::size_t npad_index)
@@ -21,8 +21,6 @@ ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
device.mode = Core::IrSensor::IrSensorMode::ImageTransferProcessor;
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
- device.state.start = 0;
- device.state.count = 0;
}
ImageTransferProcessor::~ImageTransferProcessor() {
@@ -33,8 +31,6 @@ void ImageTransferProcessor::StartProcessor() {
is_active = true;
device.camera_status = Core::IrSensor::IrCameraStatus::Available;
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Ready;
- device.state.start = 0;
- device.state.count = 1;
processor_state.sampling_number = 0;
processor_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low;
}
@@ -151,4 +147,4 @@ Core::IrSensor::ImageTransferProcessorState ImageTransferProcessor::GetState(
return processor_state;
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.h b/src/core/hle/service/hid/irsensor/image_transfer_processor.h
index b557eaf20..393df492d 100644
--- a/src/core/hle/service/hid/irsensor/image_transfer_processor.h
+++ b/src/core/hle/service/hid/irsensor/image_transfer_processor.h
@@ -11,7 +11,7 @@ namespace Core::HID {
class EmulatedController;
} // namespace Core::HID
-namespace Service::HID {
+namespace Service::IRS {
class ImageTransferProcessor final : public ProcessorBase {
public:
explicit ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
@@ -70,4 +70,4 @@ private:
u8* transfer_memory = nullptr;
bool is_transfer_memory_set = false;
};
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/ir_led_processor.cpp b/src/core/hle/service/hid/irsensor/ir_led_processor.cpp
index 656e17c95..8e6dd99e4 100644
--- a/src/core/hle/service/hid/irsensor/ir_led_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/ir_led_processor.cpp
@@ -3,14 +3,12 @@
#include "core/hle/service/hid/irsensor/ir_led_processor.h"
-namespace Service::HID {
+namespace Service::IRS {
IrLedProcessor::IrLedProcessor(Core::IrSensor::DeviceFormat& device_format)
: device(device_format) {
device.mode = Core::IrSensor::IrSensorMode::IrLedProcessor;
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
- device.state.start = 0;
- device.state.count = 0;
}
IrLedProcessor::~IrLedProcessor() = default;
@@ -26,4 +24,4 @@ void IrLedProcessor::SetConfig(Core::IrSensor::PackedIrLedProcessorConfig config
static_cast<Core::IrSensor::CameraLightTarget>(config.light_target);
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/ir_led_processor.h b/src/core/hle/service/hid/irsensor/ir_led_processor.h
index cb04d0b94..c3d8693c9 100644
--- a/src/core/hle/service/hid/irsensor/ir_led_processor.h
+++ b/src/core/hle/service/hid/irsensor/ir_led_processor.h
@@ -8,7 +8,7 @@
#include "core/hid/irs_types.h"
#include "core/hle/service/hid/irsensor/processor_base.h"
-namespace Service::HID {
+namespace Service::IRS {
class IrLedProcessor final : public ProcessorBase {
public:
explicit IrLedProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -44,4 +44,4 @@ private:
Core::IrSensor::DeviceFormat& device;
};
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/moment_processor.cpp b/src/core/hle/service/hid/irsensor/moment_processor.cpp
index fb36be577..dbaca420a 100644
--- a/src/core/hle/service/hid/irsensor/moment_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/moment_processor.cpp
@@ -3,14 +3,12 @@
#include "core/hle/service/hid/irsensor/moment_processor.h"
-namespace Service::HID {
+namespace Service::IRS {
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;
@@ -33,4 +31,4 @@ void MomentProcessor::SetConfig(Core::IrSensor::PackedMomentProcessorConfig conf
current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold;
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/moment_processor.h b/src/core/hle/service/hid/irsensor/moment_processor.h
index 63cdadfda..d4bd22e0f 100644
--- a/src/core/hle/service/hid/irsensor/moment_processor.h
+++ b/src/core/hle/service/hid/irsensor/moment_processor.h
@@ -8,7 +8,7 @@
#include "core/hid/irs_types.h"
#include "core/hle/service/hid/irsensor/processor_base.h"
-namespace Service::HID {
+namespace Service::IRS {
class MomentProcessor final : public ProcessorBase {
public:
explicit MomentProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -58,4 +58,4 @@ private:
Core::IrSensor::DeviceFormat& device;
};
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/pointing_processor.cpp b/src/core/hle/service/hid/irsensor/pointing_processor.cpp
index 7eb123636..929f177fc 100644
--- a/src/core/hle/service/hid/irsensor/pointing_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/pointing_processor.cpp
@@ -3,14 +3,12 @@
#include "core/hle/service/hid/irsensor/pointing_processor.h"
-namespace Service::HID {
+namespace Service::IRS {
PointingProcessor::PointingProcessor(Core::IrSensor::DeviceFormat& device_format)
: device(device_format) {
device.mode = Core::IrSensor::IrSensorMode::PointingProcessorMarker;
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
- device.state.start = 0;
- device.state.count = 0;
}
PointingProcessor::~PointingProcessor() = default;
@@ -25,4 +23,4 @@ void PointingProcessor::SetConfig(Core::IrSensor::PackedPointingProcessorConfig
current_config.window_of_interest = config.window_of_interest;
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/pointing_processor.h b/src/core/hle/service/hid/irsensor/pointing_processor.h
index 2f67eff91..cf4930794 100644
--- a/src/core/hle/service/hid/irsensor/pointing_processor.h
+++ b/src/core/hle/service/hid/irsensor/pointing_processor.h
@@ -3,12 +3,11 @@
#pragma once
-#include "common/bit_field.h"
#include "common/common_types.h"
#include "core/hid/irs_types.h"
#include "core/hle/service/hid/irsensor/processor_base.h"
-namespace Service::HID {
+namespace Service::IRS {
class PointingProcessor final : public ProcessorBase {
public:
explicit PointingProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -59,4 +58,4 @@ private:
Core::IrSensor::DeviceFormat& device;
};
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/processor_base.cpp b/src/core/hle/service/hid/irsensor/processor_base.cpp
index bc8025375..4d43ca17a 100644
--- a/src/core/hle/service/hid/irsensor/processor_base.cpp
+++ b/src/core/hle/service/hid/irsensor/processor_base.cpp
@@ -3,7 +3,7 @@
#include "core/hle/service/hid/irsensor/processor_base.h"
-namespace Service::HID {
+namespace Service::IRS {
ProcessorBase::ProcessorBase() {}
ProcessorBase::~ProcessorBase() = default;
@@ -64,4 +64,4 @@ std::size_t ProcessorBase::GetDataHeight(
}
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/processor_base.h b/src/core/hle/service/hid/irsensor/processor_base.h
index 49831aab6..bc0d2977b 100644
--- a/src/core/hle/service/hid/irsensor/processor_base.h
+++ b/src/core/hle/service/hid/irsensor/processor_base.h
@@ -6,7 +6,7 @@
#include "common/common_types.h"
#include "core/hid/irs_types.h"
-namespace Service::HID {
+namespace Service::IRS {
class ProcessorBase {
public:
explicit ProcessorBase();
@@ -30,4 +30,4 @@ protected:
bool is_active{false};
};
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp b/src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp
index deec22072..e691c840a 100644
--- a/src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp
@@ -3,14 +3,12 @@
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
-namespace Service::HID {
+namespace Service::IRS {
TeraPluginProcessor::TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format)
: device(device_format) {
device.mode = Core::IrSensor::IrSensorMode::TeraPluginProcessor;
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
- device.state.start = 0;
- device.state.count = 0;
}
TeraPluginProcessor::~TeraPluginProcessor() = default;
@@ -28,4 +26,4 @@ void TeraPluginProcessor::SetConfig(Core::IrSensor::PackedTeraPluginProcessorCon
current_config.unknown_3 = config.unknown_3;
}
-} // namespace Service::HID
+} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irsensor/tera_plugin_processor.h b/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
index 60f8057a5..bbea7ed0b 100644
--- a/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
+++ b/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
@@ -8,7 +8,7 @@
#include "core/hid/irs_types.h"
#include "core/hle/service/hid/irsensor/processor_base.h"
-namespace Service::HID {
+namespace Service::IRS {
class TeraPluginProcessor final : public ProcessorBase {
public:
explicit TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -50,4 +50,4 @@ private:
Core::IrSensor::DeviceFormat& device;
};
-} // namespace Service::HID
+} // namespace Service::IRS