mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 06:08:05 -05:00
Merge pull request #10396 from german77/amiibo_write
input_common: Implement amiibo writing
This commit is contained in:
@ -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];
|
||||
|
||||
return nfc_output_device->WriteNfcData(data) == Common::Input::NfcState::Success;
|
||||
if (nfc_output_device->SupportsNfc() != Common::Input::NfcState::NotSupported) {
|
||||
return nfc_output_device->WriteNfcData(data) == Common::Input::NfcState::Success;
|
||||
}
|
||||
|
||||
return nfc_virtual_output_device->WriteNfcData(data) == Common::Input::NfcState::Success;
|
||||
}
|
||||
|
||||
void EmulatedController::SetLedPattern() {
|
||||
|
@ -426,11 +426,11 @@ Result NfcDevice::Flush() {
|
||||
|
||||
tag_data.write_counter++;
|
||||
|
||||
FlushWithBreak(NFP::BreakType::Normal);
|
||||
const auto result = FlushWithBreak(NFP::BreakType::Normal);
|
||||
|
||||
is_data_moddified = false;
|
||||
|
||||
return ResultSuccess;
|
||||
return result;
|
||||
}
|
||||
|
||||
Result NfcDevice::FlushDebug() {
|
||||
@ -449,11 +449,11 @@ Result NfcDevice::FlushDebug() {
|
||||
|
||||
tag_data.write_counter++;
|
||||
|
||||
FlushWithBreak(NFP::BreakType::Normal);
|
||||
const auto result = FlushWithBreak(NFP::BreakType::Normal);
|
||||
|
||||
is_data_moddified = false;
|
||||
|
||||
return ResultSuccess;
|
||||
return result;
|
||||
}
|
||||
|
||||
Result NfcDevice::FlushWithBreak(NFP::BreakType break_type) {
|
||||
|
Reference in New Issue
Block a user