Controller order issue with SimConnect_MapInputEventToClientEvent in v3

russdirks
Posts: 71
Joined: Thu Sep 29, 2011 1:47 am

Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby russdirks » Wed Oct 28, 2015 4:04 am

There seems to be a bug introduced in v3, regarding the internal ordering of controllers, which impacts the use of SimConnect_MapInputEventToClientEvent.

The documentation for the pszInputDefinition parameter states the following:

For joysticks the input definition is in the form "joystick:n:input[:i]", where n is the joystick number (starting from 0) ...


In the past, I've always interpreted the "Joystick Number" by looking at the controller order in the USB Game Controllers dialog, and that has always worked perfectly, for FSX and P3D v1 & v2. But in P3D v3 something has changed. Depending on what order I plug the controllers in, and what USB port I plug them into, problems come up. The order of controllers in the USB Controller dialog may or may not match the order of controllers in P3D Settings / Controls dialog, which may or may not match the internal number used by SimConnect_MapInputEventToClientEvent.

This is obviously a problem, because, a) it means you have to search for the right controller number using trial and error, b) it can change if you plug the controllers in differently, and c) it's no longer consistent between different flight sim versions.

This affects my commercial addon FS Force.

I wonder if this is connected with the other reported issue in this sub-forum?
Russel Dirks
FS Force
Win10 64Bit, i5 4670K 3.4GHZ, Radeon RX 580

Clifton Crane
Lockheed Martin
Posts: 1045
Joined: Tue Sep 25, 2012 2:34 pm

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby Clifton Crane » Thu Oct 29, 2015 9:47 pm

Thanks for reporting this issue. I have opened a ticket to investigate.
Clifton Crane
Prepar3D® Software Engineer Sr.

brians
Posts: 32
Joined: Wed Feb 27, 2013 5:59 am

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby brians » Fri Oct 30, 2015 1:45 am

I am using FS-Force and have seen that the USB set up whilst working fine in FSX, P3D v1 and V2, in V3 the trim control (in my case) does not follow the correct USB device (it generally assigns to my throttle control although it varies). This is a real pain and I'm sure that this issue is responsible for some of the other controller assignment issues in the forum.
A fix for this in the next update would be greatly appreciated ( by me at least).


Brian

naf125
Posts: 2
Joined: Sat Jun 13, 2015 1:35 pm

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby naf125 » Sat Oct 31, 2015 5:18 pm

brians wrote:I am using FS-Force and have seen that the USB set up whilst working fine in FSX, P3D v1 and V2, in V3 the trim control (in my case) does not follow the correct USB device (it generally assigns to my throttle control although it varies). This is a real pain and I'm sure that this issue is responsible for some of the other controller assignment issues in the forum.
A fix for this in the next update would be greatly appreciated ( by me at least).


Brian



Same issue here.

Peter

Clifton Crane
Lockheed Martin
Posts: 1045
Joined: Tue Sep 25, 2012 2:34 pm

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby Clifton Crane » Tue Dec 01, 2015 11:31 pm

Hello,

Do you see this issue when starting Prepar3D for the first time with all devices plugged in? For example, plug-in all devices, configure FS-Force, start Prepar3D, does the problem exist? Or is this an issue you see primarily when changing devices while Prepar3D is running and attempting to reconfigure FS-Force?

Thanks!
Clifton Crane
Prepar3D® Software Engineer Sr.

Clifton Crane
Lockheed Martin
Posts: 1045
Joined: Tue Sep 25, 2012 2:34 pm

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby Clifton Crane » Wed Dec 02, 2015 5:04 pm

Hello,

I have reproduced the issue at startup. It appears that Raw Input enumerates devices differently than Direct Input. Device ordering should now match the USB Game Controller dialog ordering. The fix will be available with the next release.
Clifton Crane
Prepar3D® Software Engineer Sr.

russdirks
Posts: 71
Joined: Thu Sep 29, 2011 1:47 am

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby russdirks » Tue Dec 08, 2015 6:10 pm

Sorry for not replying earlier ... for some reason I'm not getting email notifications of thread activity. Glad to see you've got a handle on the issue.
Russel Dirks
FS Force
Win10 64Bit, i5 4670K 3.4GHZ, Radeon RX 580

adiemus
Posts: 120
Joined: Fri Mar 16, 2012 4:19 am
Contact:

Re: Controller order issue with SimConnect_MapInputEventToClientEvent in v3

Postby adiemus » Wed Feb 17, 2016 5:05 pm

Did this enumeration issue get fixed for 3.1, or did it not get found in time and will be in 3.2? I ask because we're still seeing issues with controllers being enumerated in a different order by P3D v3.1 than we get from our existing code that worked with v2 (and v1 and FSX).

FWIW, we're enumerating with DirectInput ala:

Code: Select all

di->EnumDevices(DI8DEVCLASS_GAMECTRL, CallBack, NULL, DIEDFL_ATTACHEDONLY);


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 14 guests