Device recognition - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Device recognition

I really didn't know where my topic would fit but I guess game programmers would know this since they program for one or more controllers. I am trying to figure out how I can write code that distinguishes one mouse from another so I can hook up two mice and recognize them. Does anyone have an idea of a USB API or something that can help interface such USB devices? Like how does a game tell controller one apart from controller two and allow both of them to control characters on the screen? Thanks in advance.

Comments

  • MT2002MT2002 Posts: 1,444Member
    Most games dont do this directly - they request the information from the operating system in some way (For example, the system API, or another API such as DirectX...)

    This is system specific. If you are using Windows, perhaps you might find something in the Win32 API?
    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
Sign In or Register to comment.