From e99a4724c02649c16159a2b2ab2419a9c1a2fc9d Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 16 Dec 2023 02:53:17 +0100 Subject: separate define for tracing ps/2 protocol events --- mousetsr.c | 6 +++--- mousetsr.h | 4 +++- mousmain.c | 4 ++-- version.h | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mousetsr.c b/mousetsr.c index 5b68ca4..8c42057 100644 --- a/mousetsr.c +++ b/mousetsr.c @@ -726,7 +726,7 @@ static void handle_ps2_packet(void) x = status & PS2M_STATUS_X_NEG ? 0xFF00 | x : x; y = -(status & PS2M_STATUS_Y_NEG ? 0xFF00 | y : y); -#if TRACE_EVENTS +#if TRACE_PROTO dprintf("ps2 packet %x %d %d %d\n", status, x, y, z); #endif /* TRACE_EVENTS */ @@ -825,7 +825,7 @@ static void ps2_mouse_handler(uint16_t word0, uint16_t word1, uint16_t word2, ui // receiving one byte at a time. // We have to compute synchronization ourselves. -#if TRACE_EVENTS +#if TRACE_PROTO dprintf("ps2 callback byte %d/%d = %x\n", 1 + data.cur_packet_bytes, data.packet_size, word0 & 0xFF); #endif /* TRACE_EVENTS */ @@ -1133,7 +1133,7 @@ static void int33_handler(union INTPACK r) break; case INT33_SET_MOUSE_POSITION: #if TRACE_CALLS - dputs("Mouse set position"); + dprintf("Mouse set position %d, %d\n", r.w.cx, r.w.dx); #endif data.pos.x = r.w.cx; data.pos.y = r.w.dx; diff --git a/mousetsr.h b/mousetsr.h index c37c751..43fccc1 100644 --- a/mousetsr.h +++ b/mousetsr.h @@ -39,7 +39,9 @@ /** Trace mouse events verbosily. */ #define TRACE_EVENTS 0 /** Trace (noisy) API calls. */ -#define TRACE_CALLS 1 +#define TRACE_CALLS 0 +/** Trace (noisy) PS/2 protocol bytes. */ +#define TRACE_PROTO 0 /** The reported MS MOUSE compatible version to programs who ask for it. */ #define REPORTED_VERSION_MAJOR 6 diff --git a/mousmain.c b/mousmain.c index d84407e..f457adf 100644 --- a/mousmain.c +++ b/mousmain.c @@ -47,7 +47,7 @@ static void detect_wheel(LPTSRDATA data) static int set_wheel(LPTSRDATA data, bool enable) { - printf(_(1, 1, "Setting wheel support to %s\n"), enable ? kittengets(1, 2, "enabled") : kittengets(1, 3, "disabled")); + printf(_(1, 1, "Setting wheel support to %s\n"), enable ? _(1, 2, "enabled") : _(1, 3, "disabled")); data->usewheel = enable; if (data->usewheel) { @@ -138,7 +138,7 @@ static int set_virtualbox_integration(LPTSRDATA data, bool enable) static int set_virtualbox_host_cursor(LPTSRDATA data, bool enable) { - printf(_(1, 10, "Setting host cursor to %s\n"), enable ? kittengets(1, 2, "enabled") : kittengets(1, 3, "disabled")); + printf(_(1, 10, "Setting host cursor to %s\n"), enable ? _(1, 2, "enabled") : _(1, 3, "disabled")); data->vbwantcursor = enable; return 0; diff --git a/version.h b/version.h index feb1236..abbbca7 100644 --- a/version.h +++ b/version.h @@ -2,6 +2,6 @@ #define VERSION_H #define VERSION_MAJOR 0 -#define VERSION_MINOR 0x67 +#define VERSION_MINOR 0x68 #endif // VERSION_H -- cgit v1.2.3