Original Post
I made a 2-player game in which one option is to let both players play with the keyboard. But when both press about 2-3 keys at once adding up to 4-6 keys down one key press is not processed. I used immediate and buffered mode.
In buffered mode i use the following to get the state data:
int i;
DIDEVICEOBJECTDATA didod[24];
DWORD buffsize = 24;
lpDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), didod, &buffsize, 0);
for(i = 0; i < buffsize; i++)
{
if(didod.dwData && 0x80)
{
keys[didod[i].dwOfs] = TRUE;
}
else
{
keys[didod[i].dwOfs] = FALSE;
}
}
Then:
if(keys[DIK_UP])
{
//do stuff
}
if(keys[DIK_DOWN])
{
}
and so on...
normally its in a class i just did it like this to show
I need help desperately. Whwnever player one moves right + up then player 2 cant move right + up!
-CProgrammer