Skip to content

Commit f96ec35

Browse files
committed
reset the visibility counter in mouse_enable()
It is needed if it is called w/o corresponding mouse_disable(), which is the case in an extctl mode.
1 parent db2c103 commit f96ec35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ms.c

+6
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ void mouse_enable(void)
207207
{
208208
__dpmi_regs r = { };
209209

210+
__dpmi_int(0x33, &r); // reset the visibility counter
211+
if ((r.x.flags & CF) || r.x.ax != 0xffff || r.x.bx != 3) {
212+
puts("mouse not detected");
213+
return;
214+
}
215+
210216
r.x.ax = 0x0c;
211217
r.x.cx = MEV_MASK;
212218
r.x.es = newm.segment;

0 commit comments

Comments
 (0)