Jump to content
  • Advertisement
Sign in to follow this  
lomateron

directInput using two mouse

This topic is 2126 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this:

 

din->EnumDevices(DI8DEVCLASS_POINTER,DIEnumDevicesCallback,NULL,DIEDFL_ATTACHEDONLY);

 

 

and this:

 

GUID gUID[2];

BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi,LPVOID pvRef)
{
            if(numMice<2)
            {
                    gUID[numMice]=lpddi->guidInstance;
                    numMice++;
            }
            return DIENUM_CONTINUE;
 }

 

then I attach two mouses to my computer and it only counts one(The numMice variable goes to 1). WHY?
 Inside the app the input of the two mice are combined.
 
The two mouses work correctly in windows 7 OS.
Edited by lomateron

Share this post


Link to post
Share on other sites
Advertisement

Going out on a limb here but are you sure it's possible to make distinctions between two mice?  I have zero experience with this and may be wrong here but my understanding is that the computer can listen from multiple "mouse" devices but it all get's "lost in translation" if you will.  That is to say that when you respond to a "mouse event" you are responding to that event from any mouse or touch pad on the system not so much one or the other.  There is a lot of room for me to be wrong here but maybe you don't see two mice because the computer doesn't really have two mice?  It has two different input devices that act as a single "mouse" where either of their inputs cause the same events?

 

** FOLLOW UP EDIT **

Had to find some more on this, yes it appears that DirectX (or Direct Input to me more correct) as of version 9.0 no longer differentiates between multiple mice.

 

http://social.msdn.microsoft.com/forums/en-US/gametechnologiesgeneral/thread/ee6693bc-7e06-4320-8467-6bed87f2cc68/

and

http://link.mywwwserver.com/~jstookey/arcade/rawmouse/

Edited by Dan Mayor

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!