#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    4
    Rep Power
    0

    Question Getting input from a game controller


    I'm trying to write an application/driver in C++ or java that will be able to take in input from a game controller plugged into the USB port on my PC.

    Does anyone know how i can do this?
    I have no idea even where to begin with something like this.

    If anyone has any sample code or can give me any suggestions, it would be greatly appreciated.

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    I assume you are using Windows.

    USB game controllers (and all other joystick-like devices) can be controlled with a few WinAPI functions in polling and event-driven modes.

    here is the corresponding chapter in the platform sdk:
    http://msdn.microsoft.com/library/de...d/joy_42er.asp

IMN logo majestic logo threadwatch logo seochat tools logo