diff options
| author | 2022-07-24 13:31:28 -0400 | |
|---|---|---|
| committer | 2022-07-24 13:31:28 -0400 | |
| commit | 5af06d14337a61d9ed1093079d13f68cbb1f5451 (patch) | |
| tree | 88df3fada076b04c2ab2da8972d1d785f492b520 /src/core/hid/input_converter.cpp | |
| parent | Merge pull request #8545 from Kelebek1/Audio (diff) | |
| parent | yuzu: Add webcam support and rebase to latest master (diff) | |
| download | yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.gz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.xz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.zip | |
Merge pull request #8484 from german77/irs_release
service: irs: Add camera support, split processors and implement ImageTransferProcessor
Diffstat (limited to 'src/core/hid/input_converter.cpp')
| -rw-r--r-- | src/core/hid/input_converter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp index 18d9f042d..68d143a01 100644 --- a/src/core/hid/input_converter.cpp +++ b/src/core/hid/input_converter.cpp | |||
| @@ -270,6 +270,20 @@ Common::Input::AnalogStatus TransformToAnalog(const Common::Input::CallbackStatu | |||
| 270 | return status; | 270 | return status; |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | Common::Input::CameraStatus TransformToCamera(const Common::Input::CallbackStatus& callback) { | ||
| 274 | Common::Input::CameraStatus camera{}; | ||
| 275 | switch (callback.type) { | ||
| 276 | case Common::Input::InputType::IrSensor: | ||
| 277 | camera = callback.camera_status; | ||
| 278 | break; | ||
| 279 | default: | ||
| 280 | LOG_ERROR(Input, "Conversion from type {} to camera not implemented", callback.type); | ||
| 281 | break; | ||
| 282 | } | ||
| 283 | |||
| 284 | return camera; | ||
| 285 | } | ||
| 286 | |||
| 273 | void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) { | 287 | void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) { |
| 274 | const auto& properties = analog.properties; | 288 | const auto& properties = analog.properties; |
| 275 | float& raw_value = analog.raw_value; | 289 | float& raw_value = analog.raw_value; |