Get the Joystick Name

Official forum for open source FreePIE discussion and development.
Post Reply
FusRoPotato
One Eyed Hopeful
Posts: 1
Joined: Thu Oct 05, 2023 2:34 pm

Get the Joystick Name

Post 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?
Jabberwock
Cross Eyed!
Posts: 197
Joined: Mon Mar 02, 2015 3:58 pm

Re: Get the Joystick Name

Post by Jabberwock »

Is there a reasonable pool of possible device names that could be queried or are the changes in the names random?
Post Reply

Return to “FreePIE”