diff options
| author | bunnei <bunneidev@gmail.com> | 2022-10-02 14:28:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-02 14:28:43 -0700 |
| commit | e23adcd481b16303fee09774e6c62f798ddd15ef (patch) | |
| tree | 72313f1b749d0771e38dbfcf539121a02d4b9ae0 /src/core/hid/input_converter.cpp | |
| parent | ed0b7e16667dc9fceaf0dfb6d96e49add04ae8a8 (diff) | |
| parent | d19a30670f816d7d03fd68d163c9d0f55bb1edd0 (diff) | |
Merge pull request #8955 from german77/amiibo-rewrite
core: nfp: Rewrite implementation to remove direct access from the frontend
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 52fb69e9c8..fe9915abe6 100644 --- a/src/core/hid/input_converter.cpp +++ b/src/core/hid/input_converter.cpp @@ -287,6 +287,20 @@ Common::Input::CameraStatus TransformToCamera(const Common::Input::CallbackStatu return camera; } +Common::Input::NfcStatus TransformToNfc(const Common::Input::CallbackStatus& callback) { + Common::Input::NfcStatus nfc{}; + switch (callback.type) { + case Common::Input::InputType::Nfc: + return callback.nfc_status; + break; + default: + LOG_ERROR(Input, "Conversion from type {} to NFC not implemented", callback.type); + break; + } + + return nfc; +} + void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) { const auto& properties = analog.properties; float& raw_value = analog.raw_value; |
