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 | 6c7db928fd7d7bdd4ea4c9930e74087cf3e88fe9 (patch) | |
| tree | 2983c14a7d4bc2797259c7d97462a439bec629f3 /src/core/hid/input_converter.cpp | |
| parent | ef4b11726fb78f4501ac5cddaa3a0c2311c46a37 (diff) | |
| parent | 9f9cf5732b294e87e32f50a3068791dff611fa97 (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; |
