summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-05-30 14:13:01 +0200
committerGitHub <noreply@github.com>2023-05-30 14:13:01 +0200
commit810d19b6be80ac71adb96b8643823f84e265e8d8 (patch)
treeafd5a19d68c6a52a39cdb7ceff8e310bd33e7d61 /src/input_common
parentMerge pull request #10484 from Morph1984/fmt10 (diff)
parentinput_common: rename PAGE_SIZE to avoid conflict (diff)
downloadyuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.tar
yuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.tar.gz
yuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.tar.bz2
yuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.tar.lz
yuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.tar.xz
yuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.tar.zst
yuzu-810d19b6be80ac71adb96b8643823f84e265e8d8.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/helpers/joycon_protocol/nfc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp
index 3b7a628e5..f7058c4a7 100644
--- a/src/input_common/helpers/joycon_protocol/nfc.cpp
+++ b/src/input_common/helpers/joycon_protocol/nfc.cpp
@@ -528,9 +528,9 @@ NFCWritePackage NfcProtocol::MakeAmiiboWritePackage(const TagUUID& tag_uuid,
}
NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span<const u8> data) const {
- constexpr u8 PAGE_SIZE = 4;
+ constexpr u8 NFC_PAGE_SIZE = 4;
- if (static_cast<std::size_t>(page * PAGE_SIZE) + size >= data.size()) {
+ if (static_cast<std::size_t>(page * NFC_PAGE_SIZE) + size >= data.size()) {
return {};
}
@@ -539,7 +539,7 @@ NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span<const u8>
.data_size = size,
.data = {},
};
- std::memcpy(chunk.data.data(), data.data() + (page * PAGE_SIZE), size);
+ std::memcpy(chunk.data.data(), data.data() + (page * NFC_PAGE_SIZE), size);
return chunk;
}