From 513aec2aa20fdfcd862acc4189aa3226c876a051 Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 18 Apr 2022 21:03:45 +0200 Subject: in w16driver, change mouse speed for improved dosemu2 compatibility See discussion in https://github.com/dosemu2/dosemu2/issues/1552#issuecomment-1101657149 --- int33.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'int33.h') diff --git a/int33.h b/int33.h index 7cd7aa5..69ef7ed 100644 --- a/int33.h +++ b/int33.h @@ -219,6 +219,20 @@ static void int33_set_event_handler(uint16_t event_mask, void (__far *handler)() __parm [cx] [es dx] \ __modify [ax] +static void int33_set_mouse_speed(int16_t x, int16_t y); +#pragma aux int33_set_mouse_speed = \ + "mov ax, 0xF" \ + "int 0x33" \ + __parm [cx] [dx] \ + __modify [ax] + +static void int33_set_sensitivity(uint16_t sens_x, uint16_t sens_y, uint16_t double_speed_threshold); +#pragma aux int33_set_sensitivity = \ + "mov ax, 0x1A" \ + "int 0x33" \ + __parm [bx] [cx] [dx] \ + __modify [ax] + static uint16_t int33_get_driver_version(void); #pragma aux int33_get_driver_version = \ "mov bx, 0" \ @@ -232,20 +246,18 @@ static uint16_t int33_get_driver_version(void); __value [bx] \ __modify [ax bx cx dx] -static bool int33_get_max_coordinates(int16_t *x, int16_t *y); +static int int33_get_max_coordinates(int16_t *x, int16_t *y); #pragma aux int33_get_max_coordinates = \ "mov ax, 0x26" \ "mov bx, -1" \ + "xor cx, cx" \ + "xor dx, dx" \ "int 0x33" \ - "xor ax, ax" \ - "test bx, bx" \ - "jnz error" \ "mov [si], cx" \ "mov [di], dx" \ - "mov al, 1" \ "error:" \ __parm [si] [di] \ - __value [al] \ + __value [bx] \ __modify [ax bx cx dx] static uint16_t int33_get_capabilities(void); -- cgit v1.2.3