Abdullah
unread,Jan 20, 2012, 3:34:57 PM1/20/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello, I'm trying to use my joystick with my GUI, I'm new to all this
so I apologies for my ignorance in advance.
So far, I have the following code related to Joystick initialization.
Ideally I want to have a combo box where we can select the joystick
device. I also would like to know how to get input from a joystick,
button presses etc.
--------------------------------
// Direct Input Settings - Joystick Configurations
// Get Joystick List
List<DeviceInstance> directInputList = new
List<DeviceInstance>(); // hold all input devices
DirectInput directInput = new DirectInput(); // get list
directInputList.AddRange(directInput.GetDevices(DeviceClass.GameController,
DeviceEnumerationFlags.AttachedOnly)); // specify joystick
// Create joystick device
Device _joystickDevice;
_joystickDevice = new
SlimDX.DirectInput.Joystick(directInput,
directInputList[0].InstanceGuid);
// Access Joystick
_joystickDevice.Acquire();
-------------------------------