27 |
|
#pragma aux mouse_handler parm [EAX] [ECX] [EDX] |
28 |
|
mouse_event = max; |
29 |
|
mouse_xpos = mcx; |
30 |
< |
mouse_ypos = mdx * (long)ydispsize / 200; /* kludge */ |
30 |
> |
mouse_ypos = mdx; |
31 |
|
} |
32 |
|
#pragma on (check_stack) |
33 |
|
|
153 |
|
ydispsize = dp->ysiz; |
154 |
|
crad = dp->ysiz/40; |
155 |
|
|
156 |
+ |
/* set screen limits */ |
157 |
+ |
|
158 |
+ |
inregs.w.ax = 0x7; /* horizontal resolution */ |
159 |
+ |
inregs.w.cx = 0; |
160 |
+ |
inregs.w.dx = xdispsize-1; |
161 |
+ |
int386x( 0x33, &inregs, &outregs, &sregs ); |
162 |
+ |
inregs.w.ax = 0x8; /* vertical resolution */ |
163 |
+ |
inregs.w.cx = 0; |
164 |
+ |
inregs.w.dx = ydispsize-1; |
165 |
+ |
int386x( 0x33, &inregs, &outregs, &sregs ); |
166 |
+ |
|
167 |
|
/* install watcher */ |
168 |
|
|
169 |
|
inregs.w.ax = 0xC; |
175 |
|
|
176 |
|
dp->getcur = ms_getcur; |
177 |
|
} |
178 |
+ |
|
179 |
+ |
void |
180 |
+ |
ms_gcdone( dp ) |
181 |
+ |
struct driver *dp; |
182 |
+ |
{ |
183 |
+ |
union REGS inregs, outregs; |
184 |
+ |
|
185 |
+ |
if (dp->getcur != ms_getcur) |
186 |
+ |
return; /* not installed */ |
187 |
+ |
|
188 |
+ |
dp->getcur = NULL; |
189 |
+ |
|
190 |
+ |
/* uninstall watcher */ |
191 |
+ |
|
192 |
+ |
inregs.w.ax = 0; |
193 |
+ |
int386 (0x33, &inregs, &outregs); |
194 |
+ |
} |
195 |
+ |
|