Jump to content
  • Advertisement
Sign in to follow this  
Gavin Williams

DirectInput.Manager.GetDevices() does not return

This topic is 2785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm trying to read input from the gamepad in XNA using DirectInput. When I try to get the available input devices with :

DeviceList devices = Manager.GetDevices(DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly);

it doesn't seem to return. Any ideas why this could be ?

I'm using XNA 4.0, Visual Studio 2010 Pro.

... EDIT ...

I tried creating an XNA 3.1 Project and it works fine. Something else I've noticed is that in my references in VS2008Exp DirectInput is available under the .NET tab while in VS2010Pro there are no DirectX namespaces available. I've made a manual link using Browse to :

C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0

Which makes the namespace available.

I have 2 thoughts :

1. I have to setup DirectX properly in the references.
2. DirectX for Managed Code doesn't work in VS2010.

I'll keep searching for a solution.

[Edited by - Gavin Williams on December 4, 2010 8:33:17 AM]

Share this post


Link to post
Share on other sites
Advertisement
Well I've been searching and found how to add libs & includes under VS2010 for C++ projects but this still doesn't make the references available to my C# projects. Also I'm getting the impression that managed directX just won't work anymore (whether it's VS2010 or .NET 4.0 im not sure). So I'm going to take a look at using SlimDX with my XNA projects in order to access logitech (and other) gamepads.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!