Skip to content

Conversation

@Kanuan
Copy link

@Kanuan Kanuan commented Jun 6, 2025

With this PR the list of supported devices used for device detection is created based on a combination of both the hard-coded registered devices and user-chosen ones, which will be loaded from disk by reading a CustomDevices.json file during app initialization.

To facilitate the process a Custom Devices Editor tab was added to the Device Options window, allowing to add, edit and remove devices. Users can configure:

  • if the device should or should not be detected
  • device's friendly name
  • device's VID/PID
  • Device Input Type (DS4/DualSense/SwitchPro/etc) and their connection determiner
    • I actually don't know if this was needed. From what I know it always matches the Input Type anyway
  • FeatureSet Flags

It's possible to overwrite a hard-code device with a user-defined one by defining the same VID/PID. With this the custom-device takes priority. This can be useful to, for example, remove a specific support for a hard-coded device by making a custom one with detection disabled.

The "combined" supported device list that is used in detection is set only once during startup and automatically when the user makes changes via the custom devices editor, so I don't think there should be any performance hit besides the one caused by reading the .json file on application initialization

image

@Kanuan
Copy link
Author

Kanuan commented Jun 6, 2025

Regarding this:

public const string customDevicesJsonFileName = "CustomDevices.json";

public static string CustomDevicesJsonFilePath => Path.Combine(DS4Windows.Global.appdatapath, customDevicesJsonFileName);

I'm not sure if I should be putting "file names" and "directories/paths" in DS4Devices.cs. if there is a better place for me to put these 2 strings let me know.

@bigboytvbox
Copy link

What version of ds4windows has this feature? I was looking everywhere for it in 3.9.9

@nefarius
Copy link

What version of ds4windows has this feature? I was looking everywhere for it in 3.9.9

There is none. A pull request is a suggestion, it's not guaranteed to be a public release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants