diff options
author | Javier <dev.git@javispedro.com> | 2022-04-19 00:56:08 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-04-19 00:56:08 +0200 |
commit | dc407cef2bcaa4d4524354608674862830d1877e (patch) | |
tree | 878fc18f56d8d076436ef2b584a75ef312e96da1 | |
parent | b9396bdeff4588762ab017cb3446910a2684b380 (diff) | |
download | vbados-dc407cef2bcaa4d4524354608674862830d1877e.tar.gz vbados-dc407cef2bcaa4d4524354608674862830d1877e.zip |
handle wheel mouse that does not require knock (i.e. wheelvkd)
-rw-r--r-- | int15ps2.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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; } |