ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/msmouse.c
(Generate patch)

Comparing ray/src/rt/msmouse.c (file contents):
Revision 2.2 by greg, Fri Oct 9 15:24:02 1992 UTC vs.
Revision 2.5 by greg, Fri Jul 16 18:41:09 1993 UTC

# Line 8 | Line 8 | static char SCCSid[] = "$SunId$ LBL";
8   #include <graph.h>
9   #include "driver.h"
10  
11 + #define  NULL           0
12 +
13   #define  M_RIGHTBUTT    0x8
14   #define  M_LEFTBUTT     0x2
15   #define  M_MOTION       0x1
# Line 27 | Line 29 | static void _loadds far mouse_handler (int max, int mc
29   #pragma aux mouse_handler parm [EAX] [ECX] [EDX]
30          mouse_event = max;
31          mouse_xpos = mcx;
32 <        mouse_ypos = mdx * (long)ydispsize / 200;       /* kludge */
32 >        mouse_ypos = mdx;
33   }
34   #pragma on (check_stack)
35  
# Line 153 | Line 155 | struct driver  *dp;
155      ydispsize = dp->ysiz;
156      crad = dp->ysiz/40;
157  
158 +    /* set screen limits */
159 +
160 +    inregs.w.ax = 0x7;          /* horizontal resolution */
161 +    inregs.w.cx = 0;
162 +    inregs.w.dx = xdispsize-1;
163 +    int386x( 0x33, &inregs, &outregs, &sregs );
164 +    inregs.w.ax = 0x8;          /* vertical resolution */
165 +    inregs.w.cx = 0;
166 +    inregs.w.dx = ydispsize-1;
167 +    int386x( 0x33, &inregs, &outregs, &sregs );
168 +
169      /* install watcher */
170  
171      inregs.w.ax = 0xC;
# Line 164 | Line 177 | struct driver  *dp;
177  
178      dp->getcur = ms_getcur;
179   }
180 +
181 + void
182 + ms_gcdone( dp )
183 + struct driver  *dp;
184 + {
185 +    union REGS inregs, outregs;
186 +
187 +    if (dp->getcur != ms_getcur)
188 +        return;                 /* not installed */
189 +
190 +    dp->getcur = NULL;
191 +
192 +    /* uninstall watcher */
193 +
194 +    inregs.w.ax = 0;
195 +    int386 (0x33, &inregs, &outregs);
196 + }
197 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines