summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeModules/CopyYuzuQt5Deps.cmake1
-rw-r--r--src/core/hid/irs_types.h11
-rw-r--r--src/core/hle/service/hid/errors.h6
-rw-r--r--src/core/hle/service/hid/hid.cpp4
-rw-r--r--src/core/hle/service/hid/irs.cpp50
-rw-r--r--src/core/hle/service/hid/irs.h4
-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
20 files changed, 71 insertions, 76 deletions
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake
index 4702a504c..6c5044caa 100644
--- a/CMakeModules/CopyYuzuQt5Deps.cmake
+++ b/CMakeModules/CopyYuzuQt5Deps.cmake
@@ -25,6 +25,7 @@ function(copy_yuzu_Qt5_deps target_dir)
25 Qt5Gui$<$<CONFIG:Debug>:d>.* 25 Qt5Gui$<$<CONFIG:Debug>:d>.*
26 Qt5Widgets$<$<CONFIG:Debug>:d>.* 26 Qt5Widgets$<$<CONFIG:Debug>:d>.*
27 Qt5Multimedia$<$<CONFIG:Debug>:d>.* 27 Qt5Multimedia$<$<CONFIG:Debug>:d>.*
28 Qt5Network$<$<CONFIG:Debug>:d>.*
28 ) 29 )
29 30
30 if (YUZU_USE_QT_WEB_ENGINE) 31 if (YUZU_USE_QT_WEB_ENGINE)
diff --git a/src/core/hid/irs_types.h b/src/core/hid/irs_types.h
index c73d008a0..88c5b016d 100644
--- a/src/core/hid/irs_types.h
+++ b/src/core/hid/irs_types.h
@@ -201,11 +201,11 @@ struct PackedClusteringProcessorConfig {
201 PackedMcuVersion required_mcu_version; 201 PackedMcuVersion required_mcu_version;
202 u32 pixel_count_min; 202 u32 pixel_count_min;
203 u32 pixel_count_max; 203 u32 pixel_count_max;
204 u32 object_intensity_min; 204 u8 object_intensity_min;
205 bool is_external_light_filter_enabled; 205 bool is_external_light_filter_enabled;
206 INSERT_PADDING_BYTES(2); 206 INSERT_PADDING_BYTES(2);
207}; 207};
208static_assert(sizeof(PackedClusteringProcessorConfig) == 0x30, 208static_assert(sizeof(PackedClusteringProcessorConfig) == 0x28,
209 "PackedClusteringProcessorConfig is an invalid size"); 209 "PackedClusteringProcessorConfig is an invalid size");
210 210
211// This is nn::irsensor::PackedImageTransferProcessorConfig 211// This is nn::irsensor::PackedImageTransferProcessorConfig
@@ -273,12 +273,9 @@ struct HandAnalysisConfig {
273}; 273};
274static_assert(sizeof(HandAnalysisConfig) == 0x4, "HandAnalysisConfig is an invalid size"); 274static_assert(sizeof(HandAnalysisConfig) == 0x4, "HandAnalysisConfig is an invalid size");
275 275
276// This is nn::irsensor::detail::ProcessorState 276// This is nn::irsensor::detail::ProcessorState contents are different for each processor
277struct ProcessorState { 277struct ProcessorState {
278 u64 start{}; 278 std::array<u8, 0xE20> processor_raw_data{};
279 u32 count{};
280 INSERT_PADDING_BYTES(4);
281 std::array<u8, 0xE10> processor_raw_data{};
282}; 279};
283static_assert(sizeof(ProcessorState) == 0xE20, "ProcessorState is an invalid size"); 280static_assert(sizeof(ProcessorState) == 0xE20, "ProcessorState is an invalid size");
284 281
diff --git a/src/core/hle/service/hid/errors.h b/src/core/hle/service/hid/errors.h
index 1bd62461c..accc2b646 100644
--- a/src/core/hle/service/hid/errors.h
+++ b/src/core/hle/service/hid/errors.h
@@ -18,7 +18,11 @@ constexpr Result NpadIsSameType{ErrorModule::HID, 602};
18constexpr Result InvalidNpadId{ErrorModule::HID, 709}; 18constexpr Result InvalidNpadId{ErrorModule::HID, 709};
19constexpr Result NpadNotConnected{ErrorModule::HID, 710}; 19constexpr Result NpadNotConnected{ErrorModule::HID, 710};
20 20
21} // namespace Service::HID
22
23namespace Service::IRS {
24
21constexpr ResultCode InvalidProcessorState{ErrorModule::Irsensor, 78}; 25constexpr ResultCode InvalidProcessorState{ErrorModule::Irsensor, 78};
22constexpr ResultCode InvalidIrCameraHandle{ErrorModule::Irsensor, 204}; 26constexpr ResultCode InvalidIrCameraHandle{ErrorModule::Irsensor, 204};
23 27
24} // namespace Service::HID 28} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 89bb12442..5ecbddf94 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -2345,8 +2345,8 @@ void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system
2345 std::make_shared<HidSys>(system)->InstallAsService(service_manager); 2345 std::make_shared<HidSys>(system)->InstallAsService(service_manager);
2346 std::make_shared<HidTmp>(system)->InstallAsService(service_manager); 2346 std::make_shared<HidTmp>(system)->InstallAsService(service_manager);
2347 2347
2348 std::make_shared<IRS>(system)->InstallAsService(service_manager); 2348 std::make_shared<Service::IRS::IRS>(system)->InstallAsService(service_manager);
2349 std::make_shared<IRS_SYS>(system)->InstallAsService(service_manager); 2349 std::make_shared<Service::IRS::IRS_SYS>(system)->InstallAsService(service_manager);
2350 2350
2351 std::make_shared<XCD_SYS>(system)->InstallAsService(service_manager); 2351 std::make_shared<XCD_SYS>(system)->InstallAsService(service_manager);
2352} 2352}
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp
index 53a31df79..b6e7c0792 100644
--- a/src/core/hle/service/hid/irs.cpp
+++ b/src/core/hle/service/hid/irs.cpp
@@ -22,7 +22,7 @@
22#include "core/hle/service/hid/irsensor/tera_plugin_processor.h" 22#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
23#include "core/memory.h" 23#include "core/memory.h"
24 24
25namespace Service::HID { 25namespace Service::IRS {
26 26
27IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} { 27IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} {
28 // clang-format off 28 // clang-format off
@@ -60,7 +60,7 @@ void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) {
60 IPC::RequestParser rp{ctx}; 60 IPC::RequestParser rp{ctx};
61 const auto applet_resource_user_id{rp.Pop<u64>()}; 61 const auto applet_resource_user_id{rp.Pop<u64>()};
62 62
63 LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}", 63 LOG_WARNING(Service_IRS, "(STUBBED) called, applet_resource_user_id={}",
64 applet_resource_user_id); 64 applet_resource_user_id);
65 65
66 IPC::ResponseBuilder rb{ctx, 2}; 66 IPC::ResponseBuilder rb{ctx, 2};
@@ -71,7 +71,7 @@ void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) {
71 IPC::RequestParser rp{ctx}; 71 IPC::RequestParser rp{ctx};
72 const auto applet_resource_user_id{rp.Pop<u64>()}; 72 const auto applet_resource_user_id{rp.Pop<u64>()};
73 73
74 LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}", 74 LOG_WARNING(Service_IRS, "(STUBBED) called, applet_resource_user_id={}",
75 applet_resource_user_id); 75 applet_resource_user_id);
76 76
77 IPC::ResponseBuilder rb{ctx, 2}; 77 IPC::ResponseBuilder rb{ctx, 2};
@@ -153,7 +153,7 @@ void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
153 u64 applet_resource_user_id; 153 u64 applet_resource_user_id;
154 Core::IrSensor::PackedClusteringProcessorConfig processor_config; 154 Core::IrSensor::PackedClusteringProcessorConfig processor_config;
155 }; 155 };
156 static_assert(sizeof(Parameters) == 0x40, "Parameters has incorrect size."); 156 static_assert(sizeof(Parameters) == 0x38, "Parameters has incorrect size.");
157 157
158 const auto parameters{rp.PopRaw<Parameters>()}; 158 const auto parameters{rp.PopRaw<Parameters>()};
159 159
@@ -194,7 +194,7 @@ void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
194 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle); 194 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle);
195 195
196 if (t_mem.IsNull()) { 196 if (t_mem.IsNull()) {
197 LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle); 197 LOG_ERROR(Service_IRS, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle);
198 IPC::ResponseBuilder rb{ctx, 2}; 198 IPC::ResponseBuilder rb{ctx, 2};
199 rb.Push(ResultUnknown); 199 rb.Push(ResultUnknown);
200 return; 200 return;
@@ -268,24 +268,32 @@ void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) {
268 268
269void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) { 269void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
270 IPC::RequestParser rp{ctx}; 270 IPC::RequestParser rp{ctx};
271 const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; 271 struct Parameters {
272 const auto processor_config{rp.PopRaw<Core::IrSensor::PackedTeraPluginProcessorConfig>()}; 272 Core::IrSensor::IrCameraHandle camera_handle;
273 const auto applet_resource_user_id{rp.Pop<u64>()}; 273 Core::IrSensor::PackedTeraPluginProcessorConfig processor_config;
274 INSERT_PADDING_WORDS_NOINIT(1);
275 u64 applet_resource_user_id;
276 };
277 static_assert(sizeof(Parameters) == 0x18, "Parameters has incorrect size.");
274 278
275 LOG_WARNING(Service_IRS, 279 const auto parameters{rp.PopRaw<Parameters>()};
276 "(STUBBED) called, npad_type={}, npad_id={}, mode={}, mcu_version={}.{}, " 280
277 "applet_resource_user_id={}", 281 LOG_WARNING(
278 camera_handle.npad_type, camera_handle.npad_id, processor_config.mode, 282 Service_IRS,
279 processor_config.required_mcu_version.major, 283 "(STUBBED) called, npad_type={}, npad_id={}, mode={}, mcu_version={}.{}, "
280 processor_config.required_mcu_version.minor, applet_resource_user_id); 284 "applet_resource_user_id={}",
285 parameters.camera_handle.npad_type, parameters.camera_handle.npad_id,
286 parameters.processor_config.mode, parameters.processor_config.required_mcu_version.major,
287 parameters.processor_config.required_mcu_version.minor, parameters.applet_resource_user_id);
281 288
282 const auto result = IsIrCameraHandleValid(camera_handle); 289 const auto result = IsIrCameraHandleValid(parameters.camera_handle);
283 290
284 if (result.IsSuccess()) { 291 if (result.IsSuccess()) {
285 auto& device = GetIrCameraSharedMemoryDeviceEntry(camera_handle); 292 auto& device = GetIrCameraSharedMemoryDeviceEntry(parameters.camera_handle);
286 MakeProcessor<TeraPluginProcessor>(camera_handle, device); 293 MakeProcessor<TeraPluginProcessor>(parameters.camera_handle, device);
287 auto& image_transfer_processor = GetProcessor<TeraPluginProcessor>(camera_handle); 294 auto& image_transfer_processor =
288 image_transfer_processor.SetConfig(processor_config); 295 GetProcessor<TeraPluginProcessor>(parameters.camera_handle);
296 image_transfer_processor.SetConfig(parameters.processor_config);
289 } 297 }
290 298
291 IPC::ResponseBuilder rb{ctx, 2}; 299 IPC::ResponseBuilder rb{ctx, 2};
@@ -299,7 +307,7 @@ void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) {
299 if (npad_id > Core::HID::NpadIdType::Player8 && npad_id != Core::HID::NpadIdType::Invalid && 307 if (npad_id > Core::HID::NpadIdType::Player8 && npad_id != Core::HID::NpadIdType::Invalid &&
300 npad_id != Core::HID::NpadIdType::Handheld) { 308 npad_id != Core::HID::NpadIdType::Handheld) {
301 IPC::ResponseBuilder rb{ctx, 2}; 309 IPC::ResponseBuilder rb{ctx, 2};
302 rb.Push(InvalidNpadId); 310 rb.Push(Service::HID::InvalidNpadId);
303 return; 311 return;
304 } 312 }
305 313
@@ -553,4 +561,4 @@ IRS_SYS::IRS_SYS(Core::System& system_) : ServiceFramework{system_, "irs:sys"} {
553 561
554IRS_SYS::~IRS_SYS() = default; 562IRS_SYS::~IRS_SYS() = default;
555 563
556} // namespace Service::HID 564} // namespace Service::IRS
diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h
index ae7f7719b..516620b4d 100644
--- a/src/core/hle/service/hid/irs.h
+++ b/src/core/hle/service/hid/irs.h
@@ -16,7 +16,7 @@ namespace Core::HID {
16class EmulatedController; 16class EmulatedController;
17} // namespace Core::HID 17} // namespace Core::HID
18 18
19namespace Service::HID { 19namespace Service::IRS {
20 20
21class IRS final : public ServiceFramework<IRS> { 21class IRS final : public ServiceFramework<IRS> {
22public: 22public:
@@ -114,4 +114,4 @@ public:
114 ~IRS_SYS() override; 114 ~IRS_SYS() override;
115}; 115};
116 116
117} // namespace Service::HID 117} // namespace Service::IRS
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 @@
3 3
4#include "core/hle/service/hid/irsensor/clustering_processor.h" 4#include "core/hle/service/hid/irsensor/clustering_processor.h"
5 5
6namespace Service::HID { 6namespace Service::IRS {
7ClusteringProcessor::ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format) 7ClusteringProcessor::ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format)
8 : device(device_format) { 8 : device(device_format) {
9 device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor; 9 device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor;
10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; 10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; 11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
12 device.state.start = 0;
13 device.state.count = 0;
14} 12}
15 13
16ClusteringProcessor::~ClusteringProcessor() = default; 14ClusteringProcessor::~ClusteringProcessor() = default;
@@ -33,4 +31,4 @@ void ClusteringProcessor::SetConfig(Core::IrSensor::PackedClusteringProcessorCon
33 current_config.object_intensity_min = config.object_intensity_min; 31 current_config.object_intensity_min = config.object_intensity_min;
34} 32}
35 33
36} // namespace Service::HID 34} // 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 @@
7#include "core/hid/irs_types.h" 7#include "core/hid/irs_types.h"
8#include "core/hle/service/hid/irsensor/processor_base.h" 8#include "core/hle/service/hid/irsensor/processor_base.h"
9 9
10namespace Service::HID { 10namespace Service::IRS {
11class ClusteringProcessor final : public ProcessorBase { 11class ClusteringProcessor final : public ProcessorBase {
12public: 12public:
13 explicit ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format); 13 explicit ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -71,4 +71,4 @@ private:
71 ClusteringProcessorConfig current_config{}; 71 ClusteringProcessorConfig current_config{};
72 Core::IrSensor::DeviceFormat& device; 72 Core::IrSensor::DeviceFormat& device;
73}; 73};
74} // namespace Service::HID 74} // 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 @@
5#include "core/hid/hid_core.h" 5#include "core/hid/hid_core.h"
6#include "core/hle/service/hid/irsensor/image_transfer_processor.h" 6#include "core/hle/service/hid/irsensor/image_transfer_processor.h"
7 7
8namespace Service::HID { 8namespace Service::IRS {
9ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_, 9ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
10 Core::IrSensor::DeviceFormat& device_format, 10 Core::IrSensor::DeviceFormat& device_format,
11 std::size_t npad_index) 11 std::size_t npad_index)
@@ -21,8 +21,6 @@ ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
21 device.mode = Core::IrSensor::IrSensorMode::ImageTransferProcessor; 21 device.mode = Core::IrSensor::IrSensorMode::ImageTransferProcessor;
22 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; 22 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
23 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; 23 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
24 device.state.start = 0;
25 device.state.count = 0;
26} 24}
27 25
28ImageTransferProcessor::~ImageTransferProcessor() { 26ImageTransferProcessor::~ImageTransferProcessor() {
@@ -33,8 +31,6 @@ void ImageTransferProcessor::StartProcessor() {
33 is_active = true; 31 is_active = true;
34 device.camera_status = Core::IrSensor::IrCameraStatus::Available; 32 device.camera_status = Core::IrSensor::IrCameraStatus::Available;
35 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Ready; 33 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Ready;
36 device.state.start = 0;
37 device.state.count = 1;
38 processor_state.sampling_number = 0; 34 processor_state.sampling_number = 0;
39 processor_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low; 35 processor_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low;
40} 36}
@@ -151,4 +147,4 @@ Core::IrSensor::ImageTransferProcessorState ImageTransferProcessor::GetState(
151 return processor_state; 147 return processor_state;
152} 148}
153 149
154} // namespace Service::HID 150} // 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 {
11class EmulatedController; 11class EmulatedController;
12} // namespace Core::HID 12} // namespace Core::HID
13 13
14namespace Service::HID { 14namespace Service::IRS {
15class ImageTransferProcessor final : public ProcessorBase { 15class ImageTransferProcessor final : public ProcessorBase {
16public: 16public:
17 explicit ImageTransferProcessor(Core::HID::HIDCore& hid_core_, 17 explicit ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
@@ -70,4 +70,4 @@ private:
70 u8* transfer_memory = nullptr; 70 u8* transfer_memory = nullptr;
71 bool is_transfer_memory_set = false; 71 bool is_transfer_memory_set = false;
72}; 72};
73} // namespace Service::HID 73} // 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 @@
3 3
4#include "core/hle/service/hid/irsensor/ir_led_processor.h" 4#include "core/hle/service/hid/irsensor/ir_led_processor.h"
5 5
6namespace Service::HID { 6namespace Service::IRS {
7IrLedProcessor::IrLedProcessor(Core::IrSensor::DeviceFormat& device_format) 7IrLedProcessor::IrLedProcessor(Core::IrSensor::DeviceFormat& device_format)
8 : device(device_format) { 8 : device(device_format) {
9 device.mode = Core::IrSensor::IrSensorMode::IrLedProcessor; 9 device.mode = Core::IrSensor::IrSensorMode::IrLedProcessor;
10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; 10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; 11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
12 device.state.start = 0;
13 device.state.count = 0;
14} 12}
15 13
16IrLedProcessor::~IrLedProcessor() = default; 14IrLedProcessor::~IrLedProcessor() = default;
@@ -26,4 +24,4 @@ void IrLedProcessor::SetConfig(Core::IrSensor::PackedIrLedProcessorConfig config
26 static_cast<Core::IrSensor::CameraLightTarget>(config.light_target); 24 static_cast<Core::IrSensor::CameraLightTarget>(config.light_target);
27} 25}
28 26
29} // namespace Service::HID 27} // 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 @@
8#include "core/hid/irs_types.h" 8#include "core/hid/irs_types.h"
9#include "core/hle/service/hid/irsensor/processor_base.h" 9#include "core/hle/service/hid/irsensor/processor_base.h"
10 10
11namespace Service::HID { 11namespace Service::IRS {
12class IrLedProcessor final : public ProcessorBase { 12class IrLedProcessor final : public ProcessorBase {
13public: 13public:
14 explicit IrLedProcessor(Core::IrSensor::DeviceFormat& device_format); 14 explicit IrLedProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -44,4 +44,4 @@ private:
44 Core::IrSensor::DeviceFormat& device; 44 Core::IrSensor::DeviceFormat& device;
45}; 45};
46 46
47} // namespace Service::HID 47} // 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 @@
3 3
4#include "core/hle/service/hid/irsensor/moment_processor.h" 4#include "core/hle/service/hid/irsensor/moment_processor.h"
5 5
6namespace Service::HID { 6namespace Service::IRS {
7MomentProcessor::MomentProcessor(Core::IrSensor::DeviceFormat& device_format) 7MomentProcessor::MomentProcessor(Core::IrSensor::DeviceFormat& device_format)
8 : device(device_format) { 8 : device(device_format) {
9 device.mode = Core::IrSensor::IrSensorMode::MomentProcessor; 9 device.mode = Core::IrSensor::IrSensorMode::MomentProcessor;
10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; 10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; 11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
12 device.state.start = 0;
13 device.state.count = 0;
14} 12}
15 13
16MomentProcessor::~MomentProcessor() = default; 14MomentProcessor::~MomentProcessor() = default;
@@ -33,4 +31,4 @@ void MomentProcessor::SetConfig(Core::IrSensor::PackedMomentProcessorConfig conf
33 current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold; 31 current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold;
34} 32}
35 33
36} // namespace Service::HID 34} // 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 @@
8#include "core/hid/irs_types.h" 8#include "core/hid/irs_types.h"
9#include "core/hle/service/hid/irsensor/processor_base.h" 9#include "core/hle/service/hid/irsensor/processor_base.h"
10 10
11namespace Service::HID { 11namespace Service::IRS {
12class MomentProcessor final : public ProcessorBase { 12class MomentProcessor final : public ProcessorBase {
13public: 13public:
14 explicit MomentProcessor(Core::IrSensor::DeviceFormat& device_format); 14 explicit MomentProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -58,4 +58,4 @@ private:
58 Core::IrSensor::DeviceFormat& device; 58 Core::IrSensor::DeviceFormat& device;
59}; 59};
60 60
61} // namespace Service::HID 61} // 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 @@
3 3
4#include "core/hle/service/hid/irsensor/pointing_processor.h" 4#include "core/hle/service/hid/irsensor/pointing_processor.h"
5 5
6namespace Service::HID { 6namespace Service::IRS {
7PointingProcessor::PointingProcessor(Core::IrSensor::DeviceFormat& device_format) 7PointingProcessor::PointingProcessor(Core::IrSensor::DeviceFormat& device_format)
8 : device(device_format) { 8 : device(device_format) {
9 device.mode = Core::IrSensor::IrSensorMode::PointingProcessorMarker; 9 device.mode = Core::IrSensor::IrSensorMode::PointingProcessorMarker;
10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; 10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; 11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
12 device.state.start = 0;
13 device.state.count = 0;
14} 12}
15 13
16PointingProcessor::~PointingProcessor() = default; 14PointingProcessor::~PointingProcessor() = default;
@@ -25,4 +23,4 @@ void PointingProcessor::SetConfig(Core::IrSensor::PackedPointingProcessorConfig
25 current_config.window_of_interest = config.window_of_interest; 23 current_config.window_of_interest = config.window_of_interest;
26} 24}
27 25
28} // namespace Service::HID 26} // 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 @@
3 3
4#pragma once 4#pragma once
5 5
6#include "common/bit_field.h"
7#include "common/common_types.h" 6#include "common/common_types.h"
8#include "core/hid/irs_types.h" 7#include "core/hid/irs_types.h"
9#include "core/hle/service/hid/irsensor/processor_base.h" 8#include "core/hle/service/hid/irsensor/processor_base.h"
10 9
11namespace Service::HID { 10namespace Service::IRS {
12class PointingProcessor final : public ProcessorBase { 11class PointingProcessor final : public ProcessorBase {
13public: 12public:
14 explicit PointingProcessor(Core::IrSensor::DeviceFormat& device_format); 13 explicit PointingProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -59,4 +58,4 @@ private:
59 Core::IrSensor::DeviceFormat& device; 58 Core::IrSensor::DeviceFormat& device;
60}; 59};
61 60
62} // namespace Service::HID 61} // 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 @@
3 3
4#include "core/hle/service/hid/irsensor/processor_base.h" 4#include "core/hle/service/hid/irsensor/processor_base.h"
5 5
6namespace Service::HID { 6namespace Service::IRS {
7 7
8ProcessorBase::ProcessorBase() {} 8ProcessorBase::ProcessorBase() {}
9ProcessorBase::~ProcessorBase() = default; 9ProcessorBase::~ProcessorBase() = default;
@@ -64,4 +64,4 @@ std::size_t ProcessorBase::GetDataHeight(
64 } 64 }
65} 65}
66 66
67} // namespace Service::HID 67} // 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 @@
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "core/hid/irs_types.h" 7#include "core/hid/irs_types.h"
8 8
9namespace Service::HID { 9namespace Service::IRS {
10class ProcessorBase { 10class ProcessorBase {
11public: 11public:
12 explicit ProcessorBase(); 12 explicit ProcessorBase();
@@ -30,4 +30,4 @@ protected:
30 30
31 bool is_active{false}; 31 bool is_active{false};
32}; 32};
33} // namespace Service::HID 33} // 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 @@
3 3
4#include "core/hle/service/hid/irsensor/tera_plugin_processor.h" 4#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
5 5
6namespace Service::HID { 6namespace Service::IRS {
7TeraPluginProcessor::TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format) 7TeraPluginProcessor::TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format)
8 : device(device_format) { 8 : device(device_format) {
9 device.mode = Core::IrSensor::IrSensorMode::TeraPluginProcessor; 9 device.mode = Core::IrSensor::IrSensorMode::TeraPluginProcessor;
10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; 10 device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; 11 device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
12 device.state.start = 0;
13 device.state.count = 0;
14} 12}
15 13
16TeraPluginProcessor::~TeraPluginProcessor() = default; 14TeraPluginProcessor::~TeraPluginProcessor() = default;
@@ -28,4 +26,4 @@ void TeraPluginProcessor::SetConfig(Core::IrSensor::PackedTeraPluginProcessorCon
28 current_config.unknown_3 = config.unknown_3; 26 current_config.unknown_3 = config.unknown_3;
29} 27}
30 28
31} // namespace Service::HID 29} // 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 @@
8#include "core/hid/irs_types.h" 8#include "core/hid/irs_types.h"
9#include "core/hle/service/hid/irsensor/processor_base.h" 9#include "core/hle/service/hid/irsensor/processor_base.h"
10 10
11namespace Service::HID { 11namespace Service::IRS {
12class TeraPluginProcessor final : public ProcessorBase { 12class TeraPluginProcessor final : public ProcessorBase {
13public: 13public:
14 explicit TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format); 14 explicit TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format);
@@ -50,4 +50,4 @@ private:
50 Core::IrSensor::DeviceFormat& device; 50 Core::IrSensor::DeviceFormat& device;
51}; 51};
52 52
53} // namespace Service::HID 53} // namespace Service::IRS