..:: PCSX2 Forums ::..

Full Version: DS4 To XInput Wrapper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(01-16-2014, 10:23 AM)electrobrains Wrote: [ -> ]If synthetic mouse events don't work with some software then the only alternative that I know of is implementing trackpad as a virtual trackpad/mouse/tablet device. That's a LOT of work compared to what is there now. I just tried AC4 and I see exactly what you see, that it does not track synthetic mouse events. By the way, touchpad support works a TON better with the changes I've made -- I think lots of events were getting delayed because of all the memory allocations in the fastpath.

Note to self: investigate whether SendInput() or SetCursorPos() behave any differently

electrobrains: Thx for the thoughts. Why are the synthetic mouse events working when in windows (I can move the mouse around fine) and then when I go into AC4, its gone. I come back out of the game, and the trackpad moves the mouse again.

My inkling is that the game is noticing there are the official OS-loaded drivers and device, and always using those. Is there a way to tell the game which device to use (or not use)? I found a way to disable the default device in win, yet still allow DS4Tools to sustain the Xbox360 virtual device - this didnt work, same behavior. Could it be that the game looks for and finds the device independant of OS-loaded devices?

What explains the discrepancy between trackpad working in-OS, and not in-game?
New version!

Make shared/exclusive mode for opening devices an option, defaulting to shared mode.
Print out errors from attempting to open devices if no controllers are found.
Bump version numbers to 1.1.

(01-17-2014, 06:17 AM)nyeates Wrote: [ -> ]electrobrains: Thx for the thoughts. Why are the synthetic mouse events working when in windows (I can move the mouse around fine) and then when I go into AC4, its gone. I come back out of the game, and the trackpad moves the mouse again.

My inkling is that the game is noticing there are the official OS-loaded drivers and device, and always using those. Is there a way to tell the game which device to use (or not use)? I found a way to disable the default device in win, yet still allow DS4Tools to sustain the Xbox360 virtual device - this didnt work, same behavior. Could it be that the game looks for and finds the device independant of OS-loaded devices?

What explains the discrepancy between trackpad working in-OS, and not in-game?

I don't know, probably one of several things: lazy developers not using the most compatible APIs Windows offers; the standard Windows APIs sucking and needing to use something lower-level; or attempting to prevent botting by specifically avoiding synthetic events.
(01-17-2014, 07:17 AM)electrobrains Wrote: [ -> ]New version!

Worked for me!

(01-17-2014, 07:17 AM)electrobrains Wrote: [ -> ]I don't know, probably one of several things: lazy developers not using the most compatible APIs Windows offers; the standard Windows APIs sucking and needing to use something lower-level; or attempting to prevent botting by specifically avoiding synthetic events.

Ahh, so the games themselves can possibly choose what buttons and controls to interpret from various HID devices. I didnt know that. Sucks.

I think I will return my DS4 now. Enjoy everyone!
(01-17-1970, 04:05 AM)nyeates Wrote: [ -> ]Ahh, so the games themselves can possibly choose what buttons and controls to interpret from various HID devices. I didnt know that. Sucks.

I think I will return my DS4 now. Enjoy everyone!

Of course, developers have that choice. I'm going to be working on touchpad support next now that I've gotten the big stuff I wanted to taken care of, so I'll find out rather quickly if the other synthetic mouse event injection calls work or whether we'll have to actually use a virtual mouse driver (something there is plenty of precedent for already) to achieve.
@electrobrains Would it be much more work to add support for using the touchpad swipe and press inputs as configurable keypresses instead of only emulating the mouse? Being able to map quicksave and load on that would be great.

(01-17-2014, 08:20 AM)electrobrains Wrote: [ -> ]Of course, developers have that choice. I'm going to be working on touchpad support next now that I've gotten the big stuff I wanted to taken care of, so I'll find out rather quickly if the other synthetic mouse event injection calls work or whether we'll have to actually use a virtual mouse driver (something there is plenty of precedent for already) to achieve.
(01-17-2014, 07:17 AM)electrobrains Wrote: [ -> ]New version!

Hey, I just stumbled upon your custom version of DS4tool. A couple questions:

1. What is your version trying to fix that the current DS4tool beta 3 doesn't do? I just barely caught your last post about it, so I'm a little behind.

2. I'm getting the same double controller problem that the early versions of DS4tool had (Wireless Controller and Xbox 360 controller both showing up at the same time). Is there any way around that?
(01-17-2014, 10:20 AM)Aleksandr Wrote: [ -> ]@electrobrains Would it be much more work to add support for using the touchpad swipe and press inputs as configurable keypresses instead of only emulating the mouse? Being able to map quicksave and load on that would be great.

When I overhaul touchpad support, you're going to have the ability to map areas of it to a number of different keyboard/mouse/controller button presses. I'd explain the exact ideas I have for implementing this but I'd rather leave it a bit of a surprise for the excitement factor Smile

(01-17-2014, 12:16 PM)pedrovay2003 Wrote: [ -> ]Hey, I just stumbled upon your custom version of DS4tool. A couple questions:

1. What is your version trying to fix that the current DS4tool beta 3 doesn't do? I just barely caught your last post about it, so I'm a little behind.

2. I'm getting the same double controller problem that the early versions of DS4tool had (Wireless Controller and Xbox 360 controller both showing up at the same time). Is there any way around that?

To answer #1, it mostly fixes periodic controller lag/latency and makes the input less jagged when operating as a virtual mouse.

I can't answer why #2 should be an issue because I, despite having a million games, Steam and Uplay all installed, cannot reproduce a condition where some program doubles up on input by attaching both devices. You need to download the 1.1 version, though, not the earlier versions I posted. Those give you the choice of using exclusive mode or shared mode access to the original native device.

I would really appreciate if anyone could give accurate, descriptive bug reports of issues. You guys are being way too vague that I don't really have anything to work with.
Hello all, I registered to give my feedback and well this is a great program. The only issue like many is the computer slows down when it comes to switching between apps with ds4 running and teamspeak. Is there a fix coming for this? Anyone know if the headset jack works while in bluetooth?

I think it be good even to have the touchpad press as a left click and use R1 for right click.

I would like to see in future perhaps is use of the speaker on the controller or have it show up in playback devices.
@electrobrains I gotta say thank you so much for continuing to develop this, Its awesome to finally be able to use the 360 controller emulation while in fighting games, that last bit of input lag was killing me in Emulated Project M and Street Fighter.

How likely are we going to be able to get gestures like two finger scrolling, pinching to zoom, and etc? I know you're working on tap to click and stuff like that now which will be awesome. Also, I've noticed that the mouse input ends up making a pass through the "Enhance Pointer Precision" option which I usually have off, but if its on for whatever reason, causes the touchpad input to become crazy enresponsive, though that might be because I have its acceleration curve tweaked for my laptop's touchpad.


In fact, that could be another feature down the line, mouse acceleration. While I want it far away from my mouse input, when its tuned properly it makes touchpads much, much better. That's also one of the things I'm forced to give apple credit on, their trackpads are calibrated VERY well.
(01-17-2014, 04:34 PM)icejiub Wrote: [ -> ]@electrobrains I gotta say thank you so much for continuing to develop this, Its awesome to finally be able to use the 360 controller emulation while in fighting games, that last bit of input lag was killing me in Emulated Project M and Street Fighter.

How likely are we going to be able to get gestures like two finger scrolling, pinching to zoom, and etc? I know you're working on tap to click and stuff like that now which will be awesome. Also, I've noticed that the mouse input ends up making a pass through the "Enhance Pointer Precision" option which I usually have off, but if its on for whatever reason, causes the touchpad input to become crazy enresponsive, though that might be because I have its acceleration curve tweaked for my laptop's touchpad.


In fact, that could be another feature down the line, mouse acceleration. While I want it far away from my mouse input, when its tuned properly it makes touchpads much, much better. That's also one of the things I'm forced to give apple credit on, their trackpads are calibrated VERY well.

Hey, I'm glad to finally get confirmation that I've solved input lag problems for others! Thanks!

As far as touch "gestures" those would come last after I have basic functionality of clicking, dragging, and tapping supported. I'm actually NOT going to be implementing a touchpad mode... I'm going to be implementing a TABLET mode!