Closed WydD closed 8 years ago
This looks promising! I will test it sometime this week, fix any bugs, and then make another release! Thanks a lot!
The issue I see right now is that you can't reclaim a port if the controller is still plugged in. If you want to fix that then this is GOLDEN!
Thanks so much, this is going to make a lot of people happy! I will take a stab at fixing it when I have time, this seems very clean!
You can't reclaim a port with another device with the button combination ? Weird. I only have two devices at home so I can't test this.
Ok I think I understood (see https://github.com/dantarion/SF5DInput/pull/2)
So I tried to do this because I think it can be of critical use (especially for local tournaments). I rewrote most of the code but I wanted to start from your template because it had the injection part running.
Basically, the idea is to read all device data once every frame (when sfv check for XInputGetState(0,...)) and then manage virtualControllers[2] with the right mappings. Device check is operated once every second, or 60 calls of XInputGetState to avoid spaming EnumDevices.
After that, it's a matter of managing the structures and calling the right things.
I tried to bind the GUIDE button on XInput but unfortunately even the XInputGetStateEx does not seem to give me 0x400 on my computer. It worked a few month ago though. I added a binding of Start+Back = Home for xinput devices to select which player you want.
See ya