Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Buffered input help needed?

This topic is 5969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys i want to get input from the user (like the users name or what eva) so now i use buffered input to read my stuff into a string like this //KB_BUFFER = 20 USHORT temp; DIDEVICEOBJECTDATA didod[KB_BUFFER]; DWORD dwElements = KB_BUFFER; if(FAILED(hr = lpdi_kb->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), didod, &dwElements, DIGDD_PEEK))) { if(hr == DIERR_INPUTLOST) { if(FAILED(hr = lpdi_kb->Acquire())) { MessageBox(NULL, "Keyboard has been lost", "ERROR", MB_OK | MB_ICONEXCLAMATION); logerror(DXI_ER010); killDXInput(); } } } for(DWORD i = 0; i < dwElements; i++) { scan2ascii(didod.dwOfs, &temp); inputStr[i] = (char)temp; } //inputStr size is = to KB_BUFFER now my problem is when i call this @ 60hz all my input is double. it looks kinds like this when i print it "tthhiiss iiss aa tteesstt" any ideas, sucgestions or links? cheers

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!