summaryrefslogtreecommitdiff
path: root/src/input_common/helpers/joycon_protocol/nfc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/nfc.cpp')
-rw-r--r--src/input_common/helpers/joycon_protocol/nfc.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp
index 69b2bfe05..8755e310b 100644
--- a/src/input_common/helpers/joycon_protocol/nfc.cpp
+++ b/src/input_common/helpers/joycon_protocol/nfc.cpp
@@ -7,7 +7,8 @@
7 7
8namespace InputCommon::Joycon { 8namespace InputCommon::Joycon {
9 9
10NfcProtocol::NfcProtocol(std::shared_ptr<JoyconHandle> handle) : JoyconCommonProtocol(handle) {} 10NfcProtocol::NfcProtocol(std::shared_ptr<JoyconHandle> handle)
11 : JoyconCommonProtocol(std::move(handle)) {}
11 12
12DriverResult NfcProtocol::EnableNfc() { 13DriverResult NfcProtocol::EnableNfc() {
13 LOG_INFO(Input, "Enable NFC"); 14 LOG_INFO(Input, "Enable NFC");
@@ -160,9 +161,9 @@ DriverResult NfcProtocol::ReadTag(const TagFoundData& data) {
160 std::vector<u8> output; 161 std::vector<u8> output;
161 std::size_t tries = 0; 162 std::size_t tries = 0;
162 163
163 std::string uuid_string = ""; 164 std::string uuid_string;
164 for (auto& content : data.uuid) { 165 for (auto& content : data.uuid) {
165 uuid_string += " " + fmt::format("{:02x}", content); 166 uuid_string += fmt::format(" {:02x}", content);
166 } 167 }
167 168
168 LOG_INFO(Input, "Tag detected, type={}, uuid={}", data.type, uuid_string); 169 LOG_INFO(Input, "Tag detected, type={}, uuid={}", data.type, uuid_string);
@@ -407,7 +408,7 @@ NFCReadBlockCommand NfcProtocol::GetReadBlockCommand(std::size_t pages) const {
407 return {}; 408 return {};
408} 409}
409 410
410bool NfcProtocol::IsEnabled() { 411bool NfcProtocol::IsEnabled() const {
411 return is_enabled; 412 return is_enabled;
412} 413}
413 414