Pad: Fix log spam

This commit is contained in:
Connor McLaughlin 2020-01-11 13:29:30 +10:00
parent e68e67f161
commit 3e90d79df7

View file

@ -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;
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));
}