From fdb2002f77de6af19cc7f526b2e7540c329161c3 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Wed, 17 May 2023 22:17:16 -0600 Subject: input_common: Implement amiibo writting --- src/input_common/drivers/joycon.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/input_common/drivers/joycon.cpp') diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index 653862a72..b2b5677c8 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp @@ -291,9 +291,13 @@ Common::Input::NfcState Joycons::SupportsNfc(const PadIdentifier& identifier_) c return Common::Input::NfcState::Success; }; -Common::Input::NfcState Joycons::WriteNfcData(const PadIdentifier& identifier_, +Common::Input::NfcState Joycons::WriteNfcData(const PadIdentifier& identifier, const std::vector& data) { - return Common::Input::NfcState::NotSupported; + auto handle = GetHandle(identifier); + if (handle->WriteNfcData(data) != Joycon::DriverResult::Success) { + return Common::Input::NfcState::WriteFailed; + } + return Common::Input::NfcState::Success; }; Common::Input::DriverResult Joycons::SetPollingMode(const PadIdentifier& identifier, -- cgit v1.2.3