Sign in to follow this  

directInput using two mouse

This topic is 1758 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

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

This topic is 1758 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this