summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/virtual_amiibo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/drivers/virtual_amiibo.cpp')
-rw-r--r--src/input_common/drivers/virtual_amiibo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input_common/drivers/virtual_amiibo.cpp b/src/input_common/drivers/virtual_amiibo.cpp
index 29e129d3c..4a0268a4d 100644
--- a/src/input_common/drivers/virtual_amiibo.cpp
+++ b/src/input_common/drivers/virtual_amiibo.cpp
@@ -27,17 +27,18 @@ Common::Input::DriverResult VirtualAmiibo::SetPollingMode(
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::DriverResult::Success;
}
Common::Input::NfcState VirtualAmiibo::SupportsNfc(