Howdy, Stranger!

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

Categories

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.

Comments

  • Andre YoungAndre Young USAMember Posts: 0

    _____ { http://forcoder.org } free video tutorials and ebooks about || JavaScript, Objective-C, Java, PHP, Assembly, R, C++, Delphi, Ruby, Visual Basic, Python, Swift, Perl, Go, Scratch, PL/SQL, MATLAB, C#, C, Visual Basic .NET ABAP, Fortran, Bash, ML, Lua, Clojure, COBOL, Julia, Kotlin, Alice, Erlang, Prolog, D, Lisp, F#, Ada, Scheme, Logo, Rust, Awk, SAS, VBScript, Crystal, Transact-SQL, LabVIEW, Apex, Dart, Hack, FoxPro, Scala || ________

Sign In or Register to comment.