Jump to content

  • Log In with Google      Sign In   
  • Create Account


directInput using two mouse


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 lomateron   Members   -  Reputation: 302

Like
0Likes
Like

Posted 01 February 2013 - 02:44 PM

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, 01 February 2013 - 03:22 PM.


Sponsor:

#2 Dan Mayor   Crossbones+   -  Reputation: 1712

Like
1Likes
Like

Posted 01 February 2013 - 05:27 PM

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, 01 February 2013 - 05:32 PM.

Digivance Game Studios Founder:

Dan Mayor - Dan@Digivance.com
 www.Digivance.com


#3 lomateron   Members   -  Reputation: 302

Like
0Likes
Like

Posted 19 February 2013 - 09:35 AM

Here is the solution for that






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS