aboutsummaryrefslogtreecommitdiff
path: root/int33.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2026-09-27 19:09:46 +0200
committerJavier <dev.git@javispedro.com>2026-09-27 19:09:46 +0200
commit87e7637f8d242d3e8e06d0ba76ecf86bbd8af3c7 (patch)
treecf5939968ffb6fc57de33b355c36936c8157fcb1 /int33.h
parentb73c038b18e2e838366f389d81038344b917eb56 (diff)
downloadvbados-87e7637f8d242d3e8e06d0ba76ecf86bbd8af3c7.tar.gz
vbados-87e7637f8d242d3e8e06d0ba76ecf86bbd8af3c7.zip
properly implement msmouse-like sensitivity, separate from speed
Diffstat (limited to 'int33.h')
-rw-r--r--int33.h36
1 files changed, 31 insertions, 5 deletions
diff --git a/int33.h b/int33.h
index df870be..f9191ce 100644
--- a/int33.h
+++ b/int33.h
@@ -114,12 +114,38 @@ enum INT33_API {
INT33_SAVE_MOUSE_STATUS = 0x16,
INT33_LOAD_MOUSE_STATUS = 0x17,
- /** Sets both speed and speed-doubling threshold in one call.
- * @param bx horizontal speed, cx vertical speed
- * @param dx doubling threshold (mickeys per second). */
+ /** Sets both sensitivity and speed-doubling threshold in one call.
+ * @param bx horizontal sensitivity, cx vertical sensitivity
+ * these are values from 5..100.
+ * @param dx speed doubling threshold (mickeys per second?).
+ * Unlike set_mouse_speed, this value is persistent, and survives a reset.
+ * MS doesn't define what "sensitivity" means here, however MSD does print
+ * a table of common sensitivity values and their equivalent "factor",
+ * which is applied to the mouse deltas:
+ * 100 - 3.5 (i.e. mouse is 3.5x faster)
+ * 95 - 3.25
+ * 90 - 3
+ * 85 - 2.75
+ * 80 - 2.5
+ * 75 - 2.25
+ * 70 - 2
+ * 65 - 1.75
+ * 60 - 1.5
+ * 55 - 1.25
+ * 50 - 1 (default value, mouse is 1x)
+ * 45 - 0.875
+ * 40 - 0.75
+ * 35 - 0.625
+ * 30 - 0.5
+ * 25 - 0.375
+ * 20 - 0.25
+ * 15 - 0.125
+ * 10 - 0.062
+ * 5 - 0.031 (MSD prints 0.31 though? looks buggy as hell).
+ * @todo verify if the doubling threshold here is in the same units. */
INT33_SET_MOUSE_SENSITIVITY = 0x1A,
- /** Gets current speed and speed-doubling threshold.
- * @return bx horizontal speed, cx vertical speed
+ /** Gets current sensitivity and speed-doubling threshold.
+ * @return bx horizontal sensitivity, cx vertical sensitivity
* @return dx doubling threshold (mickeys per second). */
INT33_GET_MOUSE_SENSITIVITY = 0x1B,