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/input_common/drivers/virtual_amiibo.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/input_common/drivers/virtual_amiibo.cpp')
-rw-r--r-- | src/input_common/drivers/virtual_amiibo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/input_common/drivers/virtual_amiibo.cpp b/src/input_common/drivers/virtual_amiibo.cpp index 63ffaca67b..4a0268a4dc 100644 --- a/src/input_common/drivers/virtual_amiibo.cpp +++ b/src/input_common/drivers/virtual_amiibo.cpp @@ -22,22 +22,23 @@ VirtualAmiibo::VirtualAmiibo(std::string input_engine_) : InputEngine(std::move( VirtualAmiibo::~VirtualAmiibo() = default; -Common::Input::PollingError VirtualAmiibo::SetPollingMode( +Common::Input::DriverResult VirtualAmiibo::SetPollingMode( [[maybe_unused]] const PadIdentifier& identifier_, const Common::Input::PollingMode polling_mode_) { polling_mode = polling_mode_; - if (polling_mode == Common::Input::PollingMode::NFC) { + switch (polling_mode) { + case Common::Input::PollingMode::NFC: if (state == State::Initialized) { state = State::WaitingForAmiibo; } - } else { + return Common::Input::DriverResult::Success; + default: if (state == State::AmiiboIsOpen) { CloseAmiibo(); } + return Common::Input::DriverResult::NotSupported; } - - return Common::Input::PollingError::None; } Common::Input::NfcState VirtualAmiibo::SupportsNfc( |