From 3e90d79df7454a7ab701c406e97127320686716f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 11 Jan 2020 13:29:30 +1000 Subject: [PATCH] Pad: Fix log spam --- src/core/pad.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/core/pad.cpp b/src/core/pad.cpp index 8e3501739..995f1754c 100644 --- a/src/core/pad.cpp +++ b/src/core/pad.cpp @@ -110,20 +110,11 @@ u32 Pad::ReadRegister(u32 offset) { case 0x00: // JOY_DATA { - u8 value; - if (!m_receive_buffer_full) - { - Log_DevPrintf("Read from RX fifo when empty"); - value = 0xFF; - } - else - { - value = m_receive_buffer; - m_receive_buffer_full = false; - } - + const u8 value = m_receive_buffer_full ? m_receive_buffer : 0xFF; + Log_DebugPrintf("JOY_DATA (R) -> 0x%02X%s", ZeroExtend32(value), m_receive_buffer_full ? "" : "(EMPTY)"); + m_receive_buffer_full = false; UpdateJoyStat(); - Log_DebugPrintf("JOY_DATA (R) -> 0x%02X", ZeroExtend32(value)); + return (ZeroExtend32(value) | (ZeroExtend32(value) << 8) | (ZeroExtend32(value) << 16) | (ZeroExtend32(value) << 24)); }