From dc407cef2bcaa4d4524354608674862830d1877e Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 19 Apr 2022 00:56:08 +0200 Subject: handle wheel mouse that does not require knock (i.e. wheelvkd) --- int15ps2.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/int15ps2.h b/int15ps2.h index cce254d..847435d 100644 --- a/int15ps2.h +++ b/int15ps2.h @@ -215,8 +215,20 @@ static bool ps2m_detect_wheel(void) // Get the initial mouse device id err = ps2m_get_device_id(&device_id); - if (err || device_id != PS2M_DEVICE_ID_PLAIN) { - // TODO : Likely have to accept more device_ids here. + if (err) { + return false; + } + + if (device_id == PS2M_DEVICE_ID_IMPS2) { + // Already wheel + return true; + } + + if (device_id != PS2M_DEVICE_ID_PLAIN) { + // TODO: Likely we have to accept more device IDs here + dlog_print("Unknown initial mouse device_id="); + dlog_printx(device_id); + dlog_endline(); return false; } -- cgit v1.2.3