Reduce PS2MouseDevice debug spam in every dang mouse interrupt.

This commit is contained in:
Andreas Kling 2019-01-12 03:20:48 +01:00
parent 5db720dc59
commit 0e6c19ffa6
Notes: sideshowbarker 2024-07-19 16:04:43 +09:00

View file

@ -1,6 +1,8 @@
#include "PS2MouseDevice.h"
#include "IO.h"
//#define PS2MOUSE_DEBUG
static PS2MouseDevice* s_the;
PS2MouseDevice::PS2MouseDevice()
@ -34,12 +36,14 @@ void PS2MouseDevice::handle_irq()
break;
case 2:
m_data_state = 0;
#ifdef PS2MOUSE_DEBUG
dbgprintf("PS2Mouse: %d, %d %s %s\n",
m_data[1],
m_data[2],
(m_data[0] & 1) ? "Left" : "",
(m_data[0] & 2) ? "Right" : ""
);
#endif
if (m_client)
m_client->did_receive_mouse_data(m_data[1], -m_data[2], m_data[0] & 1, m_data[0] & 2);
break;