DsHidMini icon indicating copy to clipboard operation
DsHidMini copied to clipboard

XInput Bridge Improvements

Open nefarius opened this issue 2 years ago • 4 comments

Notes on user feedback:

  • [x] Fix packet counter, it currently wrongly assumes that the caller initializes it with a starting value, use an internal incrementing counter per pad and only update it when the report has changed
  • [x] Fix performance issues due to errors in the state machine
    • #214
    • #225
    • #227
  • [x] Fix incomplete XInputGetCapabilities implementation
  • [x] Allow pass-through for real XInput-compatible pads
    • Currently only DS3s in SXS mode get detected and reported as connected
    • Listen to native XI APIs and pass-through any other XI pad if there is free slots
    • If no DS3s are present, the DLL can basically act as a transparent proxy for any XI pads so the user doesn't need to swap/rename DLLs when switching controller models
  • [x] Rework device detection logic
    • Enumerate both DS3 and X360 device once on startup
    • Keep track of device arrival and removal with CM_Register_Notification to simplify the current state tracking logic

nefarius avatar Apr 12 '22 21:04 nefarius

Stupid question: if you wanted to use these extensions with the other controllers that used to benefit from SCP (Scarlet.Crush mentioned the DS2 Play.com USB Adapter, and the SpeedLink Strike FX pad ps3 controller) how would you go?

mirh avatar Apr 17 '22 10:04 mirh

Well, it all depends on how/where you get the data. Since it's a proxy DLL, you can in theory "convert" any input device to it as long as it gets translated correctly. Currently I just use the well know HID API wrapper library to talk to DsHidMini, grab the raw report and translate it accordingly.

nefarius avatar Apr 17 '22 11:04 nefarius

I'm sorry to post here but looking for "dshidmini pcsx2 qt" on Google took me to this link https://github.com/ViGEm/DsHidMini/issues/227 , which then took me here.

So, I'm trying to make pressure sensitivity work on PCSX2 Qt (latest dev build as of now) but I'm likely not being able to. I tested it with the game The Bouncer which has a pressure sensitivity test in the controller options menu, but the pressure slider just register one state (therefore, it's just digital).

I have already enabled SXS in the DSHIDMini software and placed the XInput DLL in the emulator's root folder. In PCSX2 Global Settings, I have "Enable SDL Input Source" ticked. Then I go to Controller Port 1 - DualShock 2 and select Automatic Mapping and then "SDL-0 Nefarius Software Solutions e.U. DS3 Compatible HID Device" and all buttons are mapped automatically without issues, but unfortunately the pressure sensitivity does not seem to work. I have also tried to Enable XInput Input Source but then the controller won't show in the Automatic Mapping option.

I would be very glad if you could help me on that. I have had difficulty in finding a good guide for making this work properly. Thank you so much in advance for your time.

dezraj avatar Oct 10 '22 02:10 dezraj

I'm sorry to post here but looking for "dshidmini pcsx2 qt" on Google took me to this link #227 , which then took me here.

So, I'm trying to make pressure sensitivity work on PCSX2 Qt (latest dev build as of now) but I'm likely not being able to. I tested it with the game The Bouncer which has a pressure sensitivity test in the controller options menu, but the pressure slider just register one state (therefore, it's just digital).

I have already enabled SXS in the DSHIDMini software and placed the XInput DLL in the emulator's root folder. In PCSX2 Global Settings, I have "Enable SDL Input Source" ticked. Then I go to Controller Port 1 - DualShock 2 and select Automatic Mapping and then "SDL-0 Nefarius Software Solutions e.U. DS3 Compatible HID Device" and all buttons are mapped automatically without issues, but unfortunately the pressure sensitivity does not seem to work. I have also tried to Enable XInput Input Source but then the controller won't show in the Automatic Mapping option.

I would be very glad if you could help me on that. I have had difficulty in finding a good guide for making this work properly. Thank you so much in advance for your time.

Ok, I figured out what was wrong. When I set SXS mode in the DSHIDMini software I was just closing the window and then this wouldn't be really changing the option. We have to either click on "Apply changes" or unplug and plug the controller again in order that the new mode take effect. Then I could finally see the controller as an XInput source in the emulator when enabling "XInput source" in the controllers configuration.

Perhaps the tool-tip for the modes could be more clear on applying the changes in order that they take immediate effect.

Anyway, I'm sorry for the inconvenience. But I'm glad I could finally make it work. Thank you again.

dezraj avatar Oct 10 '22 03:10 dezraj