-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS4 controllers not detected since 2.0.9 (Win10) #6167
Comments
We ignore PS4 controllers if DS4Windows or InputMapper are running. Does SDL_IsPS4RemapperRunning() return true for you? |
Thank you, that's the missing piece of the puzzle! I can't turn off DS4Windows, I have to close it entirely for my controllers to work. So the unexpected factors are:
I'm inclined to use 2.0.8 for now. EDIT: To answer your question specifically, yes, it returns true. |
Is there any way to detect whether DS4Windows is running, but disabled? |
I don't know. We could ping Ryochan7 to ask your question, if that isn't a violation of GitHub etiquette. I think he might be the most likely to know the answer. Interestingly, it seems some people rename DS4Windows.exe to work around this sort of detection. In fact, enough people do so, apparently, that there are guides for it and support for renaming the .exe in the DS4Windows updater. I was unaware of all of this when I opened this issue. My personal feedback is that I was confused by SDL choosing to disable PS4 controller support. |
Well, the motivation to ignore the PS4 controllers is so that games don't get duplicate input from both the PS4 controllers and the Xbox controllers created by DS4Windows. @Ryochan7, is there a better way for SDL to tell whether there are virtual controllers active? |
I figured that was the case. The other problem in my case was that DS4Windows was creating virtual PS4 controllers, not virtual Xbox controllers, so both the physical and virtual controllers got ignored, and I wasn't sure why my controllers wouldn't work in SDL. |
Ah, that's even worse. Hopefully @Ryochan7 can chime in with the best way to handle integration with SDL. |
Can I chime in? I would prefer SDL to see both the real and duplicated virtual controllers. That would be the default behaviour of games anyway, and users would only be expected to use DS4Windows for games that don't see PS controllers. I vote for the DS4Windows detection to be removed entirely, or at least wrap a hint around it. |
DS4Windows virtual device detection only works for virtual DS4 controllers made with ViGEmBus currently. All DS4Windows does is check each detected DS4 controller for an exposed UINumber property which is populated by ViGEmBus. If the value returned is not null or empty then DS4Windows considers the device to be a virtual one and skips it. The same routine would not work when trying to detect virtual DS4 devices created with reWASD but most people would not try to use both mappers at the same time. It hasn't been a big concern. Nefarius implemented a different approach that DS4Windows will probably use in the future; still working on some details. The approach finds the device parent and walks up the device tree. It looks like if the ROOT enumerator is detected then the device will be considered virtual. DS4Windows recommends people use HidHide on the initial setup window so the real DS4 can be hidden from other processes. Using the HidHide driver removes the double input issue when it comes to remapping. The HidHide configuration utility can be set up to hide and unhide devices as needed. I mainly use emulated DS4 output to play some older PC games that only support DirectInput that need extra remapping to work; Shadows of the Empire is one game that comes to mind. |
Okay, thanks for the feedback. We'll go ahead and remove the special handling for DS4Windows from SDL and Steam. |
DS4Windows can create both emulated Xbox and emulated PS4 controllers, and we don't know which the user has it doing, so don't try to second guess it, just let it do it's thing. Users should follow the remapping software recommendations on when to enable/disable it for various situations. Fixes libsdl-org#6167
I have two PS4 controllers which I use daily for playing games, and they work fine for most purposes. They're connected to a Windows 10 computer via USB. However, when I try to use them with any version of SDL from 2.0.9 onwards, they aren't detected.
At first, I thought I must be using the API wrong, but I don't think it's related to my own code at all, because I can reproduce the same problem using other software. I'll give an example:
There's a tool called SDL2 Gamepad Tool by General Arcade which comes with SDL 2.0.7, and that detects my PS4 controllers just fine! And if I replace that DLL with version 2.0.8, it still works. But if I replace that DLL with any version 2.0.9 or later, my controllers are no longer detected.
To track down the problem, I built various revisions between 2.0.8 and 2.0.9 from source. In ba90412, my PS4 controllers still worked fine. I believe that was the last working revision. In 4f41f07, they no longer work. (There are ten revisions in between, but they're missing files and I don't think they build successfully.)
Additional notes:
The text was updated successfully, but these errors were encountered: