summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-06-16 01:39:01 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2023-06-16 02:22:13 +0200
commit0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8 (patch)
tree21ad130a6c66031193c764e6412400ffe9ad6f18 /src/input_common/drivers
parentMerge pull request #10781 from 8bitDream/vcpkg (diff)
downloadyuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.tar
yuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.tar.gz
yuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.tar.bz2
yuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.tar.lz
yuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.tar.xz
yuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.tar.zst
yuzu-0c90a0926f4c9a7e9954edf2f2c5cd0d82f2ada8.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/drivers/virtual_amiibo.cpp2
-rw-r--r--src/input_common/drivers/virtual_amiibo.h1
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{};