From c9c26727a11c37f61bc51662c3ca498737ce523f Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 19 Oct 2018 13:30:01 +0200 Subject: compositor stuff --- driver/mouse.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'driver') diff --git a/driver/mouse.c b/driver/mouse.c index c292d97..787c7a6 100644 --- a/driver/mouse.c +++ b/driver/mouse.c @@ -33,7 +33,6 @@ bool mouse_worker() { kpanic("mouse buffer full"); // heavy debugging } - bool wake=false; while(ringbuffer_has(&mouse_in)){ mouse_handler(ringbuffer_get(&mouse_in)); @@ -146,14 +145,18 @@ void mouse_action() if(mouse_byte[0]&0x80) { +#ifdef LOG_MOUSE_WARN + klog("x overflow"); +#endif return; - // klog("x overflow"); } if(mouse_byte[0]&0x40) { +#ifdef LOG_MOUSE_WARN + klog("y overflow"); +#endif return; - // klog("y overflow"); } rel_x = mouse_byte[1] - ((mouse_byte[0] << 4) & 0x100); @@ -176,7 +179,9 @@ void mouse_handler(uint8_t byte)//struct regs *a_r) //struct regs *a_r (not used // this bit is ALWAYS one, otherwise we are out of sync! if(!(mouse_byte[0]&0x8)) { -// klog("mouse out of sync (try next packet) ..."); +#ifdef LOG_MOUSE_WARN + klog("mouse out of sync"); +#endif mouse_cycle--; } -- cgit v1.2.3