Mail Archives: djgpp/1998/10/22/20:16:43
oh, yeah, the initialization and close functions. I lump your
mouse_detect and mouse_show
into one call to match the gpm stuff, but it is the same. NOTE: you are
checking mouse_detect to see if you have a valid mouse driver? I
probably should also be doing a r.x.ax & 0x0ffff on the first return.
int Gpm_Open(Gpm_Connect* conn, int flag)
{
union REGS r;
r.x.ax = 0x00;
int86(0x33, &r, &r);
if (r.x.ax == 0) // no mouse handler
return -1;
r.x.ax = 0x01;
int86(0x33, &r, &r); // display the mouse cursor
gpm_flag = 1;
return 0;
}
int Gpm_Close(void)
{
union REGS r;
r.x.ax = 0x02; // remove the mouse cursor
int86(0x33, &r, &r);
return 0;
}
- Raw text -