Jump to content
  • Advertisement
Sign in to follow this  
Demx

Direct Input real time string input

This topic is 2528 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,

is there an event system in Direct Input to use when getting strings in real time?

cauz now im using this code:


if( strtimer.get_ticks() >= 150 )
{
/*
CharInput() returns the character corrisponding to the key pressed

*/
if ( CharInput() != NULL )
{
strtimer.start();


txt += CharInput();


}
}



it creates a delay of 150 ms when u press a key so it may jump characters if u press 2 keys fast. Edited by Demx

Share this post


Link to post
Share on other sites
Advertisement
Microsoft recommends that you don't use DirectInput for keyboard and mouse input but rather that you use the normal Windows API for this, look at the WM_CHAR event,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!