aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dlog.h2
-rw-r--r--mousetsr.c6
-rw-r--r--mousmain.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/dlog.h b/dlog.h
index 54bdc61..944edfb 100644
--- a/dlog.h
+++ b/dlog.h
@@ -49,7 +49,7 @@ static void dlog_init()
// Comes straight from https://wiki.osdev.org/Serial_Ports#Initialization
outp(DLOG_TARGET_PORT + 1, 0x00); // Disable all interrupts
outp(DLOG_TARGET_PORT + 3, 0x80); // Enable DLAB (set baud rate divisor)
- outp(DLOG_TARGET_PORT + 0, 0x03); // Set divisor to 3 (lo byte) 38400 baud
+ outp(DLOG_TARGET_PORT + 0, 0x01); // Set divisor to 1 (lo byte) 115200 baud
outp(DLOG_TARGET_PORT + 1, 0x00); // (hi byte)
outp(DLOG_TARGET_PORT + 3, 0x03); // 8 bits, no parity, one stop bit
outp(DLOG_TARGET_PORT + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold
diff --git a/mousetsr.c b/mousetsr.c
index b9e9fc7..b9fad9e 100644
--- a/mousetsr.c
+++ b/mousetsr.c
@@ -947,11 +947,13 @@ static void reset_mouse_hardware()
#if USE_WHEEL
if (data.usewheel && ps2m_detect_wheel()) {
- // Detect wheel also reinitializes the mouse to the proper packet size
+ dlog_puts("PS/2 wheel detected");
data.haswheel = true;
+ // Detect wheel also reinitializes the mouse to the proper packet size
} else {
- // Otherwise do an extra reset to return back to initial state, just in case
+ dlog_puts("PS/2 wheel NOT detected");
data.haswheel = false;
+ // Otherwise do an extra reset to return back to initial state, just in case
ps2m_init(PS2M_PACKET_SIZE_PLAIN);
}
#else
diff --git a/mousmain.c b/mousmain.c
index 80a62fd..c62712c 100644
--- a/mousmain.c
+++ b/mousmain.c
@@ -49,6 +49,9 @@ static int set_wheel(LPTSRDATA data, bool enable)
if (data->usewheel) {
detect_wheel(data);
+ if (!data->haswheel) {
+ fprintf(stderr, "Could not find PS/2 wheel mouse\n");
+ }
} else {
data->haswheel = false;
}