delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/22/20:16:43

Message-ID: <362FD88C.E4A27845@montana.com>
Date: Thu, 22 Oct 1998 19:14:52 -0600
From: bowman <bowman AT montana DOT com>
X-Mailer: Mozilla 4.5b2 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: My mousecommitted suicide addendum.
References: <70o4t0$l02$1 AT nnrp1 DOT dejanews DOT com>
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019