Add support for user-defined Custom devices#89
Open
Kanuan wants to merge 11 commits intoschmaldeo:masterfrom
Open
Add support for user-defined Custom devices#89Kanuan wants to merge 11 commits intoschmaldeo:masterfrom
Kanuan wants to merge 11 commits intoschmaldeo:masterfrom
Conversation
…rted device arrays
Author
|
Regarding this: 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. |
|
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. |
|
I've added this feature to my DS4Windows fork. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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