locked
Managed DirectX 2.0 Beta and XInput

    Question

  • I have a general question regarding the Managed DirectX 2.0 Beta:

    Using Intellisense, I was able to figure out how to get a Direct3D Device up and running dispite the minor (and sometimes major) differences. I also found that XInput, in contrast to programming with XInput in unmanaged C++, this version is lacking a lot, such as all of the core functions that update and get the state of a controller.

    Forgive me if I am completely off the mark, but I have little to no experience with beta versions. I have the notion that a beta is supposed to support all of the fetures, although there may be bugs. So I guess one of my questions is, does the beta support all of the features that it exposes? (I guess the answer to that will be a big fat "yeah, duh," but I mean, why have an XInput namespace without supporting it. I'm probably just not looking hard enough).

    So my question is, to put it bluntly, does the Managed DirectX 2.0 Beta  support XInput? I'm not really asking for a how because I want to figure it out on my own. But then again, I'm stuck. So if you can figure it out, go ahead and tell.

    I realize that this is an undocumented subject, but there is probably someone out there who knows. Otherwise, we'll just have to wait for the next release and documentation.

    Thanks in advance.

    Saturday, May 27, 2006 10:39 AM

Answers

  •  

    Yes it does support XInput as I am using it in several projects, but it does not support the new changes that were implemented in the latest SDK.. (April 2006, when the DLL name was changed and several small functions added). There are some wrappers out there that will allow you to use the code in the 1.1 envionment (www.mdxinfo.com has one), you might be able to re work the wrapper so that it is using the new DLL that was released.

    But I can say that the MDX 2 system does support XInput with all of it's functions that were released before the April 2006 SDK.

    If you do want any more help you are free to email me and I might be able to help.

    Saturday, May 27, 2006 12:53 PM
  • >Otherwise, we'll just have to wait for the next release and documentation.

    Remember there is no 'next' release of MDX 2.0 that is documented anywhere in public. We have to wait for the summer announcement of more XNA framework details.

    Otherwise as Glenn says - MDX 2.0 beta support XInput. ITs an almost trivial API though

    GamePadState state = Controller.GetState(0).GamePad;

    Then

    state.AButton etc gives you the state of buttons as bools and alanlogs as shorts (I think off the top of my head - you will see it in intellisense).

    Watch out for the vibrations - they are in the range 0-65536 but the API passes in signed shorts so you need to use unchecked to avoid overflows.

     

    Sunday, May 28, 2006 6:38 AM

All replies

  •  

    Yes it does support XInput as I am using it in several projects, but it does not support the new changes that were implemented in the latest SDK.. (April 2006, when the DLL name was changed and several small functions added). There are some wrappers out there that will allow you to use the code in the 1.1 envionment (www.mdxinfo.com has one), you might be able to re work the wrapper so that it is using the new DLL that was released.

    But I can say that the MDX 2 system does support XInput with all of it's functions that were released before the April 2006 SDK.

    If you do want any more help you are free to email me and I might be able to help.

    Saturday, May 27, 2006 12:53 PM
  • >Otherwise, we'll just have to wait for the next release and documentation.

    Remember there is no 'next' release of MDX 2.0 that is documented anywhere in public. We have to wait for the summer announcement of more XNA framework details.

    Otherwise as Glenn says - MDX 2.0 beta support XInput. ITs an almost trivial API though

    GamePadState state = Controller.GetState(0).GamePad;

    Then

    state.AButton etc gives you the state of buttons as bools and alanlogs as shorts (I think off the top of my head - you will see it in intellisense).

    Watch out for the vibrations - they are in the range 0-65536 but the API passes in signed shorts so you need to use unchecked to avoid overflows.

     

    Sunday, May 28, 2006 6:38 AM
  • Ok, thanks, I feel like a complete retard. Everything I was looking for was in the Controller class. I never looked through it before. Thanks.
    Sunday, May 28, 2006 6:39 PM