i use 0x33 function 5 and 6 for mouseclicks. but i get nothing in the bx [for number of clicks] on return. i have a continuous polling loop for this, and the coordinate values are fine... so checking for press and release within a given bounds works, except that those coordinates stay on each subsequent call until another click displaces them. here's some of my code... please forgive the shorthands... [bubba you know about it...]
i would just not have a continuous polling loop but i would still need to check for clicks and stop checking upon a release [which might be difficult and tedius if i can find out why bx is returning nothing]. i appreciate any help you can give... thank you very much...Code:// snippet 2 /***************************** press ******************************************* This function retrieves the button press data. *******************************************************************************/ vo HE::MF::press (vo) { for (un u0 = 0; u0 < 3; u0++) { __dpmi_regs io; io.x.ax = 0x0005; io.x.bx = u0; __dpmi_int (0x33, &io); HE::MF::VARS::press_n [u0] = io.x.bx >> 3; HE::MF::VARS::press_x [u0] = io.x.cx >> 3; HE::MF::VARS::press_y [u0] = io.x.dx >> 3; } } /***************************** release ***************************************** This function retrieves the button release data. *******************************************************************************/ vo HE::MF::release (vo) { for (un u0 = 0; u0 < 3; u0++) { __dpmi_regs io; io.x.ax = 0x0006; io.x.bx = u0; __dpmi_int (0x33, &io); HE::MF::VARS::rel_n [u0] = io.x.bx >> 3; HE::MF::VARS::rel_x [u0] = io.x.cx >> 3; HE::MF::VARS::rel_y [u0] = io.x.dx >> 3; } }



LinkBack URL
About LinkBacks


