|
|
|
@ -108,7 +108,8 @@ void IRS::StopImageProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
auto result = IsIrCameraHandleValid(parameters.camera_handle);
|
|
|
|
|
if (result.IsSuccess()) {
|
|
|
|
|
// TODO: Stop Image processor
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::Active);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::Active);
|
|
|
|
|
result = ResultSuccess;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -140,7 +141,8 @@ void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
MakeProcessor<MomentProcessor>(parameters.camera_handle, device);
|
|
|
|
|
auto& image_transfer_processor = GetProcessor<MomentProcessor>(parameters.camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(parameters.processor_config);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -172,7 +174,8 @@ void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
auto& image_transfer_processor =
|
|
|
|
|
GetProcessor<ClusteringProcessor>(parameters.camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(parameters.processor_config);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -222,7 +225,8 @@ void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
GetProcessor<ImageTransferProcessor>(parameters.camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(parameters.processor_config);
|
|
|
|
|
image_transfer_processor.SetTransferMemoryPointer(transfer_memory);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -298,7 +302,8 @@ void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
auto& image_transfer_processor =
|
|
|
|
|
GetProcessor<TeraPluginProcessor>(parameters.camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(parameters.processor_config);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -348,7 +353,8 @@ void IRS::RunPointingProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
MakeProcessor<PointingProcessor>(camera_handle, device);
|
|
|
|
|
auto& image_transfer_processor = GetProcessor<PointingProcessor>(camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(processor_config);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -459,7 +465,8 @@ void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
GetProcessor<ImageTransferProcessor>(parameters.camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(parameters.processor_config);
|
|
|
|
|
image_transfer_processor.SetTransferMemoryPointer(transfer_memory);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -486,7 +493,8 @@ void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
MakeProcessor<IrLedProcessor>(camera_handle, device);
|
|
|
|
|
auto& image_transfer_processor = GetProcessor<IrLedProcessor>(camera_handle);
|
|
|
|
|
image_transfer_processor.SetConfig(processor_config);
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::IR);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::IR);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
@ -512,7 +520,8 @@ void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) {
|
|
|
|
|
auto result = IsIrCameraHandleValid(parameters.camera_handle);
|
|
|
|
|
if (result.IsSuccess()) {
|
|
|
|
|
// TODO: Stop image processor async
|
|
|
|
|
npad_device->SetPollingMode(Common::Input::PollingMode::Active);
|
|
|
|
|
npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
|
|
|
|
Common::Input::PollingMode::Active);
|
|
|
|
|
result = ResultSuccess;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|