xbox xinput c#

Discussion in 'Programmer's Corner' started by chrisw1990, Nov 29, 2013.

  1. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    Found this while trying to implement xbox controller...:
    http://www.autohotkey.com/board/topic/96738-capturing-guide-button/

    iv implemented two of the ordinals mentioned, the power off and i also have guide button detect implemented..

    However, the other two ordinals are VERY useful considering my intended purpose of the guide button.
    These are XInputWaitForGuideButton and XInputCancelGuideButtonWait..
    However, i dont understand the UnKnown* punknown variable..
    its called LPVOID here: http://magical-tools.googlecode.com/svn-history/r128/trunk/Durazno/Durazno/Durazno.cpp
    and LPOVERLAPPED here:
    https://code.google.com/p/x360ce/source/browse/trunk/x360ce/x360ce/x360ce.cpp?spec=svn514&r=514

    However, both of these are c++, not c#, and i dont understand what variable they are meant to be in order to convert/implement/use them

    Please help!!
    Cheers
    Chris
     
  2. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    potential solution is to implement my own background thread and use that to essentially do what that does.. poll the button and return or wait until its pressed..
    if a secondary background thread were to be implemented, the Cancel would have to neutralise the thread..
    However, this wouldnt be strictly threadsafe from the point of view that the xbox controller might be accessed by two threads simultaneously.. hence why im trying to use these functions..
    (just thought id add this in as an after thought)
     
Loading...