version 1.1 | | version 1.2 |
---|
| | |
* Functions to access Mouse and Cyberman... | | * Functions to access Mouse and Cyberman... |
* | | * |
* $Log$ | | * $Log$ |
* Revision 1.1 1999/06/14 21:58:38 donut | | * Revision 1.2 2000/01/21 04:06:22 sekmu |
* Initial revision | | * added new arg and printfs for mouse driver problems |
| | * |
| | * Revision 1.1.1.1 1999/06/14 21:58:38 donut |
| | * Import of d1x 1.37 source. |
* | | * |
* Revision 1.11 1995/02/10 18:52:17 john | | * Revision 1.11 1995/02/10 18:52:17 john |
* Fixed bug with mouse not getting closed. | | * Fixed bug with mouse not getting closed. |
| | |
#else | | #else |
if (_dos_getvect(0x33) == NULL) { | | if (_dos_getvect(0x33) == NULL) { |
#endif | | #endif |
| | //added on 1/13/2000 by Victor Rachels for more info |
| | printf("\nNo mouse driver found!\n"); |
| | //end this section addition - VR |
// No mouse driver loaded | | // No mouse driver loaded |
return 0; | | return 0; |
} | | } |
| | |
inregs.w.ax = 0; | | inregs.w.ax = 0; |
int386(0x33, &inregs, &outregs); | | int386(0x33, &inregs, &outregs); |
if (outregs.w.ax != 0xffff) | | if (outregs.w.ax != 0xffff) |
| | { |
| | //added on 1/13/2000 by Victor Rachels for more info |
| | printf("\nUnable to reset mouse!\n"); |
| | //end this section edit - VR |
| | |
return 0; | | return 0; |
| | } |
| | |
Mouse.num_buttons = outregs.w.bx; | | Mouse.num_buttons = outregs.w.bx; |
Mouse.cyberman = 0; | | Mouse.cyberman = 0; |
| | |
// Enable mouse driver | | // Enable mouse driver |
| | //added/edited on 1/15/2000 by Victor Rachels to make this optional - can usually be used w or w/o this reset |
| | if(!FindArg("-ihaveabrokenmouse")) |
| | { |
memset( &inregs, 0, sizeof(inregs) ); | | memset( &inregs, 0, sizeof(inregs) ); |
inregs.w.ax = 0x0020; | | inregs.w.ax = 0x0020; |
int386(0x33, &inregs, &outregs); | | int386(0x33, &inregs, &outregs); |
if (outregs.w.ax != 0xffff ) | | if (outregs.w.ax != 0xffff ) |
| | { |
| | //added on 1/13/2000 by Victor Rachels for more info |
| | printf("\nUnable to enable mouse! (%x)\n",outregs.w.ax); |
| | //end this section edit - VR |
return 0; | | return 0; |
| | } |
| | } |
| | //end this section edit/addition - VR |
| | |
if ( enable_cyberman ) { | | if ( enable_cyberman ) { |
Mouse_dos_mem = dpmi_get_temp_low_buffer( 64 ); | | Mouse_dos_mem = dpmi_get_temp_low_buffer( 64 ); |