diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-05-18 06:17:16 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-05-22 05:09:20 +0200 |
commit | fdb2002f77de6af19cc7f526b2e7540c329161c3 (patch) | |
tree | 6bcb2ca55810c05d15a561e2fa0bc0a6c1a9175a /src/core/hid/emulated_controller.cpp | |
parent | Merge pull request #10344 from german77/pro-amiibo (diff) | |
download | yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.tar yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.tar.gz yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.tar.bz2 yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.tar.lz yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.tar.xz yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.tar.zst yuzu-fdb2002f77de6af19cc7f526b2e7540c329161c3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hid/emulated_controller.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 366880711..bbfea7117 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1283,9 +1283,14 @@ bool EmulatedController::HasNfc() const { } bool EmulatedController::WriteNfc(const std::vector<u8>& data) { - auto& nfc_output_device = output_devices[3]; + auto& nfc_output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)]; + auto& nfc_virtual_output_device = output_devices[3]; + + if (nfc_output_device->SupportsNfc() != Common::Input::NfcState::NotSupported) { + return nfc_output_device->WriteNfcData(data) == Common::Input::NfcState::Success; + } - return nfc_output_device->WriteNfcData(data) == Common::Input::NfcState::Success; + return nfc_virtual_output_device->WriteNfcData(data) == Common::Input::NfcState::Success; } void EmulatedController::SetLedPattern() { |