|
18 | 18 | #include "mouse.h"
|
19 | 19 | #include "vgalib.h"
|
20 | 20 |
|
21 |
| -#define USE_XOR_CURSOR 1 /* =1 use XOR drawing for slow systems*/ |
22 |
| -#define USE_VGA_DRAWCURSOR defined(__ia16__) |
| 21 | +#define USE_XOR_CURSOR 1 /* =1 use XOR drawpixel vs full cursor & mask draw */ |
| 22 | +#define USE_VGA_DRAWCURSOR (__ia16__ || __WATCOMC__) /* VGA hardware XOR cursor */ |
23 | 23 |
|
24 | 24 | #define MWMAX_CURSOR_SIZE 16 /* maximum cursor x and y size*/
|
25 | 25 | #define MWMAX_CURSOR_BUFLEN MWIMAGE_SIZE(MWMAX_CURSOR_SIZE,MWMAX_CURSOR_SIZE)
|
@@ -150,6 +150,10 @@ static MWIMAGEBITS lgcursormask[16] = {
|
150 | 150 | MASK(_,_,_,_,_,_,_,_,_,_,_,_,X,X,X,_), // 000E
|
151 | 151 | MASK(_,_,_,_,_,_,_,_,_,_,_,_,_,X,_,_) // 0004
|
152 | 152 | };
|
| 153 | + |
| 154 | +struct cursor cursor_lg = { |
| 155 | + 16, 16, 0, 0, WHITE, BLACK, lgcursorbits, lgcursormask |
| 156 | +}; |
153 | 157 | #else
|
154 | 158 | static MWIMAGEBITS lgcursorbits[16] = {
|
155 | 159 | // 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
|
@@ -189,10 +193,11 @@ static MWIMAGEBITS lgcursormask[16] = {
|
189 | 193 | MASK(X,X,_,_,X,X,X,X,_,_,_,_,_,_,_,_),
|
190 | 194 | MASK(X,_,_,_,_,X,X,X,_,_,_,_,_,_,_,_)
|
191 | 195 | };
|
192 |
| -#endif |
| 196 | + |
193 | 197 | struct cursor cursor_lg = {
|
194 | 198 | 11, 16, 0, 0, WHITE, BLACK, lgcursorbits, lgcursormask
|
195 | 199 | };
|
| 200 | +#endif |
196 | 201 |
|
197 | 202 | void initcursor(void)
|
198 | 203 | {
|
@@ -288,7 +293,7 @@ int showcursor(void)
|
288 | 293 | * Loop through bits, resetting to firstbit at end of each row
|
289 | 294 | */
|
290 | 295 | #if USE_VGA_DRAWCURSOR
|
291 |
| - vga_drawcursor(curminx, curminy, curmaxy - curminy, cursormask); |
| 296 | + vga_drawcursor(curminx, curminy, curmaxy - curminy + 1, cursormask); |
292 | 297 | #elif USE_XOR_CURSOR
|
293 | 298 | set_op(0x18);
|
294 | 299 | for (y = curminy; y <= curmaxy; y++) {
|
@@ -365,7 +370,7 @@ int hidecursor(void)
|
365 | 370 | return prevcursor;
|
366 | 371 |
|
367 | 372 | #if USE_VGA_DRAWCURSOR
|
368 |
| - vga_drawcursor(cursavx, cursavy, cursavy2 - cursavy, cursormask); |
| 373 | + vga_drawcursor(cursavx, cursavy, cursavy2 - cursavy + 1, cursormask); |
369 | 374 | #elif USE_XOR_CURSOR
|
370 | 375 | set_op(0x18);
|
371 | 376 | for (y = cursavy; y <= cursavy2; y++) {
|
|
0 commit comments