InputCommon: Migrate logging over to fmt

Continues the migration of the logging calls over to the fmt capable
ones.
This commit is contained in:
Lioncash
2020-10-22 17:49:29 -04:00
parent 64f7a4448b
commit a5e1415e74
14 changed files with 215 additions and 185 deletions

View File

@ -242,15 +242,16 @@ struct Message
template <class ToMsgType>
std::optional<ToMsgType> CheckAndCastTo()
{
u32 crc32_in_header = m_message.header.crc32;
const u32 crc32_in_header = m_message.header.crc32;
// zero out the crc32 in the packet once we got it since that's whats needed for calculation
m_message.header.crc32 = 0;
u32 crc32_calculated = CRC32(&m_message, sizeof(ToMsgType));
const u32 crc32_calculated = CRC32(&m_message, sizeof(ToMsgType));
if (crc32_in_header != crc32_calculated)
{
NOTICE_LOG(SERIALINTERFACE,
"DualShockUDPClient Received message with bad CRC in header: got %u, expected %u",
crc32_in_header, crc32_calculated);
NOTICE_LOG_FMT(
SERIALINTERFACE,
"DualShockUDPClient Received message with bad CRC in header: got {:08x}, expected {:08x}",
crc32_in_header, crc32_calculated);
return std::nullopt;
}
if (m_message.header.protocol_version > CEMUHOOK_PROTOCOL_VERSION)