DInput keypress problem
You may just have to save the device state and check each time to see if the new state of the key is the same as the old one.
ok, here is my really simple code of checking for keypresses:
bool SKeyboard::CheckPress(unsigned char c)
{
char buffer[256];
g_Keyboard7->GetDeviceState(sizeof(buffer), (LPVOID)&buffer);
if(KEYDOWN(buffer,c))
{
return true;
}
else
{
return false;
}
**Now, this works great! It gets the input when a key is pressed, but how can i tell when one is being held down?
Thanks!
Nathan Strandberg
"Always forgive your enemies, nothing annoys them more.."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement