diff options
author | german77 <juangerman-13@hotmail.com> | 2022-06-19 06:36:29 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2022-07-24 02:40:25 +0200 |
commit | 57311b2c8b1b9ee1d2c5775866e9591605815246 (patch) | |
tree | 52280f5afc5443a3fddb337cbca71e6e0d4707ab /src/core/hid/input_converter.cpp | |
parent | yuzu: Hook qt camera to camera driver (diff) | |
download | yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.tar yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.tar.gz yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.tar.bz2 yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.tar.lz yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.tar.xz yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.tar.zst yuzu-57311b2c8b1b9ee1d2c5775866e9591605815246.zip |
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 return status; } +Common::Input::CameraStatus TransformToCamera(const Common::Input::CallbackStatus& callback) { + Common::Input::CameraStatus camera{}; + switch (callback.type) { + case Common::Input::InputType::IrSensor: + camera = callback.camera_status; + break; + default: + LOG_ERROR(Input, "Conversion from type {} to camera not implemented", callback.type); + break; + } + + return camera; +} + void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) { const auto& properties = analog.properties; float& raw_value = analog.raw_value; |