DInput. Is Button down?

Hi. I'm just playing around with DirectInput and I know how to check the buffer for data using this method:

g_pMouse->GetDeviceData( sizeof(DIDEVICEOBJECTDATA), didod, &dwElements, 0 ) != DI_OK )

then checking the values of didod to determine if theres been a stroke entered into the buffer. The problem is that sometimes when the app lags and the user was holding down the button before and lets go during the lag-time, the app never gets the 'button up' stroke and so it keeps thinking that the button is still down. How can i stop this? The Buffer Input example doesnt explain how. I was wondering if there was a way to check if the button was currently down or not? Or something else that would stop this problem?

Any ideas? Thanks.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories