diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-01-24 09:29:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-24 09:29:37 -0500 |
commit | a68af583ea378b48e2ed5a19f519a815ba89e40f (patch) | |
tree | 2983c14a7d4bc2797259c7d97462a439bec629f3 /src/core/hid/input_converter.cpp | |
parent | f99f618d45ad862c4bc23fc28c91d1c48218a3cb (diff) | |
parent | d9ee7c32975bb8d840cf93a086d6b4be39d7bfd2 (diff) |
Merge pull request #9492 from german77/joycon_release
Input_common: Implement custom joycon driver v2
Diffstat (limited to 'src/core/hid/input_converter.cpp')
-rw-r--r-- | src/core/hid/input_converter.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp index 5026928753..3f7b8c0904 100644 --- a/src/core/hid/input_converter.cpp +++ b/src/core/hid/input_converter.cpp @@ -304,6 +304,18 @@ Common::Input::NfcStatus TransformToNfc(const Common::Input::CallbackStatus& cal return nfc; } +Common::Input::BodyColorStatus TransformToColor(const Common::Input::CallbackStatus& callback) { + switch (callback.type) { + case Common::Input::InputType::Color: + return callback.color_status; + break; + default: + LOG_ERROR(Input, "Conversion from type {} to color not implemented", callback.type); + return {}; + break; + } +} + void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) { const auto& properties = analog.properties; float& raw_value = analog.raw_value; |