Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik > Daidalos Team discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2011, 10:42 AM
Artist's Avatar
Artist Artist is offline
Approved Member
 
Join Date: Jan 2010
Posts: 362
Default

Hi EvilJoven,

I wish it were as simple as that. From my experiences with developing YaDeLi: The IDs you've mentioned (and which can be changed with Joystick ID' Swapper) exist only in the old Win32 API which is almost deprecated. They are not, I repeat not, used or accessible in/from DirectInput, which is used IL-2. DirectInput uses a GUID-system to identify and re-recognize devices.

@Daidalos Team: I've used this mechanism in YaDeLi to reliably connect devices to a IL-2 DeviceLink channel and would gladly supply source code, help, and support - if you decide to do somthing in this direction.

Artist
Reply With Quote
  #2  
Old 10-20-2011, 03:28 PM
EvilJoven
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Artist View Post
Hi EvilJoven,

I wish it were as simple as that. From my experiences with developing YaDeLi: The IDs you've mentioned (and which can be changed with Joystick ID' Swapper) exist only in the old Win32 API which is almost deprecated. They are not, I repeat not, used or accessible in/from DirectInput, which is used IL-2. DirectInput uses a GUID-system to identify and re-recognize devices.

@Daidalos Team: I've used this mechanism in YaDeLi to reliably connect devices to a IL-2 DeviceLink channel and would gladly supply source code, help, and support - if you decide to do somthing in this direction.

Artist
I think we both might be wrong on this one. You're right that the registry keys and values I was working with earlier don't seem to have any bearing on the joystick ID.

Fortunately, I found out what does.

When I worked on this some more to confirm whether or not you were correct, I discovered that when you change the joystick ID in either that joystick ID utility I use or by setting the primary controller from within the Game Controller Settings (in the control panel in XP or brought up by right clicking on a joystick in the Devices and Printers window) you're changing the Joystick ID binary value key for the associated controller, located here:

HKEY_CURRENT_USER\System\CurrentControlSet\Control \MediaProperties\PrivateProperties\DirectInput\<VE NDOR AND DEVICE ID>\Calibration\0

This seems to be what sets the joystick ID.

The end result is the same. If IL-2 can be modified so that it assigns joystick IDs by reading from THAT key it should sort things out nicely.
Reply With Quote
  #3  
Old 10-20-2011, 03:46 PM
Artist's Avatar
Artist Artist is offline
Approved Member
 
Join Date: Jan 2010
Posts: 362
Default

Great discovery, EvilJoven! I just relied on the DirectInput-documentation from Microsoft and that never ever hinted at what you've found out...

Reverse Engineering scores a point over RTFM!

Now the question is: Is TD prepared to rely on an undocumented feature (mixing DirectInput with Win32 API) in order to solve a serious inconvenience for all those having more that 4 controllers...

I surely hope so! TD, please?

Artist

Edit, PS: You're sure that it is "HKEY_CURRENT_USER\System\..."? I find all you've written about under "HKEY_LOCAL_MACHINE\System\..."

Last edited by Artist; 10-20-2011 at 03:48 PM.
Reply With Quote
  #4  
Old 10-20-2011, 05:11 PM
EvilJoven
Guest
 
Posts: n/a
Default

On my win7x64 pc it all the stuff relating to the Directinput joystick ID settings is stored under HKCU. Unless I missed something in process monitor, when changing IDs around this is the only place it's done.
Reply With Quote
  #5  
Old 10-20-2011, 06:22 PM
Artist's Avatar
Artist Artist is offline
Approved Member
 
Join Date: Jan 2010
Posts: 362
Default

Secrets of Windows: It's Xp SP3 here and there's no "\System" under HKCU - only within HKLM. Could it be the shadowing of Win7? Wonder what a software API call would find...

Good to know, though.

Artist
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.