diff options
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; |