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 case 0x00: // JOY_DATA
{ {
u8 value; const u8 value = m_receive_buffer_full ? m_receive_buffer : 0xFF;
if (!m_receive_buffer_full) Log_DebugPrintf("JOY_DATA (R) -> 0x%02X%s", ZeroExtend32(value), m_receive_buffer_full ? "" : "(EMPTY)");
{ m_receive_buffer_full = false;
Log_DevPrintf("Read from RX fifo when empty");
value = 0xFF;
}
else
{
value = m_receive_buffer;
m_receive_buffer_full = false;
}
UpdateJoyStat(); UpdateJoyStat();
Log_DebugPrintf("JOY_DATA (R) -> 0x%02X", ZeroExtend32(value));
return (ZeroExtend32(value) | (ZeroExtend32(value) << 8) | (ZeroExtend32(value) << 16) | return (ZeroExtend32(value) | (ZeroExtend32(value) << 8) | (ZeroExtend32(value) << 16) |
(ZeroExtend32(value) << 24)); (ZeroExtend32(value) << 24));
} }