diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-06-16 06:08:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 06:08:30 +0200 |
commit | 41295ff8fec8f4f0fd563fb4087b84598c17af01 (patch) | |
tree | e187980b301da17d4d9bd3c4454af7ebf1b85709 /src | |
parent | Merge pull request #10767 from t895/lint (diff) | |
parent | input_common: Add amiibo with originality signature support (diff) | |
download | yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.tar yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.tar.gz yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.tar.bz2 yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.tar.lz yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.tar.xz yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.tar.zst yuzu-41295ff8fec8f4f0fd563fb4087b84598c17af01.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/drivers/virtual_amiibo.cpp | 2 | ||||
-rw-r--r-- | src/input_common/drivers/virtual_amiibo.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/input_common/drivers/virtual_amiibo.cpp b/src/input_common/drivers/virtual_amiibo.cpp index f8bafe553..6435b8af8 100644 --- a/src/input_common/drivers/virtual_amiibo.cpp +++ b/src/input_common/drivers/virtual_amiibo.cpp @@ -82,6 +82,7 @@ VirtualAmiibo::Info VirtualAmiibo::LoadAmiibo(const std::string& filename) { switch (nfc_file.GetSize()) { case AmiiboSize: case AmiiboSizeWithoutPassword: + case AmiiboSizeWithSignature: data.resize(AmiiboSize); if (nfc_file.Read(data) < AmiiboSizeWithoutPassword) { return Info::NotAnAmiibo; @@ -109,6 +110,7 @@ VirtualAmiibo::Info VirtualAmiibo::LoadAmiibo(std::span<u8> data) { switch (data.size_bytes()) { case AmiiboSize: case AmiiboSizeWithoutPassword: + case AmiiboSizeWithSignature: nfc_data.resize(AmiiboSize); break; case MifareSize: diff --git a/src/input_common/drivers/virtual_amiibo.h b/src/input_common/drivers/virtual_amiibo.h index 34e97cd91..09ca09e68 100644 --- a/src/input_common/drivers/virtual_amiibo.h +++ b/src/input_common/drivers/virtual_amiibo.h @@ -57,6 +57,7 @@ public: private: static constexpr std::size_t AmiiboSize = 0x21C; static constexpr std::size_t AmiiboSizeWithoutPassword = AmiiboSize - 0x8; + static constexpr std::size_t AmiiboSizeWithSignature = AmiiboSize + 0x20; static constexpr std::size_t MifareSize = 0x400; std::string file_path{}; |