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

  • 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.

Howdy, Stranger!

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

Categories

In this Discussion