aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2023-12-16 02:53:17 +0100
committerJavier <dev.git@javispedro.com>2023-12-16 02:53:17 +0100
commite99a4724c02649c16159a2b2ab2419a9c1a2fc9d (patch)
tree0ba8c2864aaa0b3e5d9101c7602f14730a180102
parent4091173cceea8f2c3b0cdbc19a1adb6bd87c0a94 (diff)
downloadvbados-e99a4724c02649c16159a2b2ab2419a9c1a2fc9d.tar.gz
vbados-e99a4724c02649c16159a2b2ab2419a9c1a2fc9d.zip
separate define for tracing ps/2 protocol events
-rw-r--r--mousetsr.c6
-rw-r--r--mousetsr.h4
-rw-r--r--mousmain.c4
-rw-r--r--version.h2
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