Page 1 of 1

Get the Joystick Name

Posted: Thu Oct 05, 2023 3:32 pm
by FusRoPotato
I have a predicament where my controllers change ID often, and some of the more important ones sometimes change name very slightly. It has required me to often view the ID's and names with alternate software and change a settings file I created. I had a solution idea to iterate through joystick[] since it has a numerical index and search for an ascii pattern that is always present, but it doesn't seem like there is any property device.InstanceName stored in the python environment. I saw one solution someone else came up with, but it requires that full exact name when my device name unfortunately changes on occasion.

I don't really know a lot about C# yet, but I was wondering, would adding to the JoystickPlugin.cs file, under the public class JoystickGlobal, some kind of device.InstanceName string be a simple solution to this?

Re: Get the Joystick Name

Posted: Mon Oct 09, 2023 3:42 am
by Jabberwock
Is there a reasonable pool of possible device names that could be queried or are the changes in the names random?