Original Post
I doubt anyone will know what's going on, but I'm trying to get input with direct input. I get most keys just fine. Letter keys, function keys, whatever. But whenever I try to get the arrow keys, they are either considered always on, or always off, no matter what I press. It's really really weird.
I use this code to update my key array
if(FAILED(result = keyboard->GetDeviceState(256 * sizeof(char), (LPVOID)keys))) {
if(FAILED(result = Acquire())) {
return result;
}
if(FAILED(result = keyboard->GetDeviceState(256 * sizeof(char), (LPVOID keys))) {
return result;
}
}
And I use this code to check to see if a key is pressed
if(keys[key] & 0x80)
return true;
else
return false;
Where key would equal DIK_DOWN