diff options
author | german77 <juangerman-13@hotmail.com> | 2022-09-25 02:46:49 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2022-10-02 19:32:26 +0200 |
commit | e8d71712e7054748e7e18de9362de1f5a394b46b (patch) | |
tree | 263779f72b874d81513f1292bb413a2cf170f32d /src/input_common/input_engine.h | |
parent | Merge pull request #8934 from german77/palma_release (diff) | |
download | yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.tar yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.tar.gz yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.tar.bz2 yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.tar.lz yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.tar.xz yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.tar.zst yuzu-e8d71712e7054748e7e18de9362de1f5a394b46b.zip |
Diffstat (limited to 'src/input_common/input_engine.h')
-rw-r--r-- | src/input_common/input_engine.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index f6b3c4610..9b8470c6f 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h @@ -42,6 +42,7 @@ enum class EngineInputType { Camera, HatButton, Motion, + Nfc, }; namespace std { @@ -127,6 +128,17 @@ public: return Common::Input::CameraError::NotSupported; } + // Request nfc data from a controller + virtual Common::Input::NfcState SupportsNfc([[maybe_unused]] const PadIdentifier& identifier) { + return Common::Input::NfcState::NotSupported; + } + + // Writes data to an nfc tag + virtual Common::Input::NfcState WriteNfcData([[maybe_unused]] const PadIdentifier& identifier, + [[maybe_unused]] const std::vector<u8>& data) { + return Common::Input::NfcState::NotSupported; + } + // Returns the engine name [[nodiscard]] const std::string& GetEngineName() const; @@ -183,6 +195,7 @@ public: Common::Input::BatteryLevel GetBattery(const PadIdentifier& identifier) const; BasicMotion GetMotion(const PadIdentifier& identifier, int motion) const; Common::Input::CameraStatus GetCamera(const PadIdentifier& identifier) const; + Common::Input::NfcStatus GetNfc(const PadIdentifier& identifier) const; int SetCallback(InputIdentifier input_identifier); void SetMappingCallback(MappingCallback callback); @@ -195,6 +208,7 @@ protected: void SetBattery(const PadIdentifier& identifier, Common::Input::BatteryLevel value); void SetMotion(const PadIdentifier& identifier, int motion, const BasicMotion& value); void SetCamera(const PadIdentifier& identifier, const Common::Input::CameraStatus& value); + void SetNfc(const PadIdentifier& identifier, const Common::Input::NfcStatus& value); virtual std::string GetHatButtonName([[maybe_unused]] u8 direction_value) const { return "Unknown"; @@ -208,6 +222,7 @@ private: std::unordered_map<int, BasicMotion> motions; Common::Input::BatteryLevel battery{}; Common::Input::CameraStatus camera{}; + Common::Input::NfcStatus nfc{}; }; void TriggerOnButtonChange(const PadIdentifier& identifier, int button, bool value); @@ -218,6 +233,7 @@ private: const BasicMotion& value); void TriggerOnCameraChange(const PadIdentifier& identifier, const Common::Input::CameraStatus& value); + void TriggerOnNfcChange(const PadIdentifier& identifier, const Common::Input::NfcStatus& value); bool IsInputIdentifierEqual(const InputIdentifier& input_identifier, const PadIdentifier& identifier, EngineInputType type, |