Ryochan7 / DS4Windows

Like those other ds4tools, but sexier
https://ryochan7.github.io/ds4windows-site/
GNU General Public License v3.0
6.99k stars 808 forks source link

PSO2NGS (Japanese version) unstable behavior with XInput #2388

Closed velocity7 closed 3 years ago

velocity7 commented 3 years ago

Describe the bug When DS4Windows is set to X360 mode with a DualSense on Windows startup, PSO2NGS responds properly when in XInput mode. However, if DS4Windows disconnects and reconnects the controller, PSO2NGS in XInput mode only responds to DS4Windows up until the title screen.

In this state, PSO2NGS will only respond in DirectInput mode, but a regular X360 controller will still work with PSO2NGS in XInput. Restarting DS4Windows does not resolve the problem. A full PC restart temporarily resolves the issue.

To Reproduce Steps to reproduce the behavior:

  1. Connect a DualSense to DS4Windows
  2. Set DS4Windows to X360 mode
  3. Start PSO2NGS (JP) and switch to XInput mode
  4. Confirm buttons work
  5. Stop and start DS4Windows, or disconnect/reconnect controller

Expected behavior All buttons should be responding correctly.

Screenshots and Logs If applicable, add screenshots to help explain your problem. Also, please add the most log file (ds4windows_log.txt) from the Logs folder in your DS4Windows config folder.

Desktop (please complete the following information):

Additional context One possible workaround is to have a permanent slot for X360 mode, however this only works up to the point where the PC goes into standby (shown at 3 AM in the logs), which causes DS4Windows to shut down its services and thus results in the same bug again.

Also I did test turning off DS4Windows and staying in DirectInput/XInput modes... HidHide does still work against PSO2NGS and hides the DualSense as a controller.

ds4windows_log.txt

Kanuan commented 3 years ago

Maybe it's an issue with the XInput Slots order? See the discussion around here -> https://github.com/Ryochan7/DS4Windows/issues/2387#issuecomment-890534330

velocity7 commented 3 years ago

I terminated all processes using XInput and still have the issue. Stopping DS4Windows and plugging in an X360 controller still works. See Process Explorer window:

image

On another note, Parsec also seems to be suffering from the same problem so it might be related to ViGEmBus itself if a regular X360 controller still works in this state.

velocity7 commented 3 years ago

Just wanted to leave an update, it looks like if I uncheck the "Hide DS4 Controller" checkbox and just let HidHide do its thing, everything seems to return to normal? Will require more testing. I'll report back later if this doesn't pan out.

Kanuan commented 3 years ago

Let us know if the Hide DS4 controllers option is the culprit. It should be left disabled if HidHide is already being used to hide the controllers

mika-n commented 3 years ago

The best practice is to use either "Hide DS4 Controllers" (=exclusive mode) OR HidHide, but not both at the moment. These techniques are alternative ways to hide the physical gamepad: https://github.com/Ryochan7/DS4Windows/wiki/Exclusive-Mode-(Hide-DS4-Controller-config-option)-tips-and-issues

velocity7 commented 3 years ago

Unfortunately it doesn't look like that was the culprit... if it means anything, I did go to standby about 4 hours ago and came back to see if the phenomenon still occurs.

velocity7 commented 3 years ago

Hello, wanted to give a heads up. The problem occurred again, and previously restarting DS4Windows did not resolve the issue. However, a new version was available at the time, 3.0.15, which I then updated to... and miraculously it started working without even restarting the PC. Seems like the issue was resolved via one of the issues listed in 3.0.15, though I'm not sure which one. Haven't had any issues since then, though now I'm on version 3.0.16.

mika-n commented 3 years ago

closing because the original issue was probably because of not hiding the physical controller ("double controller issue") or the notorious "rolling xinput slot" issue. For that PersistentSlot option in DS4Windows/OutputSlots usually helps.