mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-12-27 08:44:17 +01:00
service: irs: Move to IRS namespace and minor fixes
This commit is contained in:
parent
4539700595
commit
097785e19e
@ -25,6 +25,7 @@ function(copy_yuzu_Qt5_deps target_dir)
|
|||||||
Qt5Gui$<$<CONFIG:Debug>:d>.*
|
Qt5Gui$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Widgets$<$<CONFIG:Debug>:d>.*
|
Qt5Widgets$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Multimedia$<$<CONFIG:Debug>:d>.*
|
Qt5Multimedia$<$<CONFIG:Debug>:d>.*
|
||||||
|
Qt5Network$<$<CONFIG:Debug>:d>.*
|
||||||
)
|
)
|
||||||
|
|
||||||
if (YUZU_USE_QT_WEB_ENGINE)
|
if (YUZU_USE_QT_WEB_ENGINE)
|
||||||
|
@ -201,11 +201,11 @@ struct PackedClusteringProcessorConfig {
|
|||||||
PackedMcuVersion required_mcu_version;
|
PackedMcuVersion required_mcu_version;
|
||||||
u32 pixel_count_min;
|
u32 pixel_count_min;
|
||||||
u32 pixel_count_max;
|
u32 pixel_count_max;
|
||||||
u32 object_intensity_min;
|
u8 object_intensity_min;
|
||||||
bool is_external_light_filter_enabled;
|
bool is_external_light_filter_enabled;
|
||||||
INSERT_PADDING_BYTES(2);
|
INSERT_PADDING_BYTES(2);
|
||||||
};
|
};
|
||||||
static_assert(sizeof(PackedClusteringProcessorConfig) == 0x30,
|
static_assert(sizeof(PackedClusteringProcessorConfig) == 0x28,
|
||||||
"PackedClusteringProcessorConfig is an invalid size");
|
"PackedClusteringProcessorConfig is an invalid size");
|
||||||
|
|
||||||
// This is nn::irsensor::PackedImageTransferProcessorConfig
|
// This is nn::irsensor::PackedImageTransferProcessorConfig
|
||||||
@ -273,12 +273,9 @@ struct HandAnalysisConfig {
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(HandAnalysisConfig) == 0x4, "HandAnalysisConfig is an invalid size");
|
static_assert(sizeof(HandAnalysisConfig) == 0x4, "HandAnalysisConfig is an invalid size");
|
||||||
|
|
||||||
// This is nn::irsensor::detail::ProcessorState
|
// This is nn::irsensor::detail::ProcessorState contents are different for each processor
|
||||||
struct ProcessorState {
|
struct ProcessorState {
|
||||||
u64 start{};
|
std::array<u8, 0xE20> processor_raw_data{};
|
||||||
u32 count{};
|
|
||||||
INSERT_PADDING_BYTES(4);
|
|
||||||
std::array<u8, 0xE10> processor_raw_data{};
|
|
||||||
};
|
};
|
||||||
static_assert(sizeof(ProcessorState) == 0xE20, "ProcessorState is an invalid size");
|
static_assert(sizeof(ProcessorState) == 0xE20, "ProcessorState is an invalid size");
|
||||||
|
|
||||||
|
@ -18,7 +18,11 @@ constexpr Result NpadIsSameType{ErrorModule::HID, 602};
|
|||||||
constexpr Result InvalidNpadId{ErrorModule::HID, 709};
|
constexpr Result InvalidNpadId{ErrorModule::HID, 709};
|
||||||
constexpr Result NpadNotConnected{ErrorModule::HID, 710};
|
constexpr Result NpadNotConnected{ErrorModule::HID, 710};
|
||||||
|
|
||||||
|
} // namespace Service::HID
|
||||||
|
|
||||||
|
namespace Service::IRS {
|
||||||
|
|
||||||
constexpr ResultCode InvalidProcessorState{ErrorModule::Irsensor, 78};
|
constexpr ResultCode InvalidProcessorState{ErrorModule::Irsensor, 78};
|
||||||
constexpr ResultCode InvalidIrCameraHandle{ErrorModule::Irsensor, 204};
|
constexpr ResultCode InvalidIrCameraHandle{ErrorModule::Irsensor, 204};
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -2345,8 +2345,8 @@ void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system
|
|||||||
std::make_shared<HidSys>(system)->InstallAsService(service_manager);
|
std::make_shared<HidSys>(system)->InstallAsService(service_manager);
|
||||||
std::make_shared<HidTmp>(system)->InstallAsService(service_manager);
|
std::make_shared<HidTmp>(system)->InstallAsService(service_manager);
|
||||||
|
|
||||||
std::make_shared<IRS>(system)->InstallAsService(service_manager);
|
std::make_shared<Service::IRS::IRS>(system)->InstallAsService(service_manager);
|
||||||
std::make_shared<IRS_SYS>(system)->InstallAsService(service_manager);
|
std::make_shared<Service::IRS::IRS_SYS>(system)->InstallAsService(service_manager);
|
||||||
|
|
||||||
std::make_shared<XCD_SYS>(system)->InstallAsService(service_manager);
|
std::make_shared<XCD_SYS>(system)->InstallAsService(service_manager);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
|
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
|
|
||||||
IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} {
|
IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
@ -60,7 +60,7 @@ void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
LOG_WARNING(Service_IRS, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
@ -71,7 +71,7 @@ void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
LOG_WARNING(Service_IRS, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
@ -153,7 +153,7 @@ void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
|
|||||||
u64 applet_resource_user_id;
|
u64 applet_resource_user_id;
|
||||||
Core::IrSensor::PackedClusteringProcessorConfig processor_config;
|
Core::IrSensor::PackedClusteringProcessorConfig processor_config;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(Parameters) == 0x40, "Parameters has incorrect size.");
|
static_assert(sizeof(Parameters) == 0x38, "Parameters has incorrect size.");
|
||||||
|
|
||||||
const auto parameters{rp.PopRaw<Parameters>()};
|
const auto parameters{rp.PopRaw<Parameters>()};
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
|
|||||||
system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle);
|
system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle);
|
||||||
|
|
||||||
if (t_mem.IsNull()) {
|
if (t_mem.IsNull()) {
|
||||||
LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle);
|
LOG_ERROR(Service_IRS, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultUnknown);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
@ -268,24 +268,32 @@ void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) {
|
|||||||
|
|
||||||
void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
struct Parameters {
|
||||||
const auto processor_config{rp.PopRaw<Core::IrSensor::PackedTeraPluginProcessorConfig>()};
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
Core::IrSensor::PackedTeraPluginProcessorConfig processor_config;
|
||||||
|
INSERT_PADDING_WORDS_NOINIT(1);
|
||||||
|
u64 applet_resource_user_id;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(Parameters) == 0x18, "Parameters has incorrect size.");
|
||||||
|
|
||||||
LOG_WARNING(Service_IRS,
|
const auto parameters{rp.PopRaw<Parameters>()};
|
||||||
"(STUBBED) called, npad_type={}, npad_id={}, mode={}, mcu_version={}.{}, "
|
|
||||||
"applet_resource_user_id={}",
|
|
||||||
camera_handle.npad_type, camera_handle.npad_id, processor_config.mode,
|
|
||||||
processor_config.required_mcu_version.major,
|
|
||||||
processor_config.required_mcu_version.minor, applet_resource_user_id);
|
|
||||||
|
|
||||||
const auto result = IsIrCameraHandleValid(camera_handle);
|
LOG_WARNING(
|
||||||
|
Service_IRS,
|
||||||
|
"(STUBBED) called, npad_type={}, npad_id={}, mode={}, mcu_version={}.{}, "
|
||||||
|
"applet_resource_user_id={}",
|
||||||
|
parameters.camera_handle.npad_type, parameters.camera_handle.npad_id,
|
||||||
|
parameters.processor_config.mode, parameters.processor_config.required_mcu_version.major,
|
||||||
|
parameters.processor_config.required_mcu_version.minor, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
|
const auto result = IsIrCameraHandleValid(parameters.camera_handle);
|
||||||
|
|
||||||
if (result.IsSuccess()) {
|
if (result.IsSuccess()) {
|
||||||
auto& device = GetIrCameraSharedMemoryDeviceEntry(camera_handle);
|
auto& device = GetIrCameraSharedMemoryDeviceEntry(parameters.camera_handle);
|
||||||
MakeProcessor<TeraPluginProcessor>(camera_handle, device);
|
MakeProcessor<TeraPluginProcessor>(parameters.camera_handle, device);
|
||||||
auto& image_transfer_processor = GetProcessor<TeraPluginProcessor>(camera_handle);
|
auto& image_transfer_processor =
|
||||||
image_transfer_processor.SetConfig(processor_config);
|
GetProcessor<TeraPluginProcessor>(parameters.camera_handle);
|
||||||
|
image_transfer_processor.SetConfig(parameters.processor_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
@ -299,7 +307,7 @@ void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) {
|
|||||||
if (npad_id > Core::HID::NpadIdType::Player8 && npad_id != Core::HID::NpadIdType::Invalid &&
|
if (npad_id > Core::HID::NpadIdType::Player8 && npad_id != Core::HID::NpadIdType::Invalid &&
|
||||||
npad_id != Core::HID::NpadIdType::Handheld) {
|
npad_id != Core::HID::NpadIdType::Handheld) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(InvalidNpadId);
|
rb.Push(Service::HID::InvalidNpadId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,4 +561,4 @@ IRS_SYS::IRS_SYS(Core::System& system_) : ServiceFramework{system_, "irs:sys"} {
|
|||||||
|
|
||||||
IRS_SYS::~IRS_SYS() = default;
|
IRS_SYS::~IRS_SYS() = default;
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -16,7 +16,7 @@ namespace Core::HID {
|
|||||||
class EmulatedController;
|
class EmulatedController;
|
||||||
} // namespace Core::HID
|
} // namespace Core::HID
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
|
|
||||||
class IRS final : public ServiceFramework<IRS> {
|
class IRS final : public ServiceFramework<IRS> {
|
||||||
public:
|
public:
|
||||||
@ -114,4 +114,4 @@ public:
|
|||||||
~IRS_SYS() override;
|
~IRS_SYS() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
#include "core/hle/service/hid/irsensor/clustering_processor.h"
|
#include "core/hle/service/hid/irsensor/clustering_processor.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
ClusteringProcessor::ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format)
|
ClusteringProcessor::ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format)
|
||||||
: device(device_format) {
|
: device(device_format) {
|
||||||
device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor;
|
device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClusteringProcessor::~ClusteringProcessor() = default;
|
ClusteringProcessor::~ClusteringProcessor() = default;
|
||||||
@ -33,4 +31,4 @@ void ClusteringProcessor::SetConfig(Core::IrSensor::PackedClusteringProcessorCon
|
|||||||
current_config.object_intensity_min = config.object_intensity_min;
|
current_config.object_intensity_min = config.object_intensity_min;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "core/hid/irs_types.h"
|
#include "core/hid/irs_types.h"
|
||||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class ClusteringProcessor final : public ProcessorBase {
|
class ClusteringProcessor final : public ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format);
|
explicit ClusteringProcessor(Core::IrSensor::DeviceFormat& device_format);
|
||||||
@ -71,4 +71,4 @@ private:
|
|||||||
ClusteringProcessorConfig current_config{};
|
ClusteringProcessorConfig current_config{};
|
||||||
Core::IrSensor::DeviceFormat& device;
|
Core::IrSensor::DeviceFormat& device;
|
||||||
};
|
};
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "core/hid/hid_core.h"
|
#include "core/hid/hid_core.h"
|
||||||
#include "core/hle/service/hid/irsensor/image_transfer_processor.h"
|
#include "core/hle/service/hid/irsensor/image_transfer_processor.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
|
ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
|
||||||
Core::IrSensor::DeviceFormat& device_format,
|
Core::IrSensor::DeviceFormat& device_format,
|
||||||
std::size_t npad_index)
|
std::size_t npad_index)
|
||||||
@ -21,8 +21,6 @@ ImageTransferProcessor::ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
|
|||||||
device.mode = Core::IrSensor::IrSensorMode::ImageTransferProcessor;
|
device.mode = Core::IrSensor::IrSensorMode::ImageTransferProcessor;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageTransferProcessor::~ImageTransferProcessor() {
|
ImageTransferProcessor::~ImageTransferProcessor() {
|
||||||
@ -33,8 +31,6 @@ void ImageTransferProcessor::StartProcessor() {
|
|||||||
is_active = true;
|
is_active = true;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Available;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Available;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Ready;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Ready;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 1;
|
|
||||||
processor_state.sampling_number = 0;
|
processor_state.sampling_number = 0;
|
||||||
processor_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low;
|
processor_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low;
|
||||||
}
|
}
|
||||||
@ -151,4 +147,4 @@ Core::IrSensor::ImageTransferProcessorState ImageTransferProcessor::GetState(
|
|||||||
return processor_state;
|
return processor_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -11,7 +11,7 @@ namespace Core::HID {
|
|||||||
class EmulatedController;
|
class EmulatedController;
|
||||||
} // namespace Core::HID
|
} // namespace Core::HID
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class ImageTransferProcessor final : public ProcessorBase {
|
class ImageTransferProcessor final : public ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
|
explicit ImageTransferProcessor(Core::HID::HIDCore& hid_core_,
|
||||||
@ -70,4 +70,4 @@ private:
|
|||||||
u8* transfer_memory = nullptr;
|
u8* transfer_memory = nullptr;
|
||||||
bool is_transfer_memory_set = false;
|
bool is_transfer_memory_set = false;
|
||||||
};
|
};
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
#include "core/hle/service/hid/irsensor/ir_led_processor.h"
|
#include "core/hle/service/hid/irsensor/ir_led_processor.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
IrLedProcessor::IrLedProcessor(Core::IrSensor::DeviceFormat& device_format)
|
IrLedProcessor::IrLedProcessor(Core::IrSensor::DeviceFormat& device_format)
|
||||||
: device(device_format) {
|
: device(device_format) {
|
||||||
device.mode = Core::IrSensor::IrSensorMode::IrLedProcessor;
|
device.mode = Core::IrSensor::IrSensorMode::IrLedProcessor;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IrLedProcessor::~IrLedProcessor() = default;
|
IrLedProcessor::~IrLedProcessor() = default;
|
||||||
@ -26,4 +24,4 @@ void IrLedProcessor::SetConfig(Core::IrSensor::PackedIrLedProcessorConfig config
|
|||||||
static_cast<Core::IrSensor::CameraLightTarget>(config.light_target);
|
static_cast<Core::IrSensor::CameraLightTarget>(config.light_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "core/hid/irs_types.h"
|
#include "core/hid/irs_types.h"
|
||||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class IrLedProcessor final : public ProcessorBase {
|
class IrLedProcessor final : public ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit IrLedProcessor(Core::IrSensor::DeviceFormat& device_format);
|
explicit IrLedProcessor(Core::IrSensor::DeviceFormat& device_format);
|
||||||
@ -44,4 +44,4 @@ private:
|
|||||||
Core::IrSensor::DeviceFormat& device;
|
Core::IrSensor::DeviceFormat& device;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
#include "core/hle/service/hid/irsensor/moment_processor.h"
|
#include "core/hle/service/hid/irsensor/moment_processor.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
MomentProcessor::MomentProcessor(Core::IrSensor::DeviceFormat& device_format)
|
MomentProcessor::MomentProcessor(Core::IrSensor::DeviceFormat& device_format)
|
||||||
: device(device_format) {
|
: device(device_format) {
|
||||||
device.mode = Core::IrSensor::IrSensorMode::MomentProcessor;
|
device.mode = Core::IrSensor::IrSensorMode::MomentProcessor;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MomentProcessor::~MomentProcessor() = default;
|
MomentProcessor::~MomentProcessor() = default;
|
||||||
@ -33,4 +31,4 @@ void MomentProcessor::SetConfig(Core::IrSensor::PackedMomentProcessorConfig conf
|
|||||||
current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold;
|
current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "core/hid/irs_types.h"
|
#include "core/hid/irs_types.h"
|
||||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class MomentProcessor final : public ProcessorBase {
|
class MomentProcessor final : public ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit MomentProcessor(Core::IrSensor::DeviceFormat& device_format);
|
explicit MomentProcessor(Core::IrSensor::DeviceFormat& device_format);
|
||||||
@ -58,4 +58,4 @@ private:
|
|||||||
Core::IrSensor::DeviceFormat& device;
|
Core::IrSensor::DeviceFormat& device;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
#include "core/hle/service/hid/irsensor/pointing_processor.h"
|
#include "core/hle/service/hid/irsensor/pointing_processor.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
PointingProcessor::PointingProcessor(Core::IrSensor::DeviceFormat& device_format)
|
PointingProcessor::PointingProcessor(Core::IrSensor::DeviceFormat& device_format)
|
||||||
: device(device_format) {
|
: device(device_format) {
|
||||||
device.mode = Core::IrSensor::IrSensorMode::PointingProcessorMarker;
|
device.mode = Core::IrSensor::IrSensorMode::PointingProcessorMarker;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PointingProcessor::~PointingProcessor() = default;
|
PointingProcessor::~PointingProcessor() = default;
|
||||||
@ -25,4 +23,4 @@ void PointingProcessor::SetConfig(Core::IrSensor::PackedPointingProcessorConfig
|
|||||||
current_config.window_of_interest = config.window_of_interest;
|
current_config.window_of_interest = config.window_of_interest;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,12 +3,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/bit_field.h"
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/hid/irs_types.h"
|
#include "core/hid/irs_types.h"
|
||||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class PointingProcessor final : public ProcessorBase {
|
class PointingProcessor final : public ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit PointingProcessor(Core::IrSensor::DeviceFormat& device_format);
|
explicit PointingProcessor(Core::IrSensor::DeviceFormat& device_format);
|
||||||
@ -59,4 +58,4 @@ private:
|
|||||||
Core::IrSensor::DeviceFormat& device;
|
Core::IrSensor::DeviceFormat& device;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
|
|
||||||
ProcessorBase::ProcessorBase() {}
|
ProcessorBase::ProcessorBase() {}
|
||||||
ProcessorBase::~ProcessorBase() = default;
|
ProcessorBase::~ProcessorBase() = default;
|
||||||
@ -64,4 +64,4 @@ std::size_t ProcessorBase::GetDataHeight(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/hid/irs_types.h"
|
#include "core/hid/irs_types.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class ProcessorBase {
|
class ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit ProcessorBase();
|
explicit ProcessorBase();
|
||||||
@ -30,4 +30,4 @@ protected:
|
|||||||
|
|
||||||
bool is_active{false};
|
bool is_active{false};
|
||||||
};
|
};
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
|
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
TeraPluginProcessor::TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format)
|
TeraPluginProcessor::TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format)
|
||||||
: device(device_format) {
|
: device(device_format) {
|
||||||
device.mode = Core::IrSensor::IrSensorMode::TeraPluginProcessor;
|
device.mode = Core::IrSensor::IrSensorMode::TeraPluginProcessor;
|
||||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||||
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped;
|
||||||
device.state.start = 0;
|
|
||||||
device.state.count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TeraPluginProcessor::~TeraPluginProcessor() = default;
|
TeraPluginProcessor::~TeraPluginProcessor() = default;
|
||||||
@ -28,4 +26,4 @@ void TeraPluginProcessor::SetConfig(Core::IrSensor::PackedTeraPluginProcessorCon
|
|||||||
current_config.unknown_3 = config.unknown_3;
|
current_config.unknown_3 = config.unknown_3;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "core/hid/irs_types.h"
|
#include "core/hid/irs_types.h"
|
||||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::IRS {
|
||||||
class TeraPluginProcessor final : public ProcessorBase {
|
class TeraPluginProcessor final : public ProcessorBase {
|
||||||
public:
|
public:
|
||||||
explicit TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format);
|
explicit TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format);
|
||||||
@ -50,4 +50,4 @@ private:
|
|||||||
Core::IrSensor::DeviceFormat& device;
|
Core::IrSensor::DeviceFormat& device;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::HID
|
} // namespace Service::IRS
|
||||||
|
Loading…
Reference in New Issue
Block a user