http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with DInput



Hello everyone !!

I created a function to read the keyboard buffer using :
TKeyboard::CheckKey(void)
{
   .
   .
   hr = teclado->GetDeviceState( sizeof(buffer), &buffer );
   .
   .
   KEY_LEFT = (buffer[DIK_LEFT] & 0x80);
   .
}
winmain() // for example
if (KEYLEFT)
  // do something

but when I check the state of the buffer instead of be '\0\0\0\0...\0'
the buffers contains strange caracters and I don't have how check what key 
was pressed.

If someone had the same problem or know how to solve this problem, please 
help me !!

Thanks..



________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCꫨ please visit:
http://gameprogrammer.com/mailinglist.html