aboutsummaryrefslogtreecommitdiff
path: root/int15ps2.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-19 00:56:08 +0200
committerJavier <dev.git@javispedro.com>2022-04-19 00:56:08 +0200
commitdc407cef2bcaa4d4524354608674862830d1877e (patch)
tree878fc18f56d8d076436ef2b584a75ef312e96da1 /int15ps2.h
parentb9396bdeff4588762ab017cb3446910a2684b380 (diff)
downloadvbados-dc407cef2bcaa4d4524354608674862830d1877e.tar.gz
vbados-dc407cef2bcaa4d4524354608674862830d1877e.zip
handle wheel mouse that does not require knock (i.e. wheelvkd)
Diffstat (limited to 'int15ps2.h')
-rw-r--r--int15ps2.h16
1 files 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;
}