device naming problem

One thing I wonder about are the strange names JInput gives my input devices under WinXP/German:

The mouse is identfied as: Maus Maus (means: mouse mouse)
(The mouse’s subdevices sound even stranger but I have read that the subdevice thing will be obsolete one time, so I do not complain.)

The keyboard looks like this: “Tastatur (Tastatur)” (means Keyboard (Keyboard)). Why in brackets this time?

Very strange:
“Microsoft SideWinder Game Pad Pro Microsoft SideWinder Game Pad Pro”

Since nobody complained on this topic so far I think this may be a localization problem. Anyone out there who can comment this?

As I mentioned in another thread my iTouch keyboard does the same thing - weird.
On my powerbook running OS X 10.2.8 the main keyboard and trackpad just show as “Generic Keyboard” and “Generic Mouse”

I don’t have the iTouch here to try on OS X at the moment.

under xp pro US english version, it shows as
Mouse Mouse
Keyboard (Keyboard)
Adaptoid Adaptoid
4 axis 16 button joystick 4 axis 16 button joystick

quite a mouthfull.

though DXDiag shows them all with just the name once, yet if the same thing running on a mac displays the device names correctly it must be the way directinput reports it.


super(productName + " " + instanceName);

I don’t think this is DInputs fault this small fragment resides in DirectInputDevice.java and it obviously connects product and instance name. Maybe someone thought instanceName would be something meaningful on Win32 when more than one controller of the same kind is installed. Well, this is really the problem. DInput doesn’t do this.

More interesting in DirectInputKeyboard the super-Constructor is called this way:


super(productName + " (" + instanceName + ")");

These brackets would be nice to have it for the mouse, too.

Can someone with commit access do these cosmetic changes?

actually, brackets for all devices even better.

maybe have two calls, one for the name, as the existing getName() and getInstance() (maybe a little confusing) or getInstanceName(), something like that.

I think instanceName isn’t very portable: Its a DInput specific identifier. Why not only show the name of the product and let the application that is using this define any extending identifiers?

[quote]Why not only show the name of the product and let the application that is using this define any extending identifiers?
[/quote]
How will it do this when all access is through JInput ?

I was regarding the naming problem only. Typically a game has to show the name of installed/used controller devices somewhere. It would be nice if JInput only delivers the name that the user finds on the box of his controller not some strange identifiers as currently.
If the application decides to show some more specific names (e.g: ‘deviceName (deviceClass)’ ) then it should do so.

Each one of the JINput native code bits has the opportunity to bind devices differently and name them however. In the OSX port I trimmed it down to ‘what made most sense’, but that may not always be the best option.

I would suggest posting an RFE so that the naming of devices can be standardized across implementations.