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.6 by greg, Sat Feb 22 02:07:28 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   #include <i86.h>
5   #include <graph.h>
6   #include "driver.h"
7  
8 + #define  NULL           0
9 +
10   #define  M_RIGHTBUTT    0x8
11   #define  M_LEFTBUTT     0x2
12   #define  M_MOTION       0x1
# Line 27 | Line 26 | static void _loadds far mouse_handler (int max, int mc
26   #pragma aux mouse_handler parm [EAX] [ECX] [EDX]
27          mouse_event = max;
28          mouse_xpos = mcx;
29 <        mouse_ypos = mdx * (long)ydispsize / 200;       /* kludge */
29 >        mouse_ypos = mdx;
30   }
31   #pragma on (check_stack)
32  
# Line 153 | Line 152 | struct driver  *dp;
152      ydispsize = dp->ysiz;
153      crad = dp->ysiz/40;
154  
155 +    /* set screen limits */
156 +
157 +    inregs.w.ax = 0x7;          /* horizontal resolution */
158 +    inregs.w.cx = 0;
159 +    inregs.w.dx = xdispsize-1;
160 +    int386x( 0x33, &inregs, &outregs, &sregs );
161 +    inregs.w.ax = 0x8;          /* vertical resolution */
162 +    inregs.w.cx = 0;
163 +    inregs.w.dx = ydispsize-1;
164 +    int386x( 0x33, &inregs, &outregs, &sregs );
165 +
166      /* install watcher */
167  
168      inregs.w.ax = 0xC;
# Line 164 | Line 174 | struct driver  *dp;
174  
175      dp->getcur = ms_getcur;
176   }
177 +
178 + void
179 + ms_gcdone( dp )
180 + struct driver  *dp;
181 + {
182 +    union REGS inregs, outregs;
183 +
184 +    if (dp->getcur != ms_getcur)
185 +        return;                 /* not installed */
186 +
187 +    dp->getcur = NULL;
188 +
189 +    /* uninstall watcher */
190 +
191 +    inregs.w.ax = 0;
192 +    int386 (0x33, &inregs, &outregs);
193 + }
194 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines