Click to See Complete Forum and Search --> : Using DirectInput
lmoreault
September 16th, 2008, 11:59 AM
Hi,
I am looking for an easy tutorial on how to read input out of a Joystick or Gamepad with DirectX's DirectInput.
I have found a code example in MSDN but it has got a huge MFC overhead that I don't want to know about.
Anybody knows a good site where I could start ?
Thank you very much.
lmoreault
September 19th, 2008, 07:15 AM
Nobody's got any links or ideas where I could start ?
Thank you
Zaccheus
September 19th, 2008, 09:36 AM
Have you looked at the samples which are installed with the DirectX SDK?
They don't use MFC now, do they?
Notsosuperhero
September 19th, 2008, 12:50 PM
In the DirectX SDK documentation, they have a tutorial on using the joystick, and no MFC is in there.
lmoreault
September 22nd, 2008, 12:10 PM
I don't know if its MFC but there is a GUI in there so I don't see clearly the DirectInput code.
Notsosuperhero
September 22nd, 2008, 01:51 PM
The sample isn't MFC. Its just calling a dialog box to test out the joystick.
Look through the code and pay attention more specifically to the DirectX functions they define: InitDirectInput, EnumJoysticksCallback, UpdateInputState, etc...
It is commented fairly well to explain what they are doing.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.