diff options
| author | 2022-12-23 08:32:02 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:22 -0600 | |
| commit | e1a3bda4d9881cb99c36b64733b814a3bb437f13 (patch) | |
| tree | a9c0d864b023a810f48c129bb8bd6e84afb2ed2b /src/input_common/helpers/joycon_protocol/nfc.cpp | |
| parent | core: hid: Fix input regressions (diff) | |
| download | yuzu-e1a3bda4d9881cb99c36b64733b814a3bb437f13.tar.gz yuzu-e1a3bda4d9881cb99c36b64733b814a3bb437f13.tar.xz yuzu-e1a3bda4d9881cb99c36b64733b814a3bb437f13.zip | |
Address review comments
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/nfc.cpp')
| -rw-r--r-- | src/input_common/helpers/joycon_protocol/nfc.cpp | 9 |
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 | ||
| 8 | namespace InputCommon::Joycon { | 8 | namespace InputCommon::Joycon { |
| 9 | 9 | ||
| 10 | NfcProtocol::NfcProtocol(std::shared_ptr<JoyconHandle> handle) : JoyconCommonProtocol(handle) {} | 10 | NfcProtocol::NfcProtocol(std::shared_ptr<JoyconHandle> handle) |
| 11 | : JoyconCommonProtocol(std::move(handle)) {} | ||
| 11 | 12 | ||
| 12 | DriverResult NfcProtocol::EnableNfc() { | 13 | DriverResult 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 | ||
| 410 | bool NfcProtocol::IsEnabled() { | 411 | bool NfcProtocol::IsEnabled() const { |
| 411 | return is_enabled; | 412 | return is_enabled; |
| 412 | } | 413 | } |
| 413 | 414 | ||