summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-12-22 08:07:46 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2023-01-20 01:05:21 +0100
commit6d6b7bdbc327528d155f0422ef096846559844c0 (patch)
tree6954aaa23abe6d725f8452afb1fd19a59e962800 /src/input_common/drivers
parentinput_common: Add dual joycon support (diff)
downloadyuzu-6d6b7bdbc327528d155f0422ef096846559844c0.tar
yuzu-6d6b7bdbc327528d155f0422ef096846559844c0.tar.gz
yuzu-6d6b7bdbc327528d155f0422ef096846559844c0.tar.bz2
yuzu-6d6b7bdbc327528d155f0422ef096846559844c0.tar.lz
yuzu-6d6b7bdbc327528d155f0422ef096846559844c0.tar.xz
yuzu-6d6b7bdbc327528d155f0422ef096846559844c0.tar.zst
yuzu-6d6b7bdbc327528d155f0422ef096846559844c0.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/drivers/joycon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp
index 049ecc4f2..29f0dc0c8 100644
--- a/src/input_common/drivers/joycon.cpp
+++ b/src/input_common/drivers/joycon.cpp
@@ -388,7 +388,9 @@ void Joycons::OnRingConUpdate(f32 ring_data) {
void Joycons::OnAmiiboUpdate(std::size_t port, const std::vector<u8>& amiibo_data) {
const auto identifier = GetIdentifier(port, Joycon::ControllerType::Right);
- SetNfc(identifier, {Common::Input::NfcState::NewAmiibo, amiibo_data});
+ const auto nfc_state = amiibo_data.empty() ? Common::Input::NfcState::AmiiboRemoved
+ : Common::Input::NfcState::NewAmiibo;
+ SetNfc(identifier, {nfc_state, amiibo_data});
}
std::shared_ptr<Joycon::JoyconDriver> Joycons::GetHandle(PadIdentifier identifier) const {