Hi, I just wanted to let everyone know I made a patch to get Night in the Woods working with x360ce. I was a Kickstarter backer for the game, so I could not let the lack of x360ce support stand. Also I had been wanting to see what could be done about getting Unity games to work with x360ce for a while, since Unity is starting to be used by a lot more games and the lack of support for x360ce can be a real issue.
As it turns out Night in the Woods actually does use XInput through it's "mono.dll" file. The issue was just getting the game to ignore RawInput controllers, and making sure x360ce was loaded only from "mono.dll" and not the main .exe file. I haven't looked into this extensively, but I wonder if XInput is supported the same way in other Unity games, which would mean my patch would work for those games too. Might be worth looking into if anyone wants to check.
Anyway, to the devs, I was looking at x360ce's source code, and there seems to be a lot of stuff in there. I was a bit confused by this because there are fewer than 10 function calls in the entire XInput specification, so I didn't really think x360ce would need to do that much. There is also stuff like hooking, which I am not sure what the purpose of is. I mean, if you support the XInput interface the the same manner as the original .dll's, why would you need to hook anything?
Also, is there some reason you haven't tried to support RawInput or DirectInput yet? Originally I was going to do my patch as a forwarder from RawInput to Xinput so I could just let x360ce handle the configuration stuff, but as it turns out it wasn't necessary. Still there are a lot of games that only use RawInput or DirectInput with poor controller support that would benefit from something like x360ce, so I was wondering why it hasn't been done yet? If the issue is because (at least in the case of RawInput) the interface functions are in system dll's I wrote a script called ShimmySham that can easily generate shims for system .dll files. This lets you intercept system calls in a relatively non-invasive way, and with a high level of compatibility with things like copy protection. Maybe it's something you guys could use?
Anyway, since I have made it one of my missions in life to fix Unity's horrible controller support, if anyone else knows of any Unity games that load an XInput .dll but are not compatible with x360ce, let me know and I will try to have a look at them.
As it turns out Night in the Woods actually does use XInput through it's "mono.dll" file. The issue was just getting the game to ignore RawInput controllers, and making sure x360ce was loaded only from "mono.dll" and not the main .exe file. I haven't looked into this extensively, but I wonder if XInput is supported the same way in other Unity games, which would mean my patch would work for those games too. Might be worth looking into if anyone wants to check.
Anyway, to the devs, I was looking at x360ce's source code, and there seems to be a lot of stuff in there. I was a bit confused by this because there are fewer than 10 function calls in the entire XInput specification, so I didn't really think x360ce would need to do that much. There is also stuff like hooking, which I am not sure what the purpose of is. I mean, if you support the XInput interface the the same manner as the original .dll's, why would you need to hook anything?
Also, is there some reason you haven't tried to support RawInput or DirectInput yet? Originally I was going to do my patch as a forwarder from RawInput to Xinput so I could just let x360ce handle the configuration stuff, but as it turns out it wasn't necessary. Still there are a lot of games that only use RawInput or DirectInput with poor controller support that would benefit from something like x360ce, so I was wondering why it hasn't been done yet? If the issue is because (at least in the case of RawInput) the interface functions are in system dll's I wrote a script called ShimmySham that can easily generate shims for system .dll files. This lets you intercept system calls in a relatively non-invasive way, and with a high level of compatibility with things like copy protection. Maybe it's something you guys could use?
Anyway, since I have made it one of my missions in life to fix Unity's horrible controller support, if anyone else knows of any Unity games that load an XInput .dll but are not compatible with x360ce, let me know and I will try to have a look at them.