forked from ShuriZma/suyu
1
0
Fork 0

input_common: rename PAGE_SIZE to avoid conflict

See also: https://github.com/yuzu-emu/yuzu/issues/8779
This commit is contained in:
12101111 2023-05-30 16:59:06 +08:00
parent 53fd08b360
commit f78f82e08d
No known key found for this signature in database
GPG Key ID: 97785FADF38A97DC
1 changed files with 3 additions and 3 deletions

View File

@ -528,9 +528,9 @@ NFCWritePackage NfcProtocol::MakeAmiiboWritePackage(const TagUUID& tag_uuid,
} }
NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span<const u8> data) const { 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 {}; return {};
} }
@ -539,7 +539,7 @@ NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span<const u8>
.data_size = size, .data_size = size,
.data = {}, .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; return chunk;
} }