From 0ebcd2c1c9148e8647a5b2f89654949435403058 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 13 Mar 2022 00:43:23 +0100 Subject: let VMD know the mouse type --- mousew16.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mousew16.c') diff --git a/mousew16.c b/mousew16.c index f2e22ab..45c0266 100644 --- a/mousew16.c +++ b/mousew16.c @@ -212,6 +212,15 @@ BOOL FAR PASCAL LibMain(HINSTANCE hInstance, WORD wDataSegment, } #endif + // When running under protected mode Windows, let's tell VMD (the mouse virtualizer) + // what type of mouse we are going to be using + if (mouseflags & MOUSEFLAGS_HAS_WIN386) { + LPFN vmd_entry = win_get_vxd_api_entry(VMD_DEVICE_ID); + if (vmd_entry) { + vmd_set_mouse_type(&vmd_entry, VMD_TYPE_PS2, PS2_MOUSE_INT_VECTOR, 0); + } + } + return 1; } @@ -317,6 +326,6 @@ VOID FAR PASCAL Disable(VOID) /** Called by Window to retrieve the interrupt vector number used by this driver, or -1. */ int FAR PASCAL MouseGetIntVect(VOID) { - return 0x74; /* This corresponds to IRQ12, the PS/2 IRQ. At least in VirtualBox. */ + return PS2_MOUSE_INT_VECTOR; } -- cgit v1.2.3